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
- Open your Aircall Dashboard.
- Go to
Integrations & API. - Under API Keys, click
Add a new API key. - Copy your
API IDandAPI 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.
-
Open your preferred terminal tool. Most common for defaults:
- macOS:
Cmd + Space→ Terminal - Windows:
Win + R→ wt - Linux: Ctrl + Alt + T
- macOS:
-
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>'
-
Click the button below to open our official Postman collection
Run in Postman -
Click Fork Collection
-
Slect your settings for the fork name
-
Once loaded click on the collection name and go to the
Authorizationtab -
Select Basic Auth and enter the API ID as
Usernameand the Token asPassword -
Select any GET request, for instance
Calls → List all Callsand click send. -
Done 👌
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.
Updated 3 days ago