Skip to content

The Collr API

Read Collr's public events from your own site or program, and manage the events you run. Free, with a key you make in your settings.

What it is

The API is a way for a program to use Collr without a person clicking through the site. It does two things. It reads the public events, the same ones the events page lists. And, for somebody who runs events, it adds, changes, calls off and deletes their own, under the same rules as the dashboard.

It is free. It carries no member data at all: not who is going to an event, not who added it, nothing from anybody’s page. Explicit events are never in it, as they are never in search engines or the feeds.

If all you want is a calendar that stays up to date, the calendar feed and RSS need no key and no code.

Getting a key

Every request carries a key, which says whose it is. Any member can make one under Settings, API keys. It is shown once, when you make it; we keep a scrambled copy only, so we cannot show it again. You can hold 5 at a time and revoke any of them, which stops it working at once.

Treat a key like a password. Anybody holding it can read events and manage yours as you. Keep it on a server, never in a web page or an app somebody can take apart.

Send it in a header with each request:

curl https://collr.app/api/v1/events \
  -H "Authorization: Bearer collr_your_key_here"

A key may make 120 requests a minute. Past that the answer is a 429 until the minute has passed.

Reading events

Every address below starts with https://collr.app/api/v1.

GET /events

Upcoming public events, soonest first. Optional filters: category, country (two letters, such as GB), town, badge (verified, trusted or partner) and first_timers=1. limit is how many to send (up to 100; 50 if you do not say) and offset how many to skip. The answer is { "total", "limit", "offset", "events": [...] }.

GET /events/{slug}

One public event, by its slug (the last part of its page’s address) or its id. The answer is { "event": {...} }. An event that is not public is a 404, the same as one that does not exist.

GET /organisers/{handle}/events

The upcoming public events one organiser runs.

An event looks like this:

{
  "id": 912,
  "slug": "example-pups-social",
  "url": "https://collr.app/events/example-pups-social",
  "name": "Example Pups Social",
  "description": "A relaxed afternoon social.",
  "categories": ["meet", "pup"],
  "starts_at": "2026-11-21T13:00:00.000Z",
  "ends_at": "2026-11-21T17:00:00.000Z",
  "next_starts_at": "2026-12-19T13:00:00.000Z",
  "next_ends_at": "2026-12-19T17:00:00.000Z",
  "repeats": "Every month on the 3rd Saturday",
  "status": "scheduled",
  "cancellation_note": null,
  "postponed_to": null,
  "location": "The Example Arms, 1 Example Street, Leeds",
  "address": { "street": "1 Example Street", "locality": "Leeds",
               "region": "England", "postcode": "LS1 1AA", "country": "GB" },
  "latitude": 53.79, "longitude": -1.54,
  "tickets": { "summary": "From £5", "ticketed": true, "price": "5.00",
               "currency": "GBP", "url": "https://tickets.example/pups",
               "tiers": [{ "name": "Standard", "price": 5, "note": null, "sold_out": false }] },
  "more_information_url": "https://examplepups.example/social",
  "image_url": "https://…/event-images/abc.jpg",
  "welcomes_first_timers": true, "has_explicit_area": false, "non_sexual": false,
  "badge": "verified",
  "organiser": { "name": "Example Pups", "handle": "examplepups",
                 "url": "https://collr.app/examplepups" },
  "organiser_name": "Example Pups"
}

Times are in UTC. starts_at is the first date of an event that repeats, and next_starts_at the date coming up. status is scheduled, cancelled or postponed. organiser is null when no Collr account runs the event; organiser_name then carries the name the listing gave.

Example: a Telegram bot

A bot that answers /whatson Leeds in a Telegram chat with the next five events there, each with a link to its page on Collr. It is written in Python and needs nothing installed beyond Python itself.

  1. In Telegram, talk to @BotFather, send /newbot and follow its questions. It gives you the bot’s token.
  2. Make a Collr key, as above.
  3. Save the code below as whatson_bot.py on a server and start it with both secrets, as its first lines show. It keeps running and answers as messages arrive. Add the bot to a group, or message it directly.
# whatson_bot.py: answers "/whatson Leeds" in Telegram with the next
# five Collr events in that town, or anywhere if no town is given.
#
#   COLLR_KEY=collr_your_key_here TELEGRAM_TOKEN=123456:your_token \
#     python3 whatson_bot.py

import json
import os
import urllib.parse
import urllib.request

COLLR = "https://collr.app/api/v1"
TELEGRAM = "https://api.telegram.org/bot" + os.environ["TELEGRAM_TOKEN"]


def fetch(url, headers=None, data=None):
    request = urllib.request.Request(url, data=data, headers=headers or {})
    with urllib.request.urlopen(request, timeout=60) as reply:
        return json.load(reply)


def next_events(town):
    query = {"limit": 5}
    if town:
        query["town"] = town
    answer = fetch(COLLR + "/events?" + urllib.parse.urlencode(query),
                   {"Authorization": "Bearer " + os.environ["COLLR_KEY"]})
    return answer["events"]


def say(chat_id, text):
    data = urllib.parse.urlencode({"chat_id": chat_id, "text": text,
                                   "disable_web_page_preview": "true"})
    fetch(TELEGRAM + "/sendMessage", data=data.encode())


