Skip to main content
POST
/
v1
/
upload
/
ack
Acknowledge file upload(s)
curl --request POST \
  --url http://localhost:8787/v1/upload/ack \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
[
  {
    "upload_id": "123e4567-e89b-12d3-a456-426614174000"
  },
  {
    "upload_id": "223e4567-e89b-12d3-a456-426614174001"
  }
]
'
[
  {
    "upload_id": "123e4567-e89b-12d3-a456-426614174000",
    "acknowledged_at": "2024-01-01T12:00:00Z",
    "size": 1024,
    "content_type": "application/pdf"
  },
  {
    "upload_id": "223e4567-e89b-12d3-a456-426614174001",
    "error": "Upload is not completed yet"
  }
]

Authorizations

x-api-key
string
header
required

WorkOS API key for authentication

Body

application/json
upload_id
string<uuid>
required

The upload ID returned from /prepare endpoint

Example:

"123e4567-e89b-12d3-a456-426614174000"

Example:
[
{
"upload_id": "123e4567-e89b-12d3-a456-426614174000"
},
{
"upload_id": "223e4567-e89b-12d3-a456-426614174001"
}
]

Response

Upload acknowledgment results

Successful acknowledgment

upload_id
string<uuid>
required

The upload ID that was acknowledged

acknowledged_at
string<date-time>
required

Timestamp when the upload was acknowledged

size
integer
required

File size in bytes

Example:

1024

content_type
string
required

MIME type of the uploaded file

Example:

"application/pdf"

Example:
[
{
"upload_id": "123e4567-e89b-12d3-a456-426614174000",
"acknowledged_at": "2024-01-01T12:00:00Z",
"size": 1024,
"content_type": "application/pdf"
},
{
"upload_id": "223e4567-e89b-12d3-a456-426614174001",
"error": "Upload is not completed yet"
}
]