Skip to content

Start a multipart upload

POST
/media/uploads
curl --request POST \
--url https://postflow.biz.id/api/v1/media/uploads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "mime": "image/jpeg", "size": 1, "width": 1, "height": 1, "durationMs": 1, "parentId": "example" }'

For large files: start, PUT each part (10 MB, the last can be smaller), then complete. Checks storage first.

Media typeapplication/json
object
name
required
string
>= 1 characters <= 255 characters
mime
required
string
Allowed values: image/jpeg image/png image/webp image/gif video/mp4 video/quicktime video/webm
size
required
integer
>= 1 <= 1073741824
width
Any of:
integer
> 0 <= 9007199254740991
height
Any of:
integer
> 0 <= 9007199254740991
durationMs
Any of:
integer
<= 9007199254740991
parentId
string | null

OK

Media typeapplication/json
object
mediaId
required
string
uploadId
required
string
partSize
required
integer
partCount
required
integer

Example generated

{
"mediaId": "example",
"uploadId": "example",
"partSize": 1,
"partCount": 1
}

Validation failed. details lists what to fix.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: UNAUTHENTICATED FORBIDDEN NOT_FOUND VALIDATION CONFLICT SUBSCRIPTION_GRACE SUBSCRIPTION_EXPIRED PLAN_LIMIT RATE_LIMITED INTERNAL
message
required

A sentence you can show to a person.

string
details

Field errors ({ field: [messages] }), or preflight: per-account rule violations with an issue code.

Example

{
"error": {
"code": "UNAUTHENTICATED"
}
}

Missing, invalid, expired or deleted key or token.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: UNAUTHENTICATED FORBIDDEN NOT_FOUND VALIDATION CONFLICT SUBSCRIPTION_GRACE SUBSCRIPTION_EXPIRED PLAN_LIMIT RATE_LIMITED INTERNAL
message
required

A sentence you can show to a person.

string
details

Field errors ({ field: [messages] }), or preflight: per-account rule violations with an issue code.

Example

{
"error": {
"code": "UNAUTHENTICATED"
}
}

Subscription inactive or plan limit reached.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: UNAUTHENTICATED FORBIDDEN NOT_FOUND VALIDATION CONFLICT SUBSCRIPTION_GRACE SUBSCRIPTION_EXPIRED PLAN_LIMIT RATE_LIMITED INTERNAL
message
required

A sentence you can show to a person.

string
details

Field errors ({ field: [messages] }), or preflight: per-account rule violations with an issue code.

Example

{
"error": {
"code": "UNAUTHENTICATED"
}
}

Not allowed: a read-only key, the owner’s approval, or an owner-only action.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: UNAUTHENTICATED FORBIDDEN NOT_FOUND VALIDATION CONFLICT SUBSCRIPTION_GRACE SUBSCRIPTION_EXPIRED PLAN_LIMIT RATE_LIMITED INTERNAL
message
required

A sentence you can show to a person.

string
details

Field errors ({ field: [messages] }), or preflight: per-account rule violations with an issue code.

Example

{
"error": {
"code": "UNAUTHENTICATED"
}
}

Not found in this workspace.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: UNAUTHENTICATED FORBIDDEN NOT_FOUND VALIDATION CONFLICT SUBSCRIPTION_GRACE SUBSCRIPTION_EXPIRED PLAN_LIMIT RATE_LIMITED INTERNAL
message
required

A sentence you can show to a person.

string
details

Field errors ({ field: [messages] }), or preflight: per-account rule violations with an issue code.

Example

{
"error": {
"code": "UNAUTHENTICATED"
}
}

More than 120 requests in a minute with this key.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: UNAUTHENTICATED FORBIDDEN NOT_FOUND VALIDATION CONFLICT SUBSCRIPTION_GRACE SUBSCRIPTION_EXPIRED PLAN_LIMIT RATE_LIMITED INTERNAL
message
required

A sentence you can show to a person.

string
details

Field errors ({ field: [messages] }), or preflight: per-account rule violations with an issue code.

Example

{
"error": {
"code": "UNAUTHENTICATED"
}
}