Media
Start a presigned upload
POST
PUT the file to upload_url with exactly the Content-Type and Content-Length in upload_headers (both are signed; a mismatch gets 403 from storage), then call complete.
Requires the write scope.
bearerheader
AuthorizationBearer <token>An API key (tb_live_...) from the dashboard, or an OAuth access token.
Tebar-Profile?stringLimits an owner key to one profile (id or external_id). Unknown: 404 profile_not_found.
application/json- body
mime_type*stringValue in
"image/jpeg""image/png""video/mp4""video/quicktime"size_bytes*integerRange
0 < value <= 314572800keep?booleanWhere to upload.
application/json- response
id*stringFormat
uuidprofile_id*stringFormat
uuidtype*stringValue in
"image""video"mime_type*stringsize_bytes*integer|nullwidth*|Display width (video rotation applied).
height*integer|nullduration_ms*integer|nullframe_rate*|Average frames per second of a video.
status*stringValue in
"pending""ready""failed""expired"public_url*string|nullposter_url*|Videos: a small JPEG still, ready shortly after upload.
alt_text*string|nullkeep*booleanKept in the media library. Otherwise removed 30 days after the last post using it finished, or 7 days after upload if unused.
created_at*stringFormat
date-timeupload_url*stringPUT the file here with exactly the upload_headers.
upload_headers*curl -X POST 'https://api.tebar.app/v1/media' \
-H 'Content-Type: application/json' \
-d '{
"mime_type": "image/jpeg",
"size_bytes": 1
}'Example Response
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"profile_id": "bfcb6779-b1f9-41fc-92d7-88f8bc1d12e8",
"type": "image",
"mime_type": "string",
"size_bytes": 0,
"width": 0,
"height": 0,
"duration_ms": 0,
"frame_rate": 0,
"status": "pending",
"public_url": "string",
"poster_url": "string",
"alt_text": "string",
"keep": true,
"created_at": "2019-08-24T14:15:22Z",
"upload_url": "string",
"upload_headers": {
"property1": "string",
"property2": "string"
}
}