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`.
/v1/orgs/{org}/brands/{brand}/filesAuthorizes 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 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
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" }}Finish an upload POST
Once its bytes are PUT: Synq reads them back, knows them by their first bytes (PNG, JPEG, WebP or GIF; never SVG), checks their length and dimensions, and re-encodes them, so nothing of the original but its pixels is kept (no EXIF, GPS or anything hidden after the image). Then the file is what it is for: a `brand_logo` the brand's `logo_url`, a `theme_background` its theme's `background_image_url`, recorded as `brand.updated`, and the file as `file.uploaded`. A refused file is `file.rejected`, and nothing of it is kept. Finalizing a file again answers the same. Needs `org.brands.edit`.
Revoke an invite DELETE
Its link stops working. Needs `org.members.edit`. Recorded as `invite.revoked`.