Skip to Content
eventdoordocs home

Get started with the REST API

Issue a scoped API credential and make your first call.

The Eventdoor REST API lets your own scripts and tools work with the hubs and broadcasts of your organizations. You call it with a scoped API credential that you issue in the admin.

A credential can call 12 operations: list and read hubs, and list, read, create, update and bulk-change broadcasts. The API reference lists every operation that accepts a credential; no other operation does.

How the API is organized

Platform
└── Organization        /organizations/{orgSlug}
    ├── Broadcast       /organizations/{orgSlug}/broadcasts/{broadcastSlug}
    └── Hub             /organizations/{orgSlug}/hubs/{hubSlug}
        └── Broadcast   /organizations/{orgSlug}/hubs/{hubSlug}/broadcasts/{broadcastSlug}

Every path starts with /organizations/{orgSlug}. Paths scoped to a hub add /hubs/{hubSlug}.

Before you start

  • You must be an owner or admin of the organization to issue its credential. A platform-wide credential is issued by a platform admin. See Who can issue a credential.
  • You need your organization's slug. It is the first part of the admin's address while that organization is selected: in /acme/settings/integrations, the slug is acme. An organization's page in the admin also shows it as Slug under Details.

Make your first call

Issue a credential

In the admin sidebar, open Settings, then the Integrations tab. Under API credentials, choose Issue credential.

In the Issue an API credential dialog, fill in three fields:

  • Name: what the credential is for, for example "Nightly schedule sync". Up to 100 characters.
  • Access: Read only or Read and write. See Authentication for what each allows.
  • Expires: In 30 days, In 90 days or In 1 year. The default is 1 year.

Next, Copy your new token shows the token. Choose Copy token, store it somewhere safe, then choose Done. You won't see this token again.

Copy your API base URL

The same API credentials section has an API base URL field with a copy button. It looks like this:

Base URL
https://<your platform's API host>/eventdoor/api/v1

Put the base URL and your token in environment variables so the examples below work as written:

Terminal
export EVENTDOOR_API="https://<your platform's API host>/eventdoor/api/v1"
export EVENTDOOR_TOKEN="<the token you copied>"

Call the API

List the hubs of your organization. Replace acme with your organization's slug.

List hubs
curl -s -H "Authorization: Bearer $EVENTDOOR_TOKEN" \
  "$EVENTDOOR_API/organizations/acme/hubs"

Read the JSON

The response lists the hubs, the total count and the paging state. The values here are illustrative:

Response
{
  "hubs": [
    {
      "id": "6f1c2a9e-0b7d-4c1e-9a52-3d8e4f7a1b20",
      "slug": "home-games",
      "name": "Home games"
    }
  ],
  "total": 1,
  "paging": { "next": null, "hasMore": false }
}

A real hub carries more fields; the reference lists them all. When paging.hasMore is true, read the next page as Pagination shows.

Next steps

List the broadcasts in a hub

List broadcasts in a hub:

List broadcasts
curl -s -H "Authorization: Bearer $EVENTDOOR_TOKEN" \
  "$EVENTDOOR_API/organizations/acme/hubs/home-games/broadcasts"

Create a broadcast

Create a broadcast with a Read and write credential. title is required. Keep it to 72 characters: a longer title is not refused, but only its first 72 characters are stored. A startsAt, if you send one, must be in the future, or the call is refused with 422. A new broadcast returns 201. A 400 on tagIds can arrive after the broadcast was created, since the tags are checked once it is saved: list the hub's broadcasts and look for the title before you create it again.

Create a broadcast
curl -s -X POST \
  -H "Authorization: Bearer $EVENTDOOR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title":"vs Celtics"}' \
  "$EVENTDOOR_API/organizations/acme/hubs/home-games/broadcasts"

Learn the rules

Keep the token on your server

Store the token in a secret store or your tool's secret settings. Never ship it in a browser or a mobile app: anyone who has it can call the API with its access until it expires or you revoke it.

Your platform's interactive reference

In the admin, Settings > Integrations has an API reference button. It opens your platform's own interactive copy of the reference, where Try it calls your platform directly.