Skip to content

API reference

Every installation ships its own API reference, generated from the code that serves the API. It always matches the version you run: when you update a self-hosted installation, the reference updates with it.

You can open it in three ways:

Where URL Who can open it
Settings › API reference inside a workspace /t/<workspace>/settings/api-docs Every member of the workspace (no permission needed)
The API reference button in the toolbar of Settings › API keys same page Members with api_keys:manage
The public page of the installation /docs/api Anyone, without signing in

The public page shows exactly the same reference with the product name in the header. The document describes endpoints and schemas only: it never contains workspace data.

Behind the viewer there is a standard OpenAPI 3.1 document that you can download and feed to code generators, API clients and testing tools.

The API is split in modules, each with its own OpenAPI 3.1 document, plus a merged document that contains all of them. None of these URLs needs authentication.

URL Content
/api/v2/openapi/all.json Merged document of the whole public v2 API (436 operations). The viewer uses this one. Cached for 5 minutes.
/api/v2/openapi Index: { "merged": "/api/v2/openapi/all.json", "documents": [ { "id", "title", "url" } ] }
/api/v2/openapi.json CRM, automations & commerce
/api/v2/openapi/email.json Email marketing
/api/v2/openapi/analytics.json Web analytics (its paths are relative to /api/v2/t/{slug}/analytics)
/api/v2/openapi/publishing.json Forms, bookings & landing pages, including e-signature templates and requests
/api/v2/openapi/reports.json Reports & dashboards
/api/v2/openapi/webhooks.json Outgoing webhooks
/api/v2/openapi/domains.json Domains

