Skip to main content
POST
Uploads an image to Gomry’s own storage and returns a permanent public URL. This is the write-then-reference counterpart to the image fields elsewhere in the API: cover_img on an event and the photo fields on an experience only ever accept a URL you already have hosted. This endpoint does the hosting. This endpoint does NOT attach the image to anything. Take the url it returns and set it yourself with PATCH /v1/events/{eventId} (cover_img) or PATCH /v1/experiences/{experience_id} (photos). Requires the events:write or the experiences:write scope. There is no separate uploads scope: uploading is only useful in service of one of those two resources.
The returned URL is permanent, public and unauthenticated — anyone with the link can open it, and there is no delete endpoint. Only upload images you intend to publish.

Idempotency

Pass an Idempotency-Key header (max 255 chars) to make retries safe. The first request performs the upload; subsequent requests with the same key within 24 hours replay the original response verbatim and add an Idempotent-Replay: true response header. Keys are scoped per API key.

Request Body

string
required
Base64-encoded image data. A data:<mime>;base64, prefix is tolerated and stripped.Max 6,000,000 characters of base64 (~4.4MB encoded, ~3.3MB decoded). The cap is on the encoded STRING because the request body limit applies to the JSON we receive; the decoded image is separately capped at 4MB.
string
required
MIME type of the image. One of image/jpeg, image/png, image/webp, image/gif.

Response

string
The hosted URL of the uploaded image. Use this as cover_img or a photo URL.
string
The stored MIME type.
integer
Size of the decoded image in bytes.
Returns 201 Created on success.

Errors