Uploads API

Store media once and reference the upload id from any number of posts. Simple, from-URL, large (signed PUT) and multipart uploads.

OperationMethod and path
Get upload listGET /api/v1/upload
Create uploadPOST /api/v1/upload
Delete many uploadsDELETE /api/v1/upload
Get uploadGET /api/v1/upload/{id}
Delete uploadDELETE /api/v1/upload/{id}
Create upload from URLPOST /api/v1/upload/from-url
Initialize large uploadPOST /api/v1/upload/init
Finalize large uploadPOST /api/v1/upload/finalize
Initialize multipart uploadPOST /api/v1/upload/multipart/init
Re-sign multipart upload partsPOST /api/v1/upload/multipart/sign
Complete multipart uploadPOST /api/v1/upload/multipart/complete
Abort multipart uploadPOST /api/v1/upload/multipart/abort
GET /api/v1/upload

Get upload list

upload.getList · requires x-api-key

Parameters

NameInTypeNotes
teamId query string nullable
type query string One of image, video, document · nullable
types query string[] nullable
status query string One of USED, UNUSED · nullable
ids query string[] nullable
urls query string[] nullable
limit query integer nullable
includePosts query boolean | string | string default true · nullable
offset query integer default 0 · nullable

Example

curl -X GET "https://api.siaran.my/api/v1/upload/" \
  -H "x-api-key: $SIAR_API_KEY"

Response 200

20 top-level fields
  • id string required
  • teamId string nullable
  • organizationId string nullable
  • iconUrl string nullable uri
  • thumbnailUrl string nullable uri
  • url string nullable uri
  • externalLink string nullable uri
  • iconPath string nullable
  • thumbnailPath string nullable
  • path string nullable
  • type string required
    One of: image video document
  • width number nullable
  • height number nullable
  • fileSize number nullable
  • videoLength number nullable
  • mime string nullable
  • ext string nullable
  • createdAt string required nullable date-time
  • updatedAt string required nullable date-time
  • posts object[]
    5 fields
    • postId string required
    • uploadId string required
    • createdAt string required nullable date-time
    • updatedAt string required nullable date-time
    • deletedAt string nullable date-time

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

POST /api/v1/upload

Create upload

upload.create · requires x-api-key

Request body multipart/form-data

  • teamId string nullable
  • file file nullable

Example

curl -X POST "https://api.siaran.my/api/v1/upload/" \
  -H "x-api-key: $SIAR_API_KEY" \
  -F "teamId=TEAM_ID" \
  -F "file=@./file.jpg"

Response 200

19 top-level fields
  • id string required
  • teamId string nullable
  • organizationId string nullable
  • iconUrl string nullable uri
  • thumbnailUrl string nullable uri
  • url string nullable uri
  • externalLink string nullable uri
  • iconPath string nullable
  • thumbnailPath string nullable
  • path string nullable
  • type string required
    One of: image video document
  • width number nullable
  • height number nullable
  • fileSize number nullable
  • videoLength number nullable
  • mime string nullable
  • ext string nullable
  • createdAt string required nullable date-time
  • updatedAt string required nullable date-time

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

DELETE /api/v1/upload

Delete many uploads

upload.deleteMany · requires x-api-key

Request body application/json

  • ids string[] required min 1 items

Example

curl -X DELETE "https://api.siaran.my/api/v1/upload/" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "ids": [
      "ID_ID"
    ]
  }'

Response 200

19 top-level fields
  • id string required
  • teamId string nullable
  • organizationId string nullable
  • iconUrl string nullable uri
  • thumbnailUrl string nullable uri
  • url string nullable uri
  • externalLink string nullable uri
  • iconPath string nullable
  • thumbnailPath string nullable
  • path string nullable
  • type string required
    One of: image video document
  • width number nullable
  • height number nullable
  • fileSize number nullable
  • videoLength number nullable
  • mime string nullable
  • ext string nullable
  • createdAt string required nullable date-time
  • updatedAt string required nullable date-time

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

GET /api/v1/upload/{id}

Get upload

upload.get · requires x-api-key

Parameters

NameInTypeNotes
id required path string

Example

curl -X GET "https://api.siaran.my/api/v1/upload/ID" \
  -H "x-api-key: $SIAR_API_KEY"

Response 200

20 top-level fields
  • id string required
  • teamId string nullable
  • organizationId string nullable
  • iconUrl string nullable uri
  • thumbnailUrl string nullable uri
  • url string nullable uri
  • externalLink string nullable uri
  • iconPath string nullable
  • thumbnailPath string nullable
  • path string nullable
  • type string required
    One of: image video document
  • width number nullable
  • height number nullable
  • fileSize number nullable
  • videoLength number nullable
  • mime string nullable
  • ext string nullable
  • createdAt string required nullable date-time
  • updatedAt string required nullable date-time
  • posts object[]
    5 fields
    • postId string required
    • uploadId string required
    • createdAt string required nullable date-time
    • updatedAt string required nullable date-time
    • deletedAt string nullable date-time

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

DELETE /api/v1/upload/{id}

Delete upload

upload.delete · requires x-api-key

Parameters

NameInTypeNotes
id required path string

Example

curl -X DELETE "https://api.siaran.my/api/v1/upload/ID" \
  -H "x-api-key: $SIAR_API_KEY"

Response 200

19 top-level fields
  • id string required
  • teamId string nullable
  • organizationId string nullable
  • iconUrl string nullable uri
  • thumbnailUrl string nullable uri
  • url string nullable uri
  • externalLink string nullable uri
  • iconPath string nullable
  • thumbnailPath string nullable
  • path string nullable
  • type string required
    One of: image video document
  • width number nullable
  • height number nullable
  • fileSize number nullable
  • videoLength number nullable
  • mime string nullable
  • ext string nullable
  • createdAt string required nullable date-time
  • updatedAt string required nullable date-time

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

