Skip to main content

Base URL

All paths in this reference are relative to that base URL.

Authentication

Integrations authenticate using the OAuth 2.0 client credentials grant.

1. Obtain an access token

POST /oauth2/token exchanges client_id and client_secret for a JWT. See Obtain access token for the full request format.
The response includes access_token, expires_in, and token_type (Bearer). There is no refresh token — request a new access token when it expires.

2. Call the API

Every other route requires the access token:
The JWT must include a valid account context (set automatically for integrations linked to your account). Requests without it receive 401 with:

Routes

Authentication

Objects API

Routers API

Dispatch

Object types

The object type is inferred from the path segment: Every response also includes created_at and updated_at (ISO 8601 UTC). When an object is archived, archived_by is added automatically.

Response format

All object endpoints return a flat JSON object. Custom field values appear at the top level next to id and external_id (there is no nested fields object).

Archived objects

DELETE archives the object; the record is retained with archived set to a timestamp.

Default properties

When the properties query parameter is omitted, each type returns its default field set from the table above, plus created_at and updated_at. Use ?properties=phone to request additional fields beyond the defaults (not a replacement list). Invalid or disallowed property names return 400. Supported on GET list, GET by id, and PATCH update responses.

List pagination

GET on a collection returns:
Query parameters: limit (default 10, max 100), offset (default 0), archived=true to include archived rows.

Write requests

POST (create) and PATCH (update) use the same JSON shape: a top-level fields object whose keys are field internal names.
On create, send the fields you want to set. On update, send only the fields you want to change. POST responds with 201 and the created object.

System-managed fields

These fields cannot be sent in body.fields. Attempts return 400 (for example Field cannot be set: record_id): These fields remain readable via ?properties= on GET and PATCH responses.

Field validation

Validation is atomic: if any field in body.fields fails, the entire create or update is rejected with 400 and nothing is written. Enumeration allowed values come from the database (field.values for that field), including options added in the app — not a fixed list in code.

Required fields (POST create only)

PATCH does not require these fields, but every key in fields must exist on the object type and pass type validation.

Duplicate prevention (POST / PATCH)

POST and PATCH reject duplicate active records (non-archived) within the same account and object type. Conflicts return 409 with field indicating which key collided. Deals and tickets have no other business unique keys; duplicate deal_name / ticket_name values are allowed unless external_id is provided. Example responses:
  • Re-sending the same POST body with the same key does not create a second record.
  • website_url variants such as https://www.foo.com and foo.com are treated as the same company.
  • Archived records are ignored; a new active record may reuse a key from an archived one.
  • Concurrent requests with the same key may still race without a database unique constraint (application-level check only).

Routers

GET /routers returns a paginated list of routers for the authenticated account. GET /routers/{routerId} returns a single router with flattened settings, users, and teams. See List routers and Get router.

Dispatch

POST /dispatch/router runs router assignment for an object. The body must include router_id and object_id. See Dispatch router.

Create records

Product overview for records and fields in Routera.