last_update = 0
while True:
    # Telegram keeps this open for up to 50 seconds, until a message comes.
    updates = fetch(f"{TELEGRAM}/getUpdates?timeout=50&offset={last_update + 1}")
    for update in updates["result"]:
        last_update = update["update_id"]
        message = update.get("message") or {}
        words = message.get("text", "").split(maxsplit=1)
        # In a group the command arrives as /whatson@YourBot.
        if not words or words[0].split("@")[0] != "/whatson":
            continue
        town = words[1].strip() if len(words) > 1 else ""
        lines = []
        for event in next_events(town):
            day = (event["next_starts_at"] or event["starts_at"])[:10]
            lines.append(f"{event['name']}, {day}\n{event['url']}")
        if lines:
            lines.append("Listings from Collr.")
        say(message["chat"]["id"],
            "\n\n".join(lines) or f"Nothing coming up in {town or 'any town'}.")

The town has to be spelt as the events page spells it: Leeds, not leeds. Dates are in UTC. Each command is one request to Collr, well inside the limit of 120 a minute for a chat, but a bot in a busy group should keep the answer for a few minutes rather than ask again for every message. The link to each event and the closing “Listings from Collr” are what using what you read asks for.

To post to a channel instead, run the same next_events and say once a day from a timer, with the channel’s name (such as @yourchannel) as the chat, and the bot made an admin of the channel.

Managing your events

These work on the events you run: your own, and those of any event page whose team you are on. Nobody else’s, whoever you are.

GET /my/events

Every event you run, newest first, whatever its state. Each has two more fields: approval (approved means public; pending is waiting for us) and explicit.

POST /events

Add an event. Send JSON. Four fields are needed: name, location, category (at least one, from the list below) and starts_at (a date and time with its time zone, such as 2026-11-21T13:00:00Z). The event is yours unless you name an event page you are on the team of in organiser, by its handle.

An event from somebody with a Verified, Trusted or Partner badge goes live at once and has to state what its badge asks. Anybody else’s waits for approval, as it does from the dashboard.

{
  "name": "Example Pups Social",
  "location": "The Example Arms, 1 Example Street, Leeds",
  "starts_at": "2026-11-21T13:00:00Z",
  "ends_at": "2026-11-21T17:00:00Z",
  "description": "A relaxed afternoon social.",
  "category": "meet,pup",
  "is_ticketed": true,
  "ticket_price": 5,
  "ticket_currency": "GBP",
  "ticket_url": "https://tickets.example/pups",
  "url": "https://examplepups.example/social",
  "is_recurring": true,
  "recurrence_unit": "month",
  "recurrence_month_pattern": "nth_weekday",
  "welcomes_first_timers": true
}

category is one or more of these, with commas between: munch, club_night, workshop, meet, pup, leather, rubber, festival, contest, play_party, market, fundraiser, furry, bear, neoprene, bondage, other.

To give the event a picture, send image_url: the https address of a JPEG, PNG, WebP, GIF or AVIF of 8 MB or less. We fetch it once and keep our own copy, so it need not stay there. On a later change, leave it out to keep the picture, or send null to remove it.

Other fields, all optional: capacity, is_nsfw, nsfw_areas, non_sexual, photo_policy and rules (lists), photo_policy_note, rules_note, first_timer_note, the door answers (photo_id_policy, members_only, pre_booking_required, cash_only_door, no_entry_after, minimum_age, door_fee), the access answers (step_free_access, accessible_toilet, gender_neutral_toilets, seating, quiet_space, dry_event, assistance_dogs), and for an event that repeats recurrence_interval, recurrence_month_pattern (one of day_of_month, nth_weekday or last_weekday, read off the first date), recurrence_end_type, recurrence_ends_on and recurrence_ends_after.

PUT /events/{id}

Replace an event you run. Send the whole event again, as when adding it: a field you leave out is cleared. Three things stay as they are unless you send them: its picture, who runs it, and whether it is explicit.

PATCH /events/{id}

Change some of an event you run and leave the rest. Send only what is changing: { "starts_at": "2026-11-21T19:00:00Z" } moves it and touches nothing else. Send a field as null to clear it.

POST /events/{id}/cancel

Call an event off, or put it back on. Send { "state": "cancelled", "note": "…" }; state is cancelled, postponed, or null to put it back on. Everybody going or interested is told, in the app and by email, so an event can be changed this way four times a day. A postponed event can carry "new_date": "2027-03-14" (null takes it away): its listing says the new date, and it moves itself there once the old date has passed.

DELETE /events/{id}

Delete an event. It is gone for good, and the people who were going are not told. To say a night is off, cancel it. On an event page, Owners and Co-organisers can delete and cancel; a Helper can add and change.

When it says no

Every refusal has the same shape, with a code a program can test and words for you:

{ "error": { "code": "invalid", "message": "starts_at: Invalid input" } }
  • 400, bad_request: the request could not be read.
  • 401, unauthorised: no key, a revoked key, or the account behind it is not in good standing.
  • 403, forbidden: the key is fine, but it may not do that.
  • 404, not_found: no such event, or not one you may see or change.
  • 422, invalid: a field is wrong; the message names it.
  • 429, too_many_requests: slow down.

Using what you read

Where you show an event you read from Collr, link to its page on Collr (the url field) and say it came from Collr. Do not keep copies for longer than you need: an event can be called off or changed at any time, and what you show should say what its page says.

The address starts with /api/v1. Within v1, a field is never renamed or removed, and new ones may appear, so write your program to ignore fields it does not know.

Something missing?

Tell us what you are building and what it needs. A field we add is a promise we keep, so we would sooner hear first.