Gamma API

Sign an upload of the organization logo

POST
/api/organizations/{slug}/logo/upload-url

The first of two steps: PUT the image at the URL answered, then confirm it with the key. PNG, JPEG or WebP, at most 2 MiB; checked again on the uploaded file.

Who may call it: An owner, security admin or admin of the organization. API keys: no.

Authorization

session
cookiegamma.session_token<token>

The session cookie a sign-in sets. Over HTTPS its name carries the __Secure- prefix. Browsers send it on their own; other clients keep it from the sign-in response.

Path Parameters

slug*string

The organization's slug, as in its URL.

Request Body

application/json
  1. body
contentType*string

image/png, image/jpeg or image/webp.

Length1 <= length <= 100
sizeBytes*integer

The file's size in bytes; at most 2 MiB.

Range0 < value <= 9007199254740991

Response Body

OK.

application/json
  1. response
url*string

PUT the image here, straight to storage; valid for five minutes.

Formaturi
key*string

Where it will be stored; confirm the upload with it.

Example Request
curl -X POST 'http://localhost:3000/api/organizations/string/logo/upload-url' \  -H 'Content-Type: application/json' \  -d '{  "contentType": "string",  "sizeBytes": 1}'
Example Response
{  "url": "http://example.com",  "key": "string"}