POST /api/v1/upload/from-url

Create upload from URL

upload.createFromUrl · requires x-api-key

Request body application/json

  • teamId string nullable
  • url string required uri

Example

curl -X POST "https://api.siaran.my/api/v1/upload/from-url" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "url": "https://example.com/file.jpg"
  }'

Response 200

19 top-level fields
  • id string required
  • teamId string nullable
  • organizationId string nullable
  • iconUrl string nullable uri
  • thumbnailUrl string nullable uri
  • url string nullable uri
  • externalLink string nullable uri
  • iconPath string nullable
  • thumbnailPath string nullable
  • path string nullable
  • type string required
    One of: image video document
  • width number nullable
  • height number nullable
  • fileSize number nullable
  • videoLength number nullable
  • mime string nullable
  • ext string nullable
  • createdAt string required nullable date-time
  • updatedAt string required nullable date-time

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

POST /api/v1/upload/init

Initialize large upload

upload.initLargeUpload · requires x-api-key

Request body application/json

  • teamId string nullable
  • fileName string required
  • mimeType string required
    One of: image/jpg image/jpeg image/png image/gif video/mp4 video/quicktime application/pdf
  • fileSize integer ≥ 1

Example

curl -X POST "https://api.siaran.my/api/v1/upload/init" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "fileName": "Example",
    "mimeType": "image/jpg"
  }'

Response 200

2 top-level fields
  • url string required
  • path string required

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

POST /api/v1/upload/finalize

Finalize large upload

upload.finalizeLargeUpload · requires x-api-key

Request body application/json

  • teamId string nullable
  • path string required

Example

curl -X POST "https://api.siaran.my/api/v1/upload/finalize" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "path": "string"
  }'

Response 200

19 top-level fields
  • id string required
  • teamId string nullable
  • organizationId string nullable
  • iconUrl string nullable uri
  • thumbnailUrl string nullable uri
  • url string nullable uri
  • externalLink string nullable uri
  • iconPath string nullable
  • thumbnailPath string nullable
  • path string nullable
  • type string required
    One of: image video document
  • width number nullable
  • height number nullable
  • fileSize number nullable
  • videoLength number nullable
  • mime string nullable
  • ext string nullable
  • createdAt string required nullable date-time
  • updatedAt string required nullable date-time

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

POST /api/v1/upload/multipart/init

Initialize multipart upload

upload.initMultipartUpload · requires x-api-key

Request body application/json

  • teamId string nullable
  • fileName string required
  • mimeType string required
    One of: image/jpg image/jpeg image/png image/gif video/mp4 video/quicktime application/pdf
  • fileSize integer required ≥ 1

Example

curl -X POST "https://api.siaran.my/api/v1/upload/multipart/init" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "fileName": "Example",
    "mimeType": "image/jpg",
    "fileSize": 1
  }'

Response 200

4 top-level fields
  • uploadId string required
  • path string required
  • partSize integer required ≥ 1
  • parts object[] required
    2 fields
    • partNumber integer required ≥ 1≤ 10000
    • url string required uri

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

POST /api/v1/upload/multipart/sign

Re-sign multipart upload parts

upload.signMultipartParts · requires x-api-key

Request body application/json

  • teamId string nullable
  • partNumbers integer[] required min 1 itemsmax 10000 itemseach: ≥ 1each: ≤ 10000
  • path string required
  • uploadId string required

Example

curl -X POST "https://api.siaran.my/api/v1/upload/multipart/sign" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "partNumbers": [
      1
    ],
    "path": "string",
    "uploadId": "UPLOAD_ID"
  }'

Response 200

1 top-level fields
  • parts object[] required
    2 fields
    • partNumber integer required ≥ 1≤ 10000
    • url string required uri

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

POST /api/v1/upload/multipart/complete

Complete multipart upload

upload.completeMultipartUpload · requires x-api-key

Request body application/json

  • teamId string nullable
  • parts object[] required min 1 itemsmax 10000 items
    2 fields
    • partNumber integer required ≥ 1≤ 10000
    • etag string required min length 1
  • path string required
  • uploadId string required

Example

curl -X POST "https://api.siaran.my/api/v1/upload/multipart/complete" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "parts": [
      {
        "partNumber": 1,
        "etag": "string"
      }
    ],
    "path": "string",
    "uploadId": "UPLOAD_ID"
  }'

Response 200

19 top-level fields
  • id string required
  • teamId string nullable
  • organizationId string nullable
  • iconUrl string nullable uri
  • thumbnailUrl string nullable uri
  • url string nullable uri
  • externalLink string nullable uri
  • iconPath string nullable
  • thumbnailPath string nullable
  • path string nullable
  • type string required
    One of: image video document
  • width number nullable
  • height number nullable
  • fileSize number nullable
  • videoLength number nullable
  • mime string nullable
  • ext string nullable
  • createdAt string required nullable date-time
  • updatedAt string required nullable date-time

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

POST /api/v1/upload/multipart/abort

Abort multipart upload

upload.abortMultipartUpload · requires x-api-key

Request body application/json

  • teamId string nullable
  • path string required
  • uploadId string required

Example

curl -X POST "https://api.siaran.my/api/v1/upload/multipart/abort" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "path": "string",
    "uploadId": "UPLOAD_ID"
  }'

Response 200

1 top-level fields
  • success boolean required

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error