Finish an upload
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`.
/v1/orgs/{org}/brands/{brand}/files/{file}/finalizeOnce 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.
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
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/string/finalize"{ "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"}Get a file GET
Its state, and where it is read once ready. Needs `org.brands.view`.
Start an upload POST
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`.