What the merged document contains:

  • servers: one entry, /api/v2/t/{slug}, with the variable slug (default demo). The URL is relative: tools resolve it against the host you downloaded the document from, or you set the full base URL yourself (https://<your dashboard host>/api/v2/t/<workspace>).
  • security: the apiKey scheme (HTTP bearer), described as a tenant API key scoped to a subset of permissions. Module documents also declare a session scheme (the __Host-sid cookie) used by the dashboard.
  • paths: every operation, with summary, description, tags, parameters, request body, responses and two extensions:
    • x-amable-permission: the permission the operation requires (for example contacts:write);
    • x-amable-module: the module the operation comes from (crm, email, analytics, publishing, reports, webhooks, domains).
  • Every operation lists the standard error answers 401, 403, 404, 409 and 422, with the shared error schema { error, message?, details? }.
  • tags and x-tagGroups: tags grouped by module, used for navigation.
  • components.schemas: the named schemas (most schemas are inlined in the operations). If two modules ever define different schemas with the same name, the second one is renamed with the module prefix (<Module><Name>) and its references are rewritten, so the merged document stays valid.
Module (tag group) Tags
CRM, automations & commerce Appointments, Automation folders, Automations, Commerce settings, Companies, Contacts, Conversations, Custom fields, Imports, Invoices, Notes, Opportunities, Orders, Payments and refunds, Pipelines, Product categories, Products, Promo codes, Saved searches, Search, Settings, Subscription plans, Subscriptions, Tags, Tasks
Email marketing Broadcasts, Dynamic Content snippets, Email messages, Email settings, Email templates, Suppressions
Web analytics Analytics
Forms, bookings & landing pages Booking calendars, Booking event types, Bookings, E-signature requests, E-signature templates, Form connections, Form submissions, Forms, Landing page edit lock, Landing page folders, Landing pages, Media, Saved sections
Reports & dashboards Reports
Outgoing webhooks Webhooks
Domains Domains

The viewer is built into the app (no third-party script) and renders the merged document in two columns.

Left column (sidebar):

  • A search box, Search endpoints. It matches the method, the path, the summary and the permission of each operation (for example post contacts, orders:refund or /broadcasts). While you type, the sidebar selection is ignored and every match is listed.
  • Overview · N, where N is the total number of operations. Clicking it returns to the overview.
  • One block per module (the tag groups above), listing its tags with the number of operations of each. Clicking a tag shows only its operations.

Right column:

  • On the overview: the API title and version, its description (authentication, permissions, pagination, idempotency and error format), a ready-made curl example for your installation, and the line OpenAPI 3.1 document: with a link to openapi/all.json. Below it, the first 25 operations, then the note Pick a section on the left to see the other N endpoints.
  • One card per operation:
    • the method as a colored badge (GET blue, POST green, PUT and PATCH amber, DELETE red), the path, and the required permission next to a lock icon;
    • the summary as the card title and the description below it;
    • Parameters: name, location (path, query), type, a red required marker when needed, and the description;
    • Request body: the JSON schema as a tree: each property with its name, type, required marker, allowed values for enums and description. Nested objects and arrays of objects expand with a click (up to five levels); a schema that refers to itself shows ↺ Name instead of looping. When a body accepts alternatives, each one is shown as Variant 1, Variant 2, and so on;
    • Responses: one line per status code with its description. Successful answers (2xx, green) are expanded and show their schema; error answers (amber) are collapsed.
  • No endpoints match. appears when the search finds nothing.

The viewer is read-only: it does not send requests. Use the curl example or your own client to try calls.

  1. Open Settings › API reference.

  2. Type what you are looking for in Search endpoints, for example refund, or pick a tag in the sidebar, for example Orders.

  3. Read the permission next to the path: your API key must include it.

  4. Open Request body to see every field, which ones are required and their limits, then check the Responses for the shape of the answer.

  1. Open https://<your dashboard host>/api/v2/openapi/all.json in a browser, or download it:

    Terminal window
    curl -o amabledata-openapi.json https://crm.example.com/api/v2/openapi/all.json
  2. If you only need one module, download its document instead (see the table above), for example /api/v2/openapi/email.json.

  3. Download it again after each update of the installation to pick up new endpoints and fields.

Any OpenAPI 3.1 code generator works. Two common choices:

  1. Generate type definitions from the merged document:

    Terminal window
    npx openapi-typescript https://crm.example.com/api/v2/openapi/all.json -o src/amabledata.d.ts
  2. Use the generated paths type with a small typed fetch wrapper, or with openapi-fetch:

    import createClient from 'openapi-fetch';
    const api = createClient({
    baseUrl: 'https://crm.example.com/api/v2/t/acme',
    headers: { Authorization: `Bearer ${process.env.AMABLE_KEY}` },
    });
    const { data, error } = await api.GET('/contacts', { params: { query: { limit: 50 } } });

Tips for generated clients:

  • Set the base URL explicitly: the servers entry is relative and its default slug is a placeholder.
  • Send Idempotency-Key on POST requests that create things; most generators let you add a header per call.
  • Treat unknown fields and enum values as normal: v2 grows additively.
  • Read x-amable-permission to build the list of scopes your integration needs, then create an API key with exactly those.
Element Where it comes from Example
Method and path The route POST /orders/{id}/refunds
Summary Route metadata “Record a full or partial refund (idempotent by transaction_id)”
Permission x-amable-permission orders:refund
Module x-amable-module crm
Parameters Path and query schemas limit integer 1-200, default 50
Request body JSON schema, strict (unknown keys rejected) amount_minor integer, required
Responses Success schema plus the shared error responses 201, 401, 403, 404, 409, 422
  • The account and sign-in routes used by the dashboard.
  • API key management (/api/t/<workspace>/api-keys), the contact erasure and data-request endpoints, the marketplace app API (/api/v2/t/<workspace>/apps/…) and the OAuth server for apps (/api/apps/v1/…). These are described in REST API and Build an app.
  • The site-key analytics API (/api/v2/analytics/…) and the public tracking endpoints of the edge worker. See Tracker protocol.
  • Reading the reference and downloading the documents needs no permission and no sign-in.
  • Calling the operations needs a credential with the permission shown on each one. See REST API.
  • The merged document is cached by browsers and proxies for 5 minutes (Cache-Control: public, max-age=300); the module documents are not cached.
Symptom Cause Fix
The viewer shows an error instead of the reference The installation could not serve /api/v2/openapi/all.json Open the URL directly to see the server answer; check that the core worker is deployed.
A newly added endpoint is missing The browser kept the previous document Reload after 5 minutes, or hard-refresh.
Generated client calls /api/v2/t/demo/... The default value of the slug server variable was used Set the base URL with your own workspace slug.
Generated client sends requests to the wrong host The relative server URL was resolved against a local file Set the full base URL in the client configuration.
Generated types are very large or slow to compile The merged document covers 436 operations Generate from the module document you need (for example /api/v2/openapi/email.json).