For developers

Show Otahque's events on your own site, or in a calendar, from a program. Anyone may read published events; no account is needed.

Read events

GET /api/v1/events/
Published and cancelled events not yet ended, soonest first, twenty a page: follow next until it is null.
GET /api/v1/events/{id}/
One event. A draft, or an id that does not exist, is 404.
curl https://app.otahque.tech/api/v1/events/

Only what you need

starts_after, starts_before
A time with its offset: Z, or %2B05:30 in an address, since a plain + arrives as a space.
has_places
true or false.
status
published or cancelled.
curl "https://app.otahque.tech/api/v1/events/?has_places=true&starts_after=2027-01-01T09:00%2B05:30"

Limits

Each kind of caller may make a number of requests a minute: visitors 60, members 120, and each token 60 reads and 20 writes. Over a limit, the answer is 429: wait the seconds Retry-After says, then try again.

The rules we keep

  • Times are in UTC, ending in Z, with the event's time zone by name.
  • Errors come as problem details, application/problem+json.
  • Send If-None-Match with the ETag you were given: an unchanged event costs a 304 and no body.
  • Within /api/v1/, fields are only ever added; a change that would break a program gets /api/v2/.

Your own events

If you organize events, a program can create drafts and change your events at /api/v1/my/events/, under the same rules as the site.

  • Send the ETag you read back in If-Match: a change someone made since is never overwritten.
  • Add ?dry_run=true to see what a change would do, saving nothing.
  • From a program, send a token from your API tokens page as Authorization: Bearer otq_..., never in the address.

Problems

Invalid fields (422)
Each item in errors names a field with a JSON Pointer, such as #/capacity, and says what to fix.
Precondition (412, 428)
Read the event again, and send its new ETag in If-Match.

The contract

Every field, error, and header is described in OpenAPI 3.1, which tools and AI agents can read.

Download openapi.yaml