Synq Docs
Management APIFiles

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`.

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

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.

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
file*string

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"}