Media

Reserve a project media upload

POST
/api/projects/{projectId}/media/uploads

Authorization

headerAuthorizationBearer <Postdot API key>

A user-owned Postdot API key sent as Authorization: Bearer <token>. Its project scope is limited by the creator’s current access.

Path Parameters

projectId*string
Length1 <= length

Request Body

  1. body
originalFilename*string
Length1 <= length <= 255
defaultAccessibilityText?|null
expectedSize?integer
Range0 <= value
contentType?string
Length1 <= length <= 255

Response Body

Response for status 201

application/json
  1. response
asset*
representation*
intent*
upload*
Example Request
curl -X POST 'https://postbot.example/api/projects/string/media/uploads' \
  -H 'Content-Type: application/json' \
  -d '{
  "originalFilename": "string"
}'
Example Response
{
  "asset": {
    "id": "string",
    "projectId": "string",
    "originalFilename": "string",
    "defaultAccessibilityText": "string",
    "state": "reserved",
    "archivedAt": 0,
    "deletionRequestedAt": 0,
    "deletedAt": 0,
    "failureCode": "string",
    "failureMessage": "string",
    "createdByActorId": "string",
    "createdAt": 0,
    "updatedAt": 0
  },
  "representation": {
    "id": "string",
    "projectId": "string",
    "assetId": "string",
    "kind": "original",
    "state": "reserved",
    "declaredContentType": "string",
    "detectedContentType": "string",
    "detectedFormat": "string",
    "family": "image",
    "byteSize": 0,
    "sha256": "string",
    "width": 1,
    "height": 1,
    "durationMs": 0,
    "pageCount": 1,
    "isAnimated": true,
    "processorId": "string",
    "processorVersion": "string",
    "recipeJson": "string",
    "failureCode": "string",
    "failureMessage": "string",
    "createdAt": 0,
    "updatedAt": 0
  },
  "intent": {
    "id": "string",
    "projectId": "string",
    "assetId": "string",
    "representationId": "string",
    "state": "pending",
    "expectedSize": 0,
    "maxBytes": 1,
    "contentTypeHint": "string",
    "expiresAt": 0,
    "uploadStartedAt": 0,
    "completedAt": 0,
    "failureCode": "string",
    "failureMessage": "string",
    "createdAt": 0,
    "updatedAt": 0
  },
  "upload": {
    "intentId": "string",
    "storeId": "string",
    "maxBytes": 1,
    "expectedSize": 0,
    "contentType": "string"
  }
}

Was this page helpful?