### Retrieve Integration Response (JSON) Source: https://developer.aircall.io/api-references Example JSON response when successfully retrieving integration information. It includes details about the integration's ID, name, status, associated numbers, and the user who installed it. ```json { "integration": { "id": 1234, "name": "My app", "logo": "https://cdn.aircall.io/applications/standard/staging/ico_91.svg", "company_id": 1, "status": "active", "active": true, "created_at": "2020-11-02T15:38:16.000+00:00", "updated_at": "2020-11-02T15:38:29.000+00:00", "deleted_at": null, "number_ids": [123456], "numbers_count": 1, "custom_name": null, "user": { "id": 456, "direct_link": "https://api.aircall.io/v1/users/456", "name": "John Doe", "email": "john.doe@aircall.io", "available": true, "availability_status": "available", "created_at": "2019-12-29T10:03:18.000Z", "time_zone": "America/New_York", "language": "en-US" } } } ``` -------------------------------- ### Enable Integration (API) Source: https://developer.aircall.io/api-references Use this POST request to enable an integration and activate its webhooks. This is useful for re-enabling a disabled integration. If the 'install' query parameter is set to true, the user will be redirected to the integration's settings page after installation. ```http POST /v1/integrations/enable ``` -------------------------------- ### Call Response Example Source: https://developer.aircall.io/api-references This is an example of a successful (200 OK) response when retrieving a Call. It includes detailed information about the call, the user, and associated data like comments and tags. The `ivr_options_selected` field is included when `fetch_call_timeline` is set to `true`. ```json { "call": { "id": 812, "sid": "CA1234567890", "direct_link": "https://api.aircall.io/v1/calls/812", "direction": "outbound", "status": "done", "missed_call_reason": null, "started_at": 1584998199, "answered_at": 1584998205, "ended_at": 1584998210, "duration": 11, "voicemail": null, "recording": null, "asset": null, "raw_digits": "+1 800-123-4567", "user": { "id": 456, "direct_link": "https://api.aircall.io/v1/users/456", "name": "John Doe", "email": "john.doe@aircall.io", "available": true, "availability_status": "available", "created_at": "2019-12-29T10:03:18.000Z", "time_zone": "America/New_York", "language": "en-US" }, "contact": null, "archived": false, "assigned_to": null, "transferred_by": null, "transferred_to": null, "cost": "2.34", "number": { "id": 1234, "direct_link": "https://api.aircall.io/v1/numbers/1234", "name": "French Office", "digits": "+33 1 76 11 11 11", "created_at": "2020-01-02T11:41:01.000Z", "country": "FR", "time_zone": "Europe/Paris", "open": true, "availability_status": "custom", "is_ivr": true, "live_recording_activated": true, "priority": null, "messages": { ... } }, "comments": [ { "id": 735, "content": "Please call back this customer!", "posted_at": 1587994808, "posted_by": { "id": 456, "direct_link": "https://api.aircall.io/v1/users/456", "name": "Johnn Doe", "email": "john.doe@aircall.io", "available": true, "availability_status": "available", "created_at": "2019-12-29T10:03:18.000Z" } } ], "tags": [ { "id": 678, "name": "General Inquiries", "created_at": 1587995020, "tagged_by": { "id": 456, "direct_link": "https://api.aircall.io/v1/users/456", "name": "Johnn Doe", "email": "john.doe@aircall.io", "available": true, "availability_status": "available", "created_at": "2019-12-29T10:03:18.000Z" } }, ... ], "participants": [ { "name": "John Doe", "id": 456, "type": "user" }, { "name": "Jennifer Smith", "phone_number": "+33 7 49 88 29 71", "id": 5443, "type": "contact" }, { "name": "Rafael Lopez", "id": 457, "type": "user" } ], "teams": [], "ivr_options_selected": [ { "id": "5cb41cde-aed2-4357-a98c-e1b33d68851a", "title": "", "key": "1", "branch": "Default", "created_at": "2024-10-01T06:54:45.556Z", "transition_started_at": "2024-10-01T06:54:35.332Z", "transition_ended_at": "2024-10-01T06:54:45.513Z" } ] } } ``` -------------------------------- ### Outbound Call Response Example Source: https://developer.aircall.io/api-references This example shows the expected agent response after a successful outbound call, demonstrating automatic datetime conversion from UTC to the specified local timezone. ```text The agent will say: "March 20th at 10:30 AM" (converted from UTC to Eastern time) ``` -------------------------------- ### List All Webhooks Response (200 OK) Source: https://developer.aircall.io/api-references Example response for successfully listing webhooks, including metadata and webhook details. ```json { "meta": { "count": 2, "total": 2, "current_page": 1, "per_page": 20, "next_page_link": null, "previous_page_link": null }, "webhooks": [ { "webhook_id": "c2501111-8a69-4342-bb34-bcd6cfe564ab", "direct_link": "https://api.aircall.io/v1/webhooks/1001", "created_at": "2020-04-01T15:56:18.000Z", "url": "https://my-server.example.com/webhooks/calls", "active": true, "token": "abc123def456ghi789", "events": [ "call.assigned", "call.transferred", "call.ringing_on_agent" ] }, { "webhook_id": "c2501111-8a69-4342-bb34-bcd6cfe564ac", "direct_link": "https://api.aircall.io/v1/webhooks/1002", "created_at": "2020-04-02T09:14:31.000Z", "url": "https://my-server.example.com/webhooks/numbers", "active": true, "token": "4567ghi789abc123def", "events": [ "number.opened", "number.closed" ] } ] } ``` -------------------------------- ### Create a Tag Response Source: https://developer.aircall.io/api-references Example response after successfully creating a tag, including its assigned ID. ```json { "tag": { "id": 681, "name": "VIP Customer", "color": "#00B388", "description": null } } ``` -------------------------------- ### Create a User V2 Response Source: https://developer.aircall.io/api-references Example response after successfully creating a User V2, including the new user's details and ID. ```json { "user": { "id": 458, "direct_link": "https://api.aircall.io/v2/users/458", "name": "Jeffrey Curtis", "email": "jeffrey.curtis@aircall.io", "available": false, "availability_status": "available", "created_at": "2020-02-18T20:52:22.000Z", "time_zone": "Etc/UTC", "language": "en-US", "wrap_up_time": 0 } } ``` -------------------------------- ### List all Users V2 Response Source: https://developer.aircall.io/api-references Example response for listing users, including metadata and a list of user objects with their details. ```json { "meta": { "count": 3, "total": 3, "current_page": 1, "per_page": 20, "next_page_link": null, "previous_page_link": null }, "users": [ { "id": 456, "direct_link": "https://api.aircall.io/v2/users/456", "name": "John Doe", "email": "john.doe@aircall.io", "available": true, "availability_status": "available", "created_at": "2019-12-29T10:03:18.000Z", "time_zone": "America/New_York", "language": "en-US", "substatus": "always_opened", "wrap_up_time": 0, "extension": "001" }, { "id": 457, "direct_link": "https://api.aircall.io/v2/users/457", "name": "Amy Rudd", "email": "amy.rudd@aircall.io", "available": true, "availability_status": "custom", "created_at": "2019-12-30T18:10:21.000Z", "time_zone": "Etc/UTC", "language": "en-US", "substatus": "always_opened", "wrap_up_time": 0, "extension": "002" }, { "id": 458, "direct_link": "https://api.aircall.io/v2/users/458", "name": "Vera Martin", "email": "vera.martin@aircall.io", "available": false, "availability_status": "unavailable", "created_at": "20120-01-02T09:01:58.000Z", "time_zone": "Europe/Paris", "language": "fr-FR", "substatus": "always_opened", "wrap_up_time": 0, "extension": "003" } ] } ``` -------------------------------- ### List all Tags Response Source: https://developer.aircall.io/api-references Example response for listing all tags, including metadata and a list of tag objects. ```json { "meta": { "count": 3, "total": 3, "current_page": 1, "per_page": 20, "next_page_link": null, "previous_page_link": null }, "tags": [ { "id": 678, "name": "General Inquiries", "color": "#0662B5", "description": null }, { "id": 679, "name": "Feedback", "color": "#008f6c", "description": null }, { "id": 680, "name": "Spam Call", "color": "#FCBB26", "description": null } ] } ``` -------------------------------- ### Initiate Call (Android Java) Source: https://developer.aircall.io/api-references Initiates an outbound call from an Android application using Java. This example shows how to create and start an intent for the Aircall URL scheme. ```java // Java Uri uri = Uri.parse("aircall://call?to=+33655445566&from=+33112233445"); Intent intent = new Intent(Intent.ACTION_VIEW, uri); startActivity(intent); ``` -------------------------------- ### Realtime Transcription Response Example Source: https://developer.aircall.io/api-references Example of a successful (200 OK) response when retrieving a realtime transcription. It includes call identifiers and transcribed utterances with duration, text, and timestamps. ```json { "call_id": 5237603, "call_uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "content": { "language": "en-US", "utterances": [ { "duration_ms": 3500, "participant_type": "internal", "text": "Hello, thank you for calling. How can I help you today?", "timestamp": 1633024800000, "user_id": 12345 }, { "duration_ms": 4200, "participant_type": "external", "text": "Hi, I'm calling about my recent order. It hasn't arrived yet.", "timestamp": 1633024803500, }, { "duration_ms": 2800, "participant_type": "internal", "text": "I understand. Let me check that for you right away.", "timestamp": 1633024807700, "user_id": 12345 } ] } } ``` -------------------------------- ### Search Calls API Response Example Source: https://developer.aircall.io/api-references This is an example of a successful response when searching for calls. It includes metadata about the search results and a list of call objects, each containing detailed information. ```json { "meta": { "count": 3, "total": 2, "current_page": 1, "per_page": 20, "next_page_link": null, "previous_page_link": null }, "calls": [ { "id": 812, "sid": "CA1234567890", "direct_link": "https://api.aircall.io/v1/calls/812", "direction": "outbound", "status": "done", "missed_call_reason": null, "started_at": 1584998199, "answered_at": 1584998205, "ended_at": 1584998210, "duration": 11, "voicemail": null, "recording": null, "asset": null, "raw_digits": "+1 800-123-4567", "user": { "id": 456, "direct_link": "https://api.aircall.io/v1/users/456", "name": "John Doe", "email": "john.doe@aircall.io", "available": true, "availability_status": "available", "created_at": "2019-12-29T10:03:18.000Z", "time_zone": "America/New_York", "language": "en-US" }, "contact": null, "archived": false, "assigned_to": null, "transferred_by": null, "transferred_to": null, "cost": "2.34", "number": { "id": 1234, "direct_link": "https://api.aircall.io/v1/numbers/1234", "name": "French Office", "digits": "+33 1 76 11 11 11", "created_at": "2020-01-02T11:41:01.000Z", "country": "FR", "time_zone": "Europe/Paris", "open": true, "availability_status": "custom", "is_ivr": true, "live_recording_activated": true, "priority": null, "messages": { ... } }, "comments": [...], "tags": [...], "teams": [...], "ivr_options_selected": [...] }, { "id": 813, "direct_link": "https://api.aircall.io/v1/calls/813", "direction": "inbound", "status": "done", "missed_call_reason": "no_available_agent", "started_at": 1584998199, "answered_at": null, "ended_at": 1584998210, "duration": 22, "voicemail": null, "recording": null, "asset": null, "raw_digits": "+1 800-123-4567", "user": null, "contact": null, "archived": false, "assigned_to": null, "transferred_by": null, "transferred_to": null, "cost": "0", "number": { "id": 1234, "direct_link": "https://api.aircall.io/v1/numbers/1234", "name": "French Office", "digits": "+33 1 76 11 11 11", "created_at": "2020-01-02T11:41:01.000Z", "country": "FR", "time_zone": "Europe/Paris", "open": true, "availability_status": "custom", "is_ivr": true, "live_recording_activated": true, "priority": null, "messages": { ... } }, "comments": [...], "tags": [...], "teams": [...], "ivr_options_selected": [...] }, ... ] } ``` -------------------------------- ### Transcription Response Example Source: https://developer.aircall.io/api-references Example of a successful (200 OK) response when retrieving a call transcription. It includes metadata and the transcribed content with utterances, timestamps, and participant information. ```json { "transcription": { "id": 68271, "call_id": 5237603, "call_created_at": "2024-07-26T13:30:54.000Z", "type": "call", "content": { "language": "en", "utterances": [ { "start_time": 12.54, "end_time": 13.8, "text": "Okay,", "participant_type": "external", "phone_number": "+33679198915" }, { "start_time": 238.08, "end_time": 239.48, "text": "Okay, I guess that's enough.", "participant_type": "internal", "user_id": 123 } ] } } } ``` -------------------------------- ### Example Webhook Payload Source: https://developer.aircall.io/api-references This is a general example of a webhook payload, illustrating the common attributes and the structure of the 'data' object for a 'number.closed' event. ```json Payload { "resource": "number", "event": "number.closed", "timestamp": 1585001020, "token": "45XXYYZZa08", "data": { "id": 456, "direct_link": "https://api.aircall.io/v1/numbers/123", "name": "My first Aircall Number", "digits": "+33 1 76 36 06 95", "country": "FR", "time_zone": "Europe/Paris", "open": false, "users": [ { "id": 456, "direct_link": "https://api.aircall.io/v1/users/456", "name": "Madelaine Dupont", "email": "madelaine.dupont@aircall.io", "available": false, "language": "en-US" } ] } } ``` -------------------------------- ### Sentiments Response Example Source: https://developer.aircall.io/api-references Example of a successful (200 OK) response when retrieving call sentiments. It includes the call ID and participant sentiment values. ```json { "sentiment": { "id": 5237603, "call_id": 5237603, "participants": [ { "phone_number": "+33679198915", "value": "POSITIVE", "type": "external" } ] } } ``` -------------------------------- ### Create a User V2 Request Source: https://developer.aircall.io/api-references Example request body for creating a new User V2. Requires email, first name, and last name. ```json { "email": "jeffrey.curtis@aircall.io", "first_name": "Jeffrey", "last_name": "Curtis" } ``` -------------------------------- ### Retrieve a Tag Response Source: https://developer.aircall.io/api-references Example response for retrieving a specific tag, showing its details. ```json { "tag": { "id": 678, "name": "General Inquiries", "color": "#0662B5", "description": null } } ``` -------------------------------- ### Retrieve a Webhook Response (200 OK) Source: https://developer.aircall.io/api-references Example response for successfully retrieving a specific webhook's details. ```json { "webhook": { "webhook_id": "c2501111-8a69-4342-bb34-bcd6cfe564ab", "direct_link": "https://api.aircall.io/v1/webhooks/1001", "created_at": "2020-04-01T15:56:18.000Z", "url": "https://my-server.example.com/webhooks/calls", "active": true, "token": "abc123def456ghi789", "events": [ "call.assigned", "call.transferred", "call.ringing_on_agent" ] } } ``` -------------------------------- ### Update a Tag Response Source: https://developer.aircall.io/api-references Example response after successfully updating a tag, reflecting the changes. ```json { "tag": { "id": 681, "name": "Tier 2 Customer", "color": "#00B388", "description": null } } ``` -------------------------------- ### Retrieve a User V2 Response Source: https://developer.aircall.io/api-references Example response for retrieving a single user, containing detailed information about the user. ```json { "user": { "id": 456, "direct_link": "https://api.aircall.io/v2/users/456", "name": "John Doe", "email": "john.doe@aircall.io", "available": true, "availability_status": "available", "created_at": "2019-12-29T10:03:18.000Z", "time_zone": "America/New_York", "language": "en-US", "substatus": "always_opened", "wrap_up_time": 0, "extension": "001", "default_number_id": 1234 } } ``` -------------------------------- ### Example response for retrieving topics Source: https://developer.aircall.io/api-references A successful response (Status: 200 OK) for the retrieve topics endpoint includes the topic details for the call. ```json { "topic": { "id": 786, "call_id": 123, "created_at": "2024-08-27T10:54:16.000Z", "content": [ "payment", "billing" ] } } ``` -------------------------------- ### WhatsApp Templates Response (200 OK) Source: https://developer.aircall.io/api-references Example response for a successful request to list WhatsApp templates. Includes template details and pagination information. ```json { "templates": [ { "id": 1, "wabaId": "123456789", "name": "order_confirmation", "category": "UTILITY", "status": "APPROVED", "language": "en", "twilioType": "text", "createdAtTimestamp": 1722317361216, "updatedAtTimestamp": 1722317361216, "isFavourite": false, "template": { ... } } ], "pageInfo": { "currentToken": 0, "nextToken": 10, "totalCount": 50 } } ``` -------------------------------- ### user.wut_start.v2 Source: https://developer.aircall.io/api-references Sent when a user starts their wrap-up time (WUT) work according to their settings. This event is triggered after a call if wrap-up time is required. ```APIDOC ## user.wut_start.v2 ### Description Sent when user start their wrap up time (WUT) work according to their setting. This event is triggered after a call if wrap-up time is required. If wrap up time is set as zero and have mandatory call tagging enabled, `user.wut_start` event will be sent if user tags the call at the end of the call. However if call was tagged during the call(having mandatory call tagging enabled), the event would not be sent. Cold transferring a call to a teammate transfers the existing call leg and does not have any wrap-up time associated with it, so this event will not be generated for such calls. However, if a call is cold transferred to an internal Aircall number or an external line, this event will be generated as wrap-up time is required in these cases. ### Payload ```json { "event": "user.wut_start.v2", "resource": "user", "timestamp": 158554819, "token": "45XXYYZZa08", "data": { // the User v2 object } } ``` ``` -------------------------------- ### Example response for retrieving summary Source: https://developer.aircall.io/api-references A successful response (Status: 200 OK) for the retrieve summary endpoint provides the call's summary content. ```json { "summary": { "id": 974, "call_id": 786, "created_at": "2024-08-27T10:54:16.000Z", "content": "Short summary of the call" } } ``` -------------------------------- ### Create a Tag Request Body Source: https://developer.aircall.io/api-references Example request body for creating a tag, including name and color in hexadecimal format. ```json { "name": "VIP Customer", "color": "#00B388" } ``` -------------------------------- ### Call with Empty Parameters Source: https://developer.aircall.io/api-references A placeholder example showing the structure for a call URL with empty 'to' and 'from' parameters. This might be used for testing or as a base for dynamic construction. ```plaintext aircall://call?to=&from= ``` -------------------------------- ### Start an outbound call Source: https://developer.aircall.io/api-references Initiates an outbound call for a specific user. ```APIDOC ## POST /v1/users/:id/calls ### Description Initiates an outbound call for a specific user. ### Method POST ### Endpoint /v1/users/:id/calls ``` -------------------------------- ### Initiate Call (Android Kotlin) Source: https://developer.aircall.io/api-references Initiates an outbound call from an Android application using Kotlin. This example demonstrates constructing the intent with the call URL. ```kotlin // Kotlin val uri = Uri.parse("aircall://call?to=+33655445566&from=+33112233445") val intent = Intent(Intent.ACTION_VIEW, uri) startActivity(intent) ``` -------------------------------- ### Open Aircall App (Swift) Source: https://developer.aircall.io/api-references Integrates opening the Aircall app in Swift. It includes a check for app installation and handles the success or failure of the open action. ```swift // Swift if let url = URL(string: "aircall://") { UIApplication.shared.open(url, options: [:]) { success in if !success { // Aircall app is not installed } } } ``` -------------------------------- ### user.opened.v2 Source: https://developer.aircall.io/api-references Sent when users become available according to their working hours. This event marks the start of a user's active availability period. ```APIDOC ## user.opened.v2 ### Description Sent when users become available according to their working hours. This event marks the start of a user's active availability period. ### Payload ```json { "event": "user.opened.v2", "resource": "user", "timestamp": 158556187, "token": "45XXYYZZa08", "data": { // the User v2 object } } ``` ``` -------------------------------- ### Start Outbound Call API Source: https://developer.aircall.io/api-references Initiate an outbound call for a specific user using their ID. This API allows programmatic call initiation. ```HTTP POST /v1/users/:id/calls ``` -------------------------------- ### Start Outbound Call Source: https://developer.aircall.io/api-references Initiate an outbound call for a user, often used for Click-to-call features. Ensure the user is available and associated with the specified number. ```HTTP POST /v1/users/:id/calls ``` ```JSON { "number_id": 123, "to": "+18001231234" } ``` -------------------------------- ### Aircall API Root Request Example Source: https://developer.aircall.io/api-references This is an example of a GET request to the root endpoint of the Aircall Public API. ```http GET https://api.aircall.io ``` -------------------------------- ### Create a User Source: https://developer.aircall.io/api-references Use this endpoint to create a new user. Provide the user's email, first name, and last name. An invitation email will be sent to the user upon successful creation. ```bash POST /v1/users { "email": "jeffrey.curtis@aircall.io", "first_name": "Jeffrey", "last_name": "Curtis" } ``` -------------------------------- ### WhatsApp Line Status Response (200 OK) Source: https://developer.aircall.io/api-references Example response for a successful request to get WhatsApp line status. Includes WABA ID, registration status, messaging capabilities, and quality ratings. ```json { "wabaId": "123456789", "status": "ONLINE", "canSendMessage": true, "messagingLimitTier": "TIER_1K", "qualityRating": "GREEN", "businessVerificationStatus": "VERIFIED" } ``` -------------------------------- ### Root Endpoint and Example Response Source: https://developer.aircall.io/api-references This snippet shows the root endpoint for the Aircall Public API and an example of a successful response. ```APIDOC ## GET https://api.aircall.io ### Description Retrieves basic information about the Aircall API. ### Method GET ### Endpoint https://api.aircall.io ### Response #### Success Response (200) - **resource** (string) - The name of the resource. - **contact** (string) - The contact email for support. ### Response Example { "resource": "Aircall Documentation", "contact": "support@aircall.io" } ``` -------------------------------- ### Aircall API Root Response Example Source: https://developer.aircall.io/api-references This is an example of a JSON response received from the root endpoint of the Aircall Public API. ```json { "resource": "Aircall Documentation", "contact": "support@aircall.io" } ``` -------------------------------- ### Create a Webhook Source: https://developer.aircall.io/api-references Use this endpoint to create a new webhook. You can specify a custom name, the URL to receive events, and a list of events to subscribe to. If the events list is empty, all events will be attached. ```bash POST /v1/webhooks { "custom_name": "My Custom Workflow", "url": "https://my-server.example.com/webhooks/contacts", "events": [ "contact.created", "contact.updated", "contact.deleted" ] } ``` -------------------------------- ### Open Aircall App Source: https://developer.aircall.io/api-references Launches the Aircall iOS app. Ensure the app is installed and the user is logged in for successful execution. On iOS, you can check for installation using `UIApplication.shared.canOpenURL` after configuring `Info.plist`. ```plaintext aircall:// ``` -------------------------------- ### Example response for retrieving action items Source: https://developer.aircall.io/api-references A successful response (Status: 200 OK) for the retrieve action items endpoint lists action items associated with the call, indicating if they were AI-generated. ```json { "call_id": 123, "action_items: [ { "ai_generated": false, "content": "Send email to customer next week with updated offer details.", "created_at": "2024-08-28T12:32:16.000Z", "created_by": 74550, "id": 1, "updated_at": "2024-08-28T12:49:12.000Z", "updated_by": 74550 }, { "ai_generated": true, "content": "Schedule meeting for next monday to discuss final agreement.", "created_at": "2024-08-27T10:54:16.000Z", "id": 2 }] } ``` -------------------------------- ### Retrieve Company Information Source: https://developer.aircall.io/api-references Company information can be retrieved with this GET request. ```APIDOC ## GET /v1/company ### Description Retrieve Company information. ### Method GET ### Endpoint /v1/company ### Response #### Success Response (200) - **company** (object) - Contains company details. - **name** (string) - Name of the Company. - **users_count** (number) - Number of Users in the Company. - **numbers_count** (number) - Number of Numbers in the Company. #### Response Example ```json { "company": { "name": "Acme Inc.", "users_count": 146, "numbers_count": 28 } } ``` #### Error Response (403) - Forbidden. Invalid Bearer access token ``` -------------------------------- ### Get Number Registration Status Source: https://developer.aircall.io/api-references Retrieves the registration status for a specific number. ```APIDOC ## GET /v1/numbers/:id/registration_status ### Description Retrieves the registration status for a specific Number. ### Method GET ### Endpoint /v1/numbers/:id/registration_status ### Parameters #### Path Parameters - **id** (integer) - Required - Unique identifier for the Number. ``` -------------------------------- ### List all Teams - Request Source: https://developer.aircall.io/api-references Use this endpoint to fetch all teams associated with your company and their details. Pagination parameters can be applied. ```bash GET /v1/teams ``` -------------------------------- ### Get WhatsApp Line Status Source: https://developer.aircall.io/api-references Retrieves the WhatsApp line status for a specific number. ```APIDOC ## GET /v1/numbers/:id/whatsapp_status ### Description Retrieves the WhatsApp Line Status for a specific Number. ### Method GET ### Endpoint /v1/numbers/:id/whatsapp_status ### Parameters #### Path Parameters - **id** (integer) - Required - Unique identifier for the Number. ``` -------------------------------- ### Update a Tag Request Body Source: https://developer.aircall.io/api-references Example request body for updating a tag, specifying the fields to modify. ```json { "name": "Tier 2 Customer" } ``` -------------------------------- ### Create a User V2 Source: https://developer.aircall.io/api-references Create a new User V2. An invitation email will be sent to the user upon creation. ```APIDOC ## POST /v2/users ### Description Creates a new User V2. Upon successful creation, a unique user ID is included in the response payload, and an invitation email is sent to the user. The user must confirm their account to use Aircall. ### Method POST ### Endpoint /v2/users ### Parameters #### Request Body - **email** (String) - Required - Must be a valid and unique email address. - **first_name** (String) - Required - The user's first name. Cannot be blank. - **last_name** (String) - Required - The user's last name. Cannot be blank. - **availability_status** (String) - Optional - The initial availability status. Can be `available`, `custom`, or `unavailable`. Defaults to `available`. - **role_ids** (Array) - Optional - The roles assigned to the user. Can include `owner`, `supervisor`, `admin`, or `agent`. Defaults to `agent`. - **wrap_up_time** (Integer) - Optional - The number of seconds for wrap-up time after a call. Applies only to users with the `agent` role. Defaults to `0` seconds. - **inviter_user_id** (Integer) - Optional - The ID of the user who invited this user. This value is ignored if the inviter is not an admin. ### Request Example ```json { "email": "jeffrey.curtis@aircall.io", "first_name": "Jeffrey", "last_name": "Curtis" } ``` ### Response #### Success Response (201 Created) - **user** (Object) - Contains the details of the newly created user. - **id** (Integer) - The user's unique identifier. - **direct_link** (String) - A direct link to the user's resource. - **name** (String) - The user's full name. - **email** (String) - The user's email address. - **available** (Boolean) - Indicates if the user is currently available. - **availability_status** (String) - The user's current availability status. - **created_at** (String) - The timestamp when the user was created. - **time_zone** (String) - The user's time zone. - **language** (String) - The user's preferred language. - **wrap_up_time** (Integer) - The wrap-up time in seconds after a call. #### Response Example ```json { "user": { "id": 458, "direct_link": "https://api.aircall.io/v2/users/458", "name": "Jeffrey Curtis", "email": "jeffrey.curtis@aircall.io", "available": false, "availability_status": "available", "created_at": "2020-02-18T20:52:22.000Z", "time_zone": "Etc/UTC", "language": "en-US", "wrap_up_time": 0 } } ``` ### Error Handling - **422 Unprocessable Entity**: Mandatory attribute missing. Check the `troubleshoot` field for details. ``` -------------------------------- ### Initialize Aircall Everywhere SDK V2 Source: https://developer.aircall.io/api-references Instantiate the Aircall Everywhere JavaScript SDK to embed and control the Workspace app. Configure callbacks for login and logout events, specify the DOM element for loading, and set the integration type and size. ```javascript import AircallWorkspace from 'aircall-everywhere'; const aircallWorkspace = new AircallWorkspace({ onLogin: settings => { console.log('phone loaded'); doStuff(); }, onLogout: () => {}, domToLoadWorkspace: '#workspace', integrationToLoad: 'zendesk', size: 'big' }); ``` -------------------------------- ### Retrieve a playbook result Source: https://developer.aircall.io/api-references Use this endpoint to get playbook result from a call. Subscription to AI Assist Pro is required. ```APIDOC ## GET /v1/calls/:call_id/playbook_result ### Description Use this endpoint to get playbook result from a call. You'll need to subscribe to AI Assist Pro to generate and to call this endpoint. ### Method GET ### Endpoint /v1/calls/:call_id/playbook_result ### Parameters #### Path Parameters - **call_id** (Integer) - Required - Unique identifier for the Call. - **fetch_playbook** (Boolean) - Optional - When set to `true`, adds playbook details in response. ### Response #### Success Response (200) - **id** (integer) - **call_id** (integer) - **user_id** (integer) - **number_id** (integer) - **adherence_score** (integer) - **playbook_result_topics** (array of objects) - **created_at** (integer) - **playbook** (object) ### Response Example ```json { "id": 1, "call_id": 974, "user_id": 786, "number_id": 35550, "adherence_score": 0, "playbook_result_topics": [ { "name": "Budget", "result": "content" }, { "name": "Authority", "result": "content" }, { "name": "Need", "result": "content" }, { "name": "Timing", "result": "content" } ], "created_at": 1753095768, "playbook": { "id": 2, "name": "BANT", "language": "en" } } ``` ``` -------------------------------- ### Create a Team - Response Source: https://developer.aircall.io/api-references Upon successful creation, the API returns the details of the newly created team, including its ID, name, direct link, creation timestamp, and an empty list of users. ```json { "team": { "id": 679, "name": "Support USA", "direct_link": "https://api.aircall.io/v1/teams/679", "created_at": "2020-03-10T20:29:52.000Z", "users": [] } } ``` -------------------------------- ### Example response for retrieving playbook result Source: https://developer.aircall.io/api-references A successful response (Status: 200 OK) for the retrieve playbook result endpoint includes the call's playbook details and adherence score. ```json { "id": 1, "call_id": 974, "user_id": 786, "number_id": 35550, "adherence_score": 0, "playbook_result_topics": [ { "name": "Budget", "result": "content" }, { "name": "Authority", "result": "content" }, { "name": "Need", "result": "content" }, { "name": "Timing", "result": "content" } ], "created_at": 1753095768. "playbook": { "id": 2, "name": "BANT", "language": "en" } } ``` -------------------------------- ### Retrieve action items Source: https://developer.aircall.io/api-references Use this endpoint to get action items from a call. It requires a valid call_id as a path parameter. ```APIDOC ## GET /v1/calls/:call_id/action_items ### Description Use this endpoint to get action items from a call. ### Method GET ### Endpoint /v1/calls/:call_id/action_items ### Parameters #### Path Parameters - **call_id** (Integer) - Required - Unique identifier for the Call. ### Response #### Success Response (200) - **call_id** (integer) - **action_items** (array of objects) ### Response Example ```json { "call_id": 123, "action_items": [{ "ai_generated": false, "content": "Send email to customer next week with updated offer details.", "created_at": "2024-08-28T12:32:16.000Z", "created_by": 74550, "id": 1, "updated_at": "2024-08-28T12:49:12.000Z", "updated_by": 74550 }, { "ai_generated": true, "content": "Schedule meeting for next monday to discuss final agreement.", "created_at": "2024-08-27T10:54:16.000Z", "id": 2 }] } ``` ``` -------------------------------- ### Create a Webhook Source: https://developer.aircall.io/api-references Creates a new webhook subscription. Webhooks can be configured with a URL, custom name, and a list of events. If no events are specified, all events will be attached. ```APIDOC ## POST /v1/webhooks ### Description Creates a new webhook subscription. Webhooks can be configured with a URL, custom name, and a list of events. If no events are specified, all events will be attached. ### Method POST ### Endpoint /v1/webhooks ### Parameters #### Request Body - **url** (string) - Mandatory - The URL to which webhook events will be sent. Must be a valid URL. - **custom_name** (string) - Optional - A custom name for the webhook. - **events** (array) - Optional - A list of events to subscribe to. If empty, all events are attached. ### Request Example ```json { "custom_name": "My Custom Workflow", "url": "https://my-server.example.com/webhooks/contacts", "events": [ "contact.created", "contact.updated", "contact.deleted" ] } ``` ### Response #### Success Response (201 Created) - **webhook** (object) - Contains details of the created webhook. - **webhook_id** (string) - The unique identifier for the webhook. - **direct_link** (string) - A direct link to the webhook resource. - **created_at** (string) - The timestamp when the webhook was created. - **url** (string) - The URL configured for the webhook. - **active** (boolean) - Indicates if the webhook is active. - **events** (array) - The list of events the webhook is subscribed to. - **token** (string) - An authentication token for the webhook. #### Response Example ```json { "webhook": { "webhook_id": "c2501111-8a69-4342-bb34-bcd6cfe564ab", "direct_link": "https://api.aircall.io/v1/webhooks/26316", "created_at": "2020-03-24T19:51:24.000Z", "url": "https://my-server.example.com/webhooks/contacts", "active": true, "events": [ "contact.created", "contact.updated", "contact.deleted" ], "token": "df76g76dpziygs567f0" } } ``` ```