API EndpointsApi Reference/list Calls

List Calls

Returns a list of all calls made from your workspace, newest first.

curl -X GET "https://api.twentytwo.in/api/call/logs" \
  -H "Content-Type: application/json" \
  -H "x-workspace-id: 699ed3b91ee5bee389dcb6a3" \
  -H "Authorization: Basic YOUR_CREDENTIALS"
{
  "success": true,
  "statusCode": 200,
  "data": [
    {
      "id": "6a339ffbd2bbdb6b4d040c29",
      "called_at": null,
      "callee_number": "9871530000",
      "caller_number": "8071387279",
      "campaign_id": null,
      "campaign_name": null,
      "agent_id": "6a3129fa52acd1721552a434",
      "agent_name": "Customer Support Agent",
      "status": "scheduled",
      "cost": 0,
      "call_type": "outbound",
      "call_hungup_by": null,
      "should_charge": false
    }
  ]
}
GET
/call/logs
GET
Base URLstring

Target server for requests. Edit to use your own host.

Basic Authentication
Usernamestring
Required

Username for basic authentication

Passwordpassword
Required

Password for basic authentication

Base64-encode your credentials in the format api_key:api_key_secret and pass the result in the Authorization header: ``http Authorization: Basic BASE64(api_key:api_key_secret) `` Generate your API Key and Secret from **Profile → Integrations → Build with Twenty2 API → Create new**.
header
x-workspace-idstring
Required

Your Twenty2 Workspace ID. To find it, click the copy icon next to Switch Workspace at the bottom-left of the platform and select Copy workspace ID.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Basic authentication credentials. Base64-encode your credentials in the format api_key:api_key_secret and pass the result in the Authorization header:

Authorization: Basic BASE64(api_key:api_key_secret)

Generate your API Key and Secret from Profile → Integrations → Build with Twenty2 API → Create new.

Headers

x-workspace-idstring
Required

Your Twenty2 Workspace ID. To find it, click the copy icon next to Switch Workspace at the bottom-left of the platform and select Copy workspace ID.

Example:
699ed3b91ee5bee389dcb6a3

Responses

successboolean
statusCodeinteger
dataarray

Array of call objects, newest first.