Skip to content

Docs

get_media_upload_request

Status of a request_media_upload: waiting, uploading, finished (with mediaAssetId and the asset) or expired (ask again).

Status of a request_media_upload: waiting, uploading, finished (with mediaAssetId and the asset) or expired (ask again).

Access and cost

  • Kind: query
  • Scope: workspace
  • Actors: member, agent
  • Credits: Free
  • Requires confirmation: false
  • Accepts idempotency key: false

Input schema

{
  "properties": {
    "workspaceId": {
      "format": "uuid",
      "type": "string"
    },
    "uploadRequestId": {
      "format": "uuid",
      "type": "string"
    }
  },
  "required": [
    "workspaceId",
    "uploadRequestId"
  ],
  "type": "object"
}

Output schema

{
  "additionalProperties": false,
  "properties": {
    "uploadRequest": {
      "additionalProperties": false,
      "properties": {
        "id": {
          "format": "uuid",
          "type": "string"
        },
        "workspaceId": {
          "format": "uuid",
          "type": "string"
        },
        "status": {
          "enum": [
            "waiting",
            "uploading",
            "finished",
            "expired"
          ],
          "type": "string"
        },
        "accepts": {
          "items": {
            "enum": [
              "image",
              "video"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "maxBytes": {
          "type": "integer"
        },
        "note": {
          "type": [
            "string",
            "null"
          ]
        },
        "expiresAt": {
          "format": "date-time",
          "type": "string"
        },
        "uploadExpiresAt": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "mediaAssetId": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "createdAt": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "id",
        "workspaceId",
        "status",
        "accepts",
        "maxBytes",
        "note",
        "expiresAt",
        "uploadExpiresAt",
        "mediaAssetId",
        "createdAt"
      ],
      "type": "object"
    },
    "mediaAsset": {
      "anyOf": [
        {
          "additionalProperties": false,
          "properties": {
            "id": {
              "format": "uuid",
              "type": "string"
            },
            "workspaceId": {
              "format": "uuid",
              "type": "string"
            },
            "kind": {
              "enum": [
                "image",
                "video"
              ],
              "type": "string"
            },
            "status": {
              "enum": [
                "uploading",
                "processing",
                "ready",
                "failed"
              ],
              "type": "string"
            },
            "storageProvider": {
              "enum": [
                "supabase",
                "r2"
              ],
              "type": "string"
            },
            "storageBucket": {
              "type": "string"
            },
            "storageKey": {
              "type": "string"
            },
            "publicUrl": {
              "type": [
                "string",
                "null"
              ]
            },
            "filename": {
              "type": "string"
            },
            "mimeType": {
              "type": "string"
            },
            "sizeBytes": {
              "type": [
                "string",
                "null"
              ]
            },
            "width": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "height": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "durationMs": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "probe": {
              "type": "object"
            },
            "probeError": {
              "type": [
                "string",
                "null"
              ]
            },
            "covers": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "storageKey": {
                    "type": "string"
                  },
                  "width": {
                    "type": "integer"
                  },
                  "height": {
                    "type": "integer"
                  },
                  "atMs": {
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "storageKey",
                  "width",
                  "height",
                  "atMs"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "altText": {
              "type": [
                "string",
                "null"
              ]
            },
            "createdByAccountId": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdByAgentClientId": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "format": "date-time",
              "type": "string"
            },
            "updatedAt": {
              "format": "date-time",
              "type": "string"
            },
            "previewUrl": {
              "type": [
                "string",
                "null"
              ]
            },
            "coverFrames": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "atMs": {
                    "minimum": 0,
                    "type": "integer"
                  },
                  "width": {
                    "type": "integer"
                  },
                  "height": {
                    "type": "integer"
                  },
                  "url": {
                    "type": "string"
                  }
                },
                "required": [
                  "atMs",
                  "width",
                  "height",
                  "url"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "fitsPlatforms": {
              "items": {
                "enum": [
                  "x",
                  "linkedin",
                  "threads",
                  "bluesky",
                  "instagram",
                  "facebook",
                  "tiktok",
                  "youtube",
                  "sandbox"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "id",
            "workspaceId",
            "kind",
            "status",
            "storageProvider",
            "storageBucket",
            "storageKey",
            "publicUrl",
            "filename",
            "mimeType",
            "sizeBytes",
            "width",
            "height",
            "durationMs",
            "probe",
            "probeError",
            "covers",
            "altText",
            "createdByAccountId",
            "createdByAgentClientId",
            "createdAt",
            "updatedAt",
            "previewUrl",
            "coverFrames",
            "fitsPlatforms"
          ],
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "mediaUrl": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "uploadRequest",
    "mediaAsset",
    "mediaUrl"
  ],
  "type": "object"
}

Errors

[]

Annotations

{
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false,
  "readOnlyHint": true,
  "title": "Check a file upload"
}