Matchai Docs

Add a photo or videoComing soon

Adds one photo or video at the end of the gallery, either uploaded (multipart/form-data) or copied from a public URL (application/json).

Coming soon. This is documented ahead of launch so you can plan your integration; it is not available yet.
POST
/listings/{listing_id}/media

Coming soon. Adds one photo or video at the end of the gallery, either uploaded (multipart/form-data) or copied from a public URL (application/json). Large photos are resized for the web; the original is kept.

Scopes: listings:write

Pricing: Included with the connection.

Authorization

headerAuthorizationBearer <matchai_<base62>>

A personal API key, sent as Authorization: Bearer matchai_…. Create keys in Matchai under Settings → Connectors → Advanced (for developers). A key starts with matchai_ followed by letters and digits, carries the scopes chosen when it was created, and can be revoked at any time. Keys reach only the account that created them: to serve other professionals, use Connect with Matchai.

Scope: listings:write

Path Parameters

listing_id*string

Listing id, or its slug.

Length1 <= length <= 200

Header Parameters

Idempotency-Key?string

A unique string (a UUID works). Retrying with the same key within 24 hours returns the first response instead of acting twice. Reusing a key with a different body returns 409 idempotency_key_reused.

Length1 <= length <= 255

Request Body

  1. body
file*string

The image or video file.

zone?MediaZone

gallery: the main gallery. neighbourhood: beside the area description. break_1, break_2: full-width breaks in the page, three photos each at most.

Value in"gallery""neighbourhood""break_1""break_2"

Response Body

The new media.

application/json
  1. response
id*string

Media id.

Length1 <= length <= 64
listing_id*string

Listing id.

Length1 <= length <= 64
type*string
Value in"image""video""drawing""audio""interactive"
url*string

The file.

Formaturi
position*integer

Order in the gallery, from 0.

Range0 <= value
zone*MediaZone

gallery: the main gallery. neighbourhood: beside the area description. break_1, break_2: full-width breaks in the page, three photos each at most.

Value in"gallery""neighbourhood""break_1""break_2"
is_cover*boolean

The first photo, used as the listing’s cover.

edit?|null
size_bytes?|

File size.

Range0 <= value
uploaded_at*string

Added.

Formatdate-time
Example Request
curl -X POST 'https://api.matchai.co/v1/listings/string/media' \  -H 'Idempotency-Key: 6f1d3c2a-0b7e-4f5a-9c8d-1e2f3a4b5c6d' \  -H 'Content-Type: application/json' \  -d '{  "url": "http://example.com"}'
Example Response
{  "id": "string",  "listing_id": "string",  "type": "image",  "url": "http://example.com",  "position": 0,  "zone": "gallery",  "is_cover": true,  "edit": {    "kind": "string",    "edited_from_media_id": "string",    "original_available": true  },  "size_bytes": 0,  "uploaded_at": "2019-08-24T14:15:22Z"}