> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# Aircall connect

> Generate an Aircall API ID and token from the Aircall dashboard, store them as organization variables, and reference them from the Post Call Context workflow action.

OpenCX workflows authenticate to Aircall with an <Tooltip tip="A pair of credentials (API ID + API token) generated from the Aircall dashboard. Sent as HTTP Basic auth on every request.">API key</Tooltip> — an **API ID** and an **API token** used together as HTTP Basic auth. Store the pair as organization variables once, then reference them from every workflow node that touches Aircall.

## Generate credentials

<Steps>
  <Step title="Open the Aircall API keys page">
    Sign in to your Aircall dashboard as an admin, open the **Integrations & API** page, and select [**API Keys**](https://dashboard.aircall.io/view-api-keys) in the upper-right corner.
  </Step>

  <Step title="Create an API key">
    Click **Generate an API key**, give the key a recognizable name, and Aircall shows you two values: the **API ID** and the **API token**.

    <Warning>
      Anyone with the pair can read and write your Aircall data — calls, contacts, users. Treat it like a password. Copy both values before closing the popup: the **API token** is displayed only once at creation time and cannot be retrieved later.
    </Warning>
  </Step>

  <Step title="Store both somewhere safe">
    Drop both into your password manager or secret store, then add them as OpenCX organization variables (next section) so workflows can reference them.
  </Step>
</Steps>

## Store as organization variables

Instead of pasting the raw credentials into every workflow node, store them once as organization variables — values are **encrypted at rest** and decrypted per run:

<Steps>
  <Step title="Open the variables page">
    Go to **[Settings → Variables](https://platform.open.cx/settings)**.
  </Step>

  <Step title="Add two variables">
    Create `aircall_api_id` with the API ID as its value, and `aircall_api_token` with the API token.
  </Step>

  <Step title="Reference them from workflows">
    In any workflow node with Aircall credential inputs (e.g. [Post Call Context](/integrations/aircall/post-call-context-action)), set **Aircall API ID** to `{{variables.aircall_api_id}}` and **Aircall API Token** to `{{variables.aircall_api_token}}`.
  </Step>
</Steps>

<Info>
  Rotating the key becomes a one-place change: generate a new key in Aircall, update the two variable values, and every workflow referencing them picks up the new credentials on its next run — no workflow edits needed.
</Info>

<Note>
  Organization variables are shared with [AI action calls](/actions/authentication), where each key/value is sent as an HTTP header on outbound requests to your own action endpoints. Keep that in mind when naming and scoping the keys.
</Note>

## Verify the connection

Aircall exposes a ping endpoint that answers with `{"ping": "pong"}` when the credentials are valid. Aircall recommends sending the pair Base64-encoded in the `Authorization` header (not embedded in the URL):

```bash theme={"dark"}
curl https://api.aircall.io/v1/ping \
  -H "Authorization: Basic $(printf '%s' 'YOUR_API_ID:YOUR_API_TOKEN' | base64)"
```

A `403 Forbidden` response means the ID/token pair is wrong or was revoked — regenerate the key from the [API Keys page](https://dashboard.aircall.io/view-api-keys).

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Post Call Context Action" icon="phone-forwarded" href="/integrations/aircall/post-call-context-action">
    Full reference for the workflow action.
  </Card>

  <Card title="Overview" icon="phone" href="/integrations/aircall/overview">
    What the Aircall integration does at a glance.
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/integrations/aircall/troubleshooting">
    Credentials rejected, call not found, comment limits.
  </Card>

  <Card title="AI Phone agent configuration" icon="gear" href="/phone/agent-config">
    Set up the transfer destination that forwards to Aircall.
  </Card>
</CardGroup>
