> For the complete documentation index, see [llms.txt](https://docs.agentalk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.agentalk.io/integrations/api-documentation.md).

# API documentation

The Agentalk API allows you to programmatically manage contacts, campaigns, and calls.

Use it to automate workflows, integrate with external systems, and control your workspace from your own applications.

### What you can do with the API

The API allows you to manage core resources programmatically:

{% content-ref url="/spaces/k8lt7EJAvQysO1wSOaGJ" %}
[API Reference](https://docs.agentalk.io/api-reference/)
{% endcontent-ref %}

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong>Contacts</strong></td><td><ul><li>Create or update contacts</li><li>Search contacts</li><li>Manage tags and custom fields</li><li>Delete contacts</li></ul></td></tr><tr><td><strong>Campaigns</strong></td><td><ul><li>Retrieve campaign lists</li><li>Add contacts to campaigns</li><li>Activate campaigns</li></ul></td></tr><tr><td><strong>Calls</strong></td><td><ul><li>Initiate outbound calls</li><li>Trigger calls in workflows</li><li>Link calls to campaigns and contacts</li></ul></td></tr><tr><td><strong>Account</strong></td><td><ul><li>Manage custom fields</li><li>Retrieve phone numbers</li><li>Manage organization-level tags</li></ul></td></tr></tbody></table>

{% hint style="info" %}

### Endpoints

The complete list of endpoints from Agentalk API are available in the [API Reference](https://docs.agentalk.io/api-reference) documentation.
{% endhint %}

### Get your API token

To authenticate API requests, you need an API token.

1. Go to **API & Integration** from the sidebar.
2. Locate the **API Token** section.
3. Copy your active token.

   <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p>Keep your API token secure. Do not expose it in frontend code or public repositories.</p></div>

\
You can manage your token in **Organization Settings** on the Account page.

<figure><img src="/files/ZeERlzckan4CG5vHS0Mz" alt=""><figcaption></figcaption></figure>

### Authenticate requests

All API requests must include your API token in the `Authorization` header using the Bearer format:

`Authorization: Bearer YOUR_API_TOKEN`

Each request is executed in the context of your organization.

### Base URL

All API requests are made using the base URL:

`https://api.agentalk.io`

Endpoints are available under the `/api/` path.

For example:

`https://api.agentalk.io/api/contacts`

### Next steps

Here are the recommended next steps after completing this guide:

* [**API Reference**](https://docs.agentalk.io/api-reference): Explore all the endpoints available in the Agentalk API Reference.
* [**Use webhooks for post-call automation**](/integrations/use-webhooks-for-post-call-automation.md): Receive call data automatically after each call ends.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.agentalk.io/integrations/api-documentation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
