Your first API call

Send your first authenticated request to list recent calls from your Aircall account. Use GET /v1/calls to verify your credentials and see the structure of a typical paginated API response.

Get your API credentials

  1. Open your Aircall Dashboard.
  2. Go to Integrations & API.
  3. Under API Keys, click Add a new API key.
  4. Copy your API ID and API Token. You will only see the token once.
📘

Need help creating API keys? See this help center article

Make your first request

Choose your preferred method to send your first authenticated request.

  1. Open your preferred terminal tool. Most common for defaults:

    • macOS: Cmd + Space → Terminal
    • Windows: Win + R → wt
    • Linux: Ctrl + Alt + T
  2. Type the following command replacing <YOUR_API_ID> and <YOUR_API_TOKEN>

       curl -X GET      
       'https://api.aircall.io/v1/calls/search?per_page=20&order=desc' \ 
         -u '<YOUR_API_ID>:<YOUR_API_TOKEN>'

Understand the response

If your credentials are valid, the API returns 200 OK with a paginated JSON response like the example below. When working with Aircall API reference the payloads are explained in two places:

  • The main object page, e.g: Call explains the attributes returned for each object.
  • The specific endpoint page, e.g: Search Calls contains additional data that is returned for that endpoint.
{
  "meta": {...},                  // ... Metadata object
  "calls": [
    {
      "id": 812,
      "direction": "outbound",   // "inbound" or "outbound"
      "status": "done",          // "initial", "answered" or "done"
      "started_at": 1584998199,  // UNIX timestamp
      "answered_at": 1584998205,
      "ended_at": 1584998210,
      "duration": 11,            // Seconds (includes ringing time)
      "raw_digits": "+123434567",
      "missed_call_reason": null, // Only set on missed inbound calls
      "user": {...},
      "number": {...},
      "tags": [],
      "comments": []
    },
    // ... Additional calls
  ]
}

The same is applicable for all the other major Aircall API objects: Number, Message, Conversation Intelligence, Company, Webhook...

You that have made first Aircall API call, you’re ready to build.


Did this page help you?