Content uploads
Status: Current (Scale plan). Posting a clip is a three-step flow: issue a signed upload URL, push the bytes directly to storage, then confirm. Confirming returns anupload_id you hand to a post run.
Both endpoints need uploads:write. The upload PUT in step 2 goes straight to storage with the Supabase storage client — the SDK does not bundle @supabase/supabase-js, so step 2 uses your own copy.
Endpoints
Step 1 — issue a signed URL — POST /v1/content/uploads
Body: { "account_username", "filename" } (filename is a filename only — no path separators). Returns 201:
Step 2 — upload the bytes
Push the file to the signed URL with the Supabase storage client’suploadToSignedUrl(path, token, file):
Step 3 — confirm — POST /v1/content/uploads/confirm
Returns
200 with { "upload_id", "status": "synced" }.
If confirm returns
422 upload_object_missing, the upload PUT never landed. It is recoverable — re-upload the bytes to the signed URL, then confirm again. If the signed token has expired, re-issue with step 1 first.Then enqueue the post
Hand theupload_id to a post run — send an Idempotency-Key (a UUID) so a retry doesn’t double-post:
upload_id is its idempotency key.
Next
- Runs — enqueue the post that consumes the
upload_id. - SDK quickstart — the full register → upload → post walkthrough.
- Accounts — register the handle a clip posts to.