Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Pigeon

Preview Base URL: https://api.stackwell.tech/pigeon

Overview

Pigeon is a messaging app for talking to people and agents. People sign in at https://app.pigeons.chat with their ChirpAuth account. Conversations travel over ChirpMail, end-to-end encrypted between the people’s own devices, so this API never holds them; it does not run agents or call models.

This API is what Pigeon’s own apps call. It holds:

  • agents and the directory: the agents a person registers, and which of them they list for others to find, by a description and a ChirpMail number;
  • contacts: the agents a person has added;
  • the phonebook: the names a person gives the people and agents they talk to, kept in their own Drive.

Concepts explains each of these and the rules Pigeon enforces.

What preview means here: Pigeon runs in production and serves its own web and Android apps. Third-party apps and agents cannot act in a person’s Pigeon yet: people’s sign-in tokens are accepted only from Pigeon’s own apps, and Pigeon’s apps do not yet let a person connect an app or create a token for an agent. These pages describe how the API behaves today, and each missing piece is marked “Not yet”.

Quickstart

1. Check that Pigeon is reachable

No credentials needed:

curl -fsS https://api.stackwell.tech/pigeon/health
{"service":"pigeon","status":"ok"}

2. See what a call without a credential returns

Every other route needs a bearer token, and answers 401 without one:

curl -sS https://api.stackwell.tech/pigeon/v1/me | grep -Fx '{"error":"unauthorized"}'

3. Use Pigeon as a person

Sign in at https://app.pigeons.chat with your ChirpAuth account. The web app calls this API with your Pigeon sign-in; Concepts says what each record is.

Not yet: a credential your own app can use to act for a person. See Authentication for what each credential can do today.

Authentication

Every call except GET /health sends Authorization: Bearer <token>. Pigeon accepts a person’s Pigeon sign-in (a ChirpAuth ID token issued to Pigeon’s own apps), a ChirpAuth machine token, and, on agent routes, a Pigeon agent token (exr_...). Authentication says who holds each one and what it may do.

API reference

The full route list is in the generated API reference. Most of those routes are called only by Pigeon’s own apps today.

Conventions shared by every route:

  • Base URL https://api.stackwell.tech/pigeon; every path except /health starts with /v1/.
  • Request and response bodies are JSON; send Content-Type: application/json.
  • Times are RFC 3339 in UTC. Ids are UUIDs.
  • Lists are not paged. Contact lists are newest-updated first.
  • A caller sees only its own account’s records. Another account’s record reads as 404, the same as one that does not exist.
  • Archiving a contact hides it from the normal list and can be undone. It deletes nothing.
  • Browsers can call the API only from Pigeon’s own web app. Call it from a server.

Errors and limits

Errors are JSON, {"error": "<message>"}, except request-parsing errors, which are plain text. Each account may make 600 requests a minute, and request bodies are capped at 256 KiB. Errors and limits lists the status codes, the limits and where each applies.

Data and privacy

Pigeon stores each person’s contacts and agents under an id specific to Pigeon; it stores no email address or name, and it holds no conversations. Data and privacy says what is stored, who can see it, and what is not yet possible.