← Back

Colony API for developers

Read and write your own Colony data from your own software. It is a plain REST API over HTTPS that speaks JSON. This is version 1.

Get started in three steps

  1. Sign in to Colony. You need a Colony account; the API only ever gives you access to your own company's data.
  2. Create a token. Open Settings, API Tokens (/ApiTokens). A personal token sees exactly what you see in the app and can be made read-only. A company key sees the whole company and is meant for system-to-system integrations; only an owner or admin can make one. The token is shown once. A token expires after 90 days unless you choose another date, and you can revoke any token on that page.
  3. Call the API with the token as a bearer token:
curl "https://colonys.io/api/v1/customers?per_page=5" \
  -H "Authorization: Bearer YOUR_TOKEN"

A read-only token can only use GET. Use a read-only personal token while you are trying things out.

What you get back

A single record or an action comes back as { "data": ... }. A list comes back as { "data": [ ... ], "meta": { "page": 1, "per_page": 5, "total": 42 } }. An error comes back as { "error": { "code": "...", "message": "..." } } with the matching HTTP status. A record you are not allowed to see answers 404, the same as one that does not exist.

Who sees what

A personal token sees what its person sees in Colony: an owner or admin sees the whole company, a manager sees themselves and their team, and a rep sees their own records. Visibility is checked on every request, so a role change takes effect at once. Every record belongs to one company, taken from the token; you never send a company id.

Limits and good manners

What is in the API

AreaWhat you can do
Customers and leadsList, read, create, update, soft delete; move a lead to a stage; upsert by your own system's id (PUT /customers/by-external/{source}/{id}) and in batches of up to 100
SalesQuotes and invoices, issue, convert a quote to an invoice, void, credit notes, payments, products and prices; recurring invoices
WorkTasks and boards, tickets, jobs, bookings
DocumentsDocument and form templates, shares and their status, e-signature envelopes, the signed PDF
LoyaltyCards, points and vouchers, stamp and redeem
InboxRead threads and messages
TeamUsers (company-wide tokens only)
EventsWebhook subscriptions and an event feed (below)

What can be created, changed or deleted depends on the resource; the reference below lists every call. There is no endpoint for sending SMS or WhatsApp messages yet, and email can only be sent as a ticket reply (POST /tickets/{id}/replies). Some things are also deliberately left out of the API (for example deleting data in bulk, exports and administration). Some areas are only present when that product is switched on for your company.

Webhooks

Subscribe with POST /api/v1/webhooks/subscribe to be told when something happens (for example lead.created or invoice.paid), or read the feed with GET /api/v1/events. Every delivery carries an X-Colony-Signature header: the hex HMAC-SHA256 of the raw request body using your subscription's secret. Check it before you trust a delivery. A Zapier or Make webhook can be pointed at the same subscription.

Reference

Questions and changes

Write to support@colonys.io. Your use of the API is covered by the Terms of Service and the Privacy Policy.

← Back