Conventions

These rules hold across the whole /v1 API. The reference gives the details of each operation.

Base URL

https://api.missived.com/v1

On a self-hosted server, use your server's API URL. With the bundled proxy, the API sits under your site's /api path, for example https://chat.example.com/api/v1. The app's own reference at /developers shows the right URL for the server you're on.

Requests and responses

Lists and paging

Every list answers the same shape:

{ "data": [ … ], "next_cursor": "…" }

Messages come newest first. To follow a channel, ask for order=oldest: each page gives a next_cursor that you keep and pass back next time to get only what is new. An empty page still gives you a cursor to resume from.

Errors

Errors have a status code and a body like this:

{ "error": { "code": "insufficient_scope", "message": "This token doesn't have the messages:write scope." } }

code is stable and machine-readable; message is a sentence for a person and may change. Common codes:

Status Codes
400 invalid_request, invalid_cursor, invalid_embeds, embeds_not_allowed, invalid_components, components_not_allowed
401 unauthenticated, token_invalid, token_revoked, token_expired, account_suspended
403 insufficient_scope, org_not_allowed, forbidden
404 not_found
409 conflict, idempotency_in_progress
413 payload_too_large
422 idempotency_key_reused
429 rate_limited
500, 503 internal_error, unavailable

New codes can appear for new situations, so handle unknown codes by their status.

A thing in another org, or one this token can't see, always answers 404 not_found. Missived doesn't confirm that something exists before it checks whether you may see it.

The integration management routes (incoming webhooks, audit-log destinations, feeds) are older and answer { "error": "A sentence." } instead; for a token they add a code next to it. Their reference entries say so.

Caching with ETags

Every successful GET answers with an ETag header. Send it back as If-None-Match and, if nothing changed, you get 304 Not Modified with no body:

curl -i -H "Authorization: Bearer $MISSIVED_TOKEN" \
  -H 'If-None-Match: "<etag from last time>"' \
  https://api.missived.com/v1/orgs/<orgId>/channels

Idempotency keys

POSTs that create messages, channels and tasks accept an Idempotency-Key header, and so do interaction follow-ups. Use a unique value per thing you mean to create, such as a UUID or your own job id.

Missived keeps only the status and the created resource's id for a key, never the body. When you retry a job or handle an event that can arrive twice, reuse the same key: a fresh key can't recognise a repeat.

Rate limits

Versioning