Synq Docs
Management APIFiles

Start an upload

Authorizes one upload for a purpose and answers where to PUT its bytes: a URL signed for 5 minutes, for exactly this type and length, straight to Synq's storage. Then call `…/finalize`. A brand has at most 5 uploads of a purpose waiting at once. `theme_background` needs a plan with the advanced theme (`branding.advanced_theme`). Needs `org.brands.edit`.

POST/v1/orgs/{org}/brands/{brand}/files

Authorizes one upload for a purpose and answers where to PUT its bytes: a URL signed for 5 minutes, for exactly this type and length, straight to Synq's storage. Then call …/finalize. A brand has at most 5 uploads of a purpose waiting at once. theme_background needs a plan with the advanced theme (branding.advanced_theme). Needs org.brands.edit.

Authorization

bearer
AuthorizationBearer <token>

An org API key (sk_live_…, sk_test_…), or an access token from the Synq issuer (the synq brand, on the accounts host) for this API.

In: header

Path Parameters

org*string
brand*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/v1/orgs/string/brands/string/files" \  -H "Content-Type: application/json" \  -d '{    "purpose": "brand_logo",    "content_type": "image/png",    "content_length": 1  }'
{  "id": "string",  "purpose": "string",  "status": "string",  "visibility": "public",  "url": "string",  "content_type": "string",  "size": 0,  "width": 0,  "height": 0,  "sha256": "string",  "rejected_reason": "string",  "declared_type": "string",  "declared_size": 0,  "expires_at": "string",  "created_at": "string",  "ready_at": "string",  "upload": {    "method": "PUT",    "url": "string",    "headers": {      "property1": "string",      "property2": "string"    },    "expires_at": "string"  }}