Skip to content

DevelopersGet started

Quickstart

Create an API key, exchange it for an access token, and list your recent calls. Every step has curl, Node and Python; pick one and the whole site follows. You'll need about five minutes and the owner login of an AssistCall account. No account yet? Ask us for read-only sandbox credentials and use them instead of steps 1 and 2.

On this page

Steps

  1. Create an API key

    Sign in to your dashboard as the account owner and open Developers (under Account in the menu). Choose Create key, give it a name like "CRM sync", and pick its scopes: Read-only is the safest start. You can also limit it to your server's IP addresses.

    Resellers do the same in the partner portal, on the API page. A partner key can work on all of your clients; see Partner API.

    Accounts set up through a reseller don't have a Developers page or keys of their own. Their reseller reaches their data with its partner key and the AssistCall-Account header.

    You'll see a client ID (ac_cli_…) and a client secret (ac_sk_…). The secret is shown once: copy it before you close the dialog.

  2. Keep the key out of your code

    Put both values in environment variables (or your platform's secret store), not in source files:

    export ASSISTCALL_CLIENT_ID="ac_cli_..."
    export ASSISTCALL_CLIENT_SECRET="ac_sk_..."
  3. Get an access token

    Send the client ID and secret to the token endpoint. You get back a bearer token that works for an hour.

    curl https://api.assistcall.ai/v1/oauth/token \
      -u "$ASSISTCALL_CLIENT_ID:$ASSISTCALL_CLIENT_SECRET" \
      -d grant_type=client_credentials
    Response
    {
      "access_token": "ac_at_4kQ9w2ZtV7nB1xR8mP3sL6dF0hJ5yC2gT9aE7uW1",
      "token_type": "Bearer",
      "expires_in": 3600,
      "scope": "account:read calls:read messages:read appointments:read"
    }
  4. Check who you are

    GET /v1/me works with any token. It tells you which key and account the token belongs to, its scopes and its rate limits: a quick way to check your setup.

    export ASSISTCALL_TOKEN="ac_at_..."   # the access_token from step 3
    
    curl https://api.assistcall.ai/v1/me \
      -H "Authorization: Bearer $ASSISTCALL_TOKEN"
  5. List your calls

    Calls come newest first. limit takes 1 to 100 (25 if you leave it out). When has_more is true, pass next_cursor back as cursor for the next page.

    curl "https://api.assistcall.ai/v1/calls?limit=5" \
      -H "Authorization: Bearer $ASSISTCALL_TOKEN"

Getting a 401 or 403?

invalid_client means the client ID or secret is wrong (or the key was revoked). insufficient_scope means the key doesn't have the scope that endpoint needs: create a key with it. Errors lists every code.

Before you go live

  • Reuse tokens. Get a new token only when the old one is about to expire, not for every request; each key can ask for 10 tokens a minute. Authentication has a ready-made helper.
  • Handle 429s. Wait for Retry-After seconds and try again. See Rate limits.
  • One key per app. If one leaks you can revoke it without breaking the others.
  • Log request ids. Every response has a Request-Id header; we can find any request by it.

Next steps

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