Saltar al contenido principal

Developer API

Campbooks has a public REST API that lets you reach your own workspace's data (email, documents, contacts, tags, document types, and Scout chat) from your own apps and scripts.

👉 Open the full interactive API reference →

The reference is generated from the OpenAPI specification, so you can also import it into Postman or Insomnia, or generate a client.

💻 Prefer the terminal? The Campbooks CLI wraps this API in a single binary — brew install notacamp/tap/campbooks, then campbooks login (browser sign-in, no API keys to copy).

Authentication

The API uses OAuth 2.0 client credentials: a credential acts as the user who created it, inside that user's workspace.

  1. In the app, go to Settings → API access and create a client. Pick the scopes it needs. The client secret is shown once — store it safely.
  2. Exchange the client ID and secret for a short-lived bearer token (valid 2 hours). Always pass a scope — a token with no scope can call nothing.
  3. Send the token as Authorization: Bearer <token> on every request.
# 1. Get a token.
TOKEN=$(curl -s -X POST https://app.campbooks.not-a-camp.com/api/oauth/token \
-d grant_type=client_credentials \
-d client_id=YOUR_CLIENT_ID \
-d client_secret=YOUR_CLIENT_SECRET \
-d "scope=emails:read" | jq -r .access_token)

# 2. Call the API.
curl https://app.campbooks.not-a-camp.com/api/v1/emails \
-H "Authorization: Bearer $TOKEN"

Scopes are a ceiling, not a grant of new power: a request must satisfy both the token's scope and the acting user's own permissions (for example, emails:send still requires that the user may send from the chosen account).

Scopes

ScopeGrants
emails:readList and read email messages, threads, and folders
emails:writeMark emails read/unread
emails:sendSend and reply to email
documents:readList and download documents
documents:writeUpload, update, approve, reject, and reclassify documents
contacts:readRead contacts
contacts:writeUpdate contacts and change their state
tags:readList tags
tags:writeAdd and remove tags on emails
document_types:readList document types
scout:readRead Scout chat threads and messages
scout:writeCreate Scout threads and send messages

Conventions

  • Base path: /api/v1. Single resources are { "data": { … } }; collections are { "data": [ … ], "meta": { … } }.
  • Pagination: ?page= and ?per_page= (default 25, max 100).
  • Rate limit: 600 requests/minute per client.
  • Errors: { "error": { "code": "…", "message": "…" } }. A resource you can't see returns 404, not 403, so the API never reveals another workspace's data.

See the interactive reference for every endpoint, parameter, response shape, and error code.