Skip to content

DevelopersGuides

Partner API

If you resell AssistCall under your own brand, one partner key runs your whole business: it manages your clients and packages, and reads or changes any one client's calls, messages, appointments and more. Create it on the API page of the partner portal.

On this page

How a partner key works

There are two kinds of endpoints, and the AssistCall-Account header picks between them:

EndpointsHeaderWorks on
/v1/partner, /v1/clients, /v1/packagesNoneYour partner account and its list of clients.
Account endpoints: /v1/calls, /v1/messages, /v1/appointments, /v1/contacts, /v1/forms, /v1/knowledge, /v1/receptionists, /v1/numbers, /v1/usage, /v1/account, /v1/webhooksAssistCall-Account: <client id> (required)The one client you name.
Your server
api.assistcall.ai
  1. 1GET /v1/clients

    Authorization: Bearer ac_at_… (partner token)

  2. 2200: your clients and their ids

    { "data": [ { "id": "5d0e…", "name": "Demo Dental" }, … ] }

  3. 3GET /v1/calls

    AssistCall-Account: 5d0e…

  4. 4200: that client's calls

  5. 5GET /v1/calls

    AssistCall-Account: an id that isn’t your client

  6. 6404 resource_missing

    never 403, so ids can’t be probed

Call an account endpoint without the header and you get 400 account_required. GET /v1/me works either way; with the header it also returns the client you named, which is a quick way to check an id.

# Partner endpoints: no header
curl https://api.assistcall.ai/v1/clients -H "Authorization: Bearer $ASSISTCALL_TOKEN"

# One client's data: name the client in AssistCall-Account
curl https://api.assistcall.ai/v1/messages?status=open \
  -H "Authorization: Bearer $ASSISTCALL_TOKEN" \
  -H "AssistCall-Account: 5d0e6a8b-1f2c-4e3d-9a7b-6c5d4e3f2a1b"
Your clients don't have API keys of their own, so this is how their data reaches other systems: your software calls the API with your partner key on their behalf (or they use webhooks; see below). Each request names one client. To work across all of them, list your clients and loop, like the example above. Everything a partner key does counts toward the partner limit of 600 requests a minute (Rate limits).

Scopes for partner keys

A partner key can hold the partner scopes (partner:read, clients:read, clients:write, packages:read) and any account scopes, which then apply to whichever client you name. A key with only clients:read and calls:read, for example, can list your clients and read their calls, and nothing else. See Scopes.

Creating clients

POST /v1/clients (clients:write) does what Add client does in the partner portal: it creates the account on one of your packages, creates the owner's login and emails them a link to set a password, branded as your product.

curl https://api.assistcall.ai/v1/clients \
  -H "Authorization: Bearer $ASSISTCALL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "business_name": "Rivera Plumbing",
    "owner_name": "Dana Rivera",
    "owner_email": "[email protected]",
    "owner_phone": "+15555550123",
    "package_id": "2b6f0c1e-8d4a-4f3b-9e7c-5a1d2c3b4e6f",
    "industry": "home_services",
    "setup_receptionist": true
  }'
business_name, owner_name, owner_email
Required. The owner email can’t already have an AssistCall login (409 email_taken).
package_id
Required. One of your available packages, from GET /v1/packages.
owner_phone, industry
Optional.
setup_receptionist
Optional. true creates an AI Employee from the business details and gives it a phone number straight away. The response says how that went in receptionist_setup.
  • The new client starts as onboarding ("Setting up") if you bill clients yourself, or pending_payment if you take card payments, until they add a card on your portal.
  • The set-password link works for 3 days. POST /v1/clients/{id}/invite sends a fresh one.
  • Creating clients and resending invites can send up to 30 emails an hour (429 email_rate_limited past that).

Suspending, resuming and changing packages

PATCH /v1/clients/{id} with status ("suspended" or "active"), package_id, or both.

# Suspend
curl -X PATCH https://api.assistcall.ai/v1/clients/$CLIENT_ID \
  -H "Authorization: Bearer $ASSISTCALL_TOKEN" -H "Content-Type: application/json" \
  -d '{"status": "suspended"}'

# Resume, on a different package
curl -X PATCH https://api.assistcall.ai/v1/clients/$CLIENT_ID \
  -H "Authorization: Bearer $ASSISTCALL_TOKEN" -H "Content-Type: application/json" \
  -d '{"status": "active", "package_id": "9c8b7a6f-…"}'
  • Suspending signs the client's users out; they can't use their portal until you set them active again. Their data is kept.
  • Activating a client that was waiting for payment, or canceled, turns the account on and moves it to billing you handle yourself.
  • Changing package applies the new package's limits straight away. If the client pays by card, their subscription moves to the new price.
  • If AssistCall suspended an account, you can't reactivate it; contact us.
  • Writes to a client that isn't active (for example creating an appointment for a suspended client) are refused with 403 account_inactive.

Connecting a client’s systems

To send a client's calls, messages or bookings to its CRM or scheduling tool, either:

  • run the sync yourself with your partner key and the client's AssistCall-Account header, or
  • set up webhooks for the client: with your key (POST /v1/webhooks with its AssistCall-Account), or by the client on the Integrations page of its portal. See Webhooks.

Packages and usage

  • GET /v1/packages (packages:read) lists your packages with price, included minutes, extra-minute price, AI Employees, numbers, trial days, features and how many clients use each. Money is in cents. Add ?active=true for the ones you can put new clients on.
  • GET /v1/clients includes each client's package, owner, numbers, and minutes used this period against the package's included minutes. Filter with ?status=.
  • GET /v1/clients/{id}/usage (clients:read) returns the client's current period, calls, minutes, included minutes and percent used. The same numbers are available as GET /v1/usage with the client's AssistCall-Account header and usage:read.
  • GET /v1/partner (partner:read) returns your partner account: name, portal address, product name, sign-up mode and billing mode.

Your wholesale costs and statements aren't in the API; see them in the partner portal (Billing).

Security model

  • A partner key only reaches its own clients. The client in AssistCall-Account must belong to the partner that owns the key. Any other id, including real accounts of other partners, gets the same 404 as an id that doesn't exist.
  • Scoping comes from the token, never from input. Every query is limited to the partner and client the token and header resolve to; ids in paths and bodies can't reach past them.
  • Your clients don't get API keys. Their portal has no Developers page (it would show the AssistCall API through your brand), so only your partner key reaches their data, one client per request. Clients can't see each other or your partner account.
  • Inactive accounts stop. Keys of a partner that isn't active are refused (403 account_inactive).

More in Security.

Try "token", "webhook signature", "rate limit" or "custom domain".