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

# Deploy via API

> Integrate your Agent into any application using the Cassidy Agents API for programmatic access.

Use the Cassidy Agents API to integrate your [Agent](https://docs.cassidyai.com/agents/overview.md) into any custom application, internal tool, or [Workflow](https://docs.cassidyai.com/workflows/overview.md).

> [!NOTE]
>
> **Prerequisites:**
>
> * An Agent created in Cassidy
> * An API key (or the ability to create one)

**1. Navigate to your Agent**

Go to **Agents** and select the Agent you want to deploy via API. Click **Edit** to open the Agent settings.

![Agents page showing the list of available Agents](https://mintcdn.com/cassidy/RZ75CscZWMGVg8C6/images/integrations/deploying-agents-via-api-img-0.png?fit=max\&auto=format\&n=RZ75CscZWMGVg8C6\&q=85\&s=be920871ae479312583841d799ccb946)

**2. Open the Deployments tab**

Navigate to the **Deployments** tab and select **Deploy via API**.

![Agent settings with the Deployments tab selected](https://mintcdn.com/cassidy/RZ75CscZWMGVg8C6/images/integrations/deploying-agents-via-api-img-1.png?fit=max\&auto=format\&n=RZ75CscZWMGVg8C6\&q=85\&s=6c88f7671c85ca9c876d854db3c2e418)

![Deploy via API section showing setup instructions and sample code](https://mintcdn.com/cassidy/RZ75CscZWMGVg8C6/images/integrations/deploying-agents-via-api-img-2.png?fit=max\&auto=format\&n=RZ75CscZWMGVg8C6\&q=85\&s=175537c4691875d946fac25446914bee)

**3. Open Organization Settings**

Click the **API Keys** link in the instructions. To navigate manually, open
your account menu and select **Organization Settings**.

**4. Navigate to the API Keys tab**

In the **Organization Settings** window, go to the **API Keys** tab.

![Organization Settings window with the API Keys tab selected](https://mintcdn.com/cassidy/RZ75CscZWMGVg8C6/images/integrations/deploying-agents-via-api-img-4.png?fit=max\&auto=format\&n=RZ75CscZWMGVg8C6\&q=85\&s=1c5983fa300be5ed7f7fa2e49eb23592)

**5. Create an API key**

Click **+ Create API Key**, enter a name for the key, and click **Create key**. Copy the key and save it to a secure location. Click **Done** when finished.

![Create API key dialog with name field and Create key button](https://mintcdn.com/cassidy/RZ75CscZWMGVg8C6/images/integrations/deploying-agents-via-api-img-5.png?fit=max\&auto=format\&n=RZ75CscZWMGVg8C6\&q=85\&s=640ee43eefe66d8ef791f538c8510251)

![API key revealed with copy button and Exit option](https://mintcdn.com/cassidy/RZ75CscZWMGVg8C6/images/integrations/deploying-agents-via-api-img-6.png?fit=max\&auto=format\&n=RZ75CscZWMGVg8C6\&q=85\&s=48f168e389c3b225dd0e000222cc5733)

> [!WARNING]
>
> Copy and save your API key immediately — you won't be able to see it again after closing the dialog.

**6. Use the sample code**

Return to the **Deploy via API** tab in your Agent's settings. Follow the sample code provided to create conversation threads and send messages programmatically.

![Deploy via API tab showing sample code for creating threads and sending messages](https://mintcdn.com/cassidy/RZ75CscZWMGVg8C6/images/integrations/deploying-agents-via-api-img-7.png?fit=max\&auto=format\&n=RZ75CscZWMGVg8C6\&q=85\&s=6c94c9e6606efb3443467a0247ad340d)

## API basics

The Cassidy Agents API uses threads and messages to manage conversations:

1. **Create a thread** — start a new conversation with the Agent
2. **Send a message** — add a user message to the thread
3. **Receive a response** — the Agent processes the message and returns a reply

For detailed endpoint documentation, request formats, and authentication details, see the [Cassidy Agents API reference](https://docs.cassidyai.com/reference/agents-api.md).

## API keys vs. Admin API keys

An API key acts as the user who created it, with that user's permissions. Your application can only do what that user can do, and the key stops working if that user is removed from your organization or disabled.

To pull organization-wide usage and activity into your own reports instead, use an [Admin API key](https://docs.cassidyai.com/reference/admin-api.md). Admin API keys act as your organization, not as a user, and can only read organization-wide data.

> [!WARNING]
>
> Keep your API key secure. Do not share it publicly or commit it to version
> control.

> [!TIP]
>
> You can delete an API key at any time from the **API Keys** tab by clicking
> the trash icon next to it and confirming.

## Next steps

> [card] [Agents overview](https://docs.cassidyai.com/agents/overview.md)
>
> Learn more about creating and configuring Agents.

> [card] [Deploy via email](https://docs.cassidyai.com/agents/deploy/email.md)
>
> Deploy your Agent to a dedicated email address.

> [card] [Deploy via embed](https://docs.cassidyai.com/agents/deploy/embed.md)
>
> Embed your Agent on a website without writing code.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.