Provider readinessInterfaces and provider certification may evolve. Check account capabilities before production use.Read the readiness contract

Upload and process media

Create an upload, send bytes directly, complete the asset, and wait for media readiness.

Direct answer

Request an upload URL with file metadata, upload the file using the returned headers, then call the media complete endpoint. Reference the media ID in posts only after processing has produced a ready asset or a clear failure result.

What this means in practice

Request an upload URL with file metadata, upload the file using the returned headers, then call the media complete endpoint. Reference the media ID in posts only after processing has produced a ready asset or a clear failure result.

Use the documented brand and account boundaries consistently across the scheduler, REST API, SDK, MCP tools, SSE consumers, and webhooks. That makes the same social operation explainable to an operator and reproducible by an integration.

Implementation checklist

  1. Validate the user's file selection before requesting an upload URL.

  2. Send file_name, kind, content_type, size_bytes, and optional source_url.

  3. Upload bytes to upload_url without routing large files through your application server.

  4. Call /complete and observe processing state for thumbnails, variants, or transcoding.

  5. Use the media library resource until the user deletes it.

Example request

This example uses a server-side API key and an explicit brand selection. Replace placeholder values and keep credentials out of browser bundles, client logs, and source control.

Shell
curl --request POST \
  --url 'https://postapi.app9.co/v1/media/create-upload-url' \
  --header 'Authorization: Bearer APP9_POST_API_KEY' \
  --header 'X-App9-Post-Brand: BRAND_ID' \
  --header 'Content-Type: application/json' \
  --data '{
  "file_name": "launch-video.mp4",
  "kind": "video",
  "content_type": "video/mp4",
  "size_bytes": 18432000
}'

Operational details

Incomplete uploads are temporary; completed media remains in the brand library until deletion.

Server validation checks file signatures in addition to the declared MIME type.

Provider validation still runs when the media is attached to specific target accounts.

Common mistakes to avoid

Protect intent, tenant boundaries, and provider state.
  • Do not trust a filename extension as proof of media type.
  • Do not attach an uploading or failed asset to a post and assume dispatch will wait indefinitely.
  • Do not expose storage object keys or private credentials in the client.

Was this useful? This documentation is reviewed against the public App9 Post contract. Use the API reference and live capability response for machine-enforced details.

Open API reference