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

# Capsule CRM

Capsule CRM customer relationship management platform. Search contacts, create parties, manage sales opportunities, and create follow-up tasks.

### Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

| Connector   | Authentication |
| ----------- | -------------- |
| Capsule CRM | API Token      |

#### Capsule CRM

Connect to Capsule CRM with an API token.

**Set up in Capsule CRM**

1. Sign in to Capsule, click your name in the top-right corner, and choose My Preferences.
2. In the left menu, select API Authentication Tokens.
3. Under Personal Access Tokens, click Generate new API token and copy the token.

**Set up in StackAI**

1. Open **Settings → Connections**, add a connection, and select **Capsule CRM**.
2. Enter the credentials and connection details in the fields below.
3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

**Connection fields**

| StackAI field | Required | What to enter                                                                                                                                                                          |
| ------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| API Token     | Yes      | A Capsule CRM API token. Create one in Capsule under My Preferences > API Authentication Tokens. [Provider instructions](https://developer.capsulecrm.com/v2/overview/authentication). |

**Provider documentation:** [Setup reference](https://developer.capsulecrm.com/v2/overview/authentication).

#### Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

### Use an action

1. Add the required **Capsule CRM** action to the workflow.
2. Select a connection when the action requests one.
3. Complete the required fields. Use the reference picker when a value comes from another workflow step.
4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

### Actions

#### Create Party

Create a person or organisation in Capsule CRM.

**Inputs**

| Field             | Type            | Required | Description                                                 |
| ----------------- | --------------- | -------- | ----------------------------------------------------------- |
| Party Type        | select (string) | Yes      | Capsule party type. Available values: Person, Organisation. |
| First Name        | string          | No       | Person first name.                                          |
| Last Name         | string          | No       | Person last name.                                           |
| Organisation Name | string          | No       | Organisation name.                                          |
| Job Title         | string          | No       | Person job title.                                           |
| About             | textarea        | No       | Free-text party notes.                                      |
| Organisation ID   | integer         | No       | Existing Capsule organisation ID for a person.              |
| Owner ID          | integer         | No       | Capsule owner user ID.                                      |
| Team ID           | integer         | No       | Capsule team ID.                                            |
| Embed             | array           | No       | Optional Capsule embeds to include.                         |

**Outputs**

| Field    | Type    | Description               |
| -------- | ------- | ------------------------- |
| Party ID | integer | Created Capsule party ID. |
| Party    | dict    | Raw created party.        |

#### Search Parties

Search people and organisations in Capsule CRM.

**Inputs**

| Field    | Type    | Required | Description                         |
| -------- | ------- | -------- | ----------------------------------- |
| Query    | string  | Yes      | Search query.                       |
| Page     | integer | No       | 1-based result page. Default: 1.    |
| Per Page | integer | No       | Results per page. Default: 50.      |
| Embed    | array   | No       | Optional Capsule embeds to include. |

**Outputs**

| Field    | Type        | Description                              |
| -------- | ----------- | ---------------------------------------- |
| Parties  | dict\_array | Matching Capsule parties.                |
| Count    | integer     | Number of parties returned.              |
| Has More | boolean     | Whether Capsule has another result page. |
| Page     | integer     | Current page.                            |
| Per Page | integer     | Requested results per page.              |

#### Create Opportunity

Create a sales opportunity in Capsule CRM.

**Inputs**

| Field             | Type            | Required | Description                                                                                 |
| ----------------- | --------------- | -------- | ------------------------------------------------------------------------------------------- |
| Name              | string          | Yes      | Opportunity name.                                                                           |
| Party ID          | integer         | Yes      | Capsule party ID.                                                                           |
| Milestone ID      | integer         | Yes      | Capsule milestone ID.                                                                       |
| Owner ID          | integer         | No       | Capsule owner user ID. Required unless Team ID is provided.                                 |
| Team ID           | integer         | No       | Capsule team ID. Required unless Owner ID is provided.                                      |
| Description       | textarea        | No       | Opportunity description.                                                                    |
| Value Amount      | number          | No       | Opportunity value amount.                                                                   |
| Value Currency    | string          | No       | Opportunity value currency.                                                                 |
| Expected Close On | date            | No       | Expected close date.                                                                        |
| Probability       | integer         | No       | Opportunity win probability.                                                                |
| Duration Basis    | select (string) | No       | Opportunity duration basis. Available values: Fixed, Hour, Day, Week, Month, Quarter, Year. |
| Duration          | integer         | No       | Opportunity duration.                                                                       |
| Embed             | array           | No       | Optional Capsule embeds to include.                                                         |

**Outputs**

| Field          | Type    | Description                     |
| -------------- | ------- | ------------------------------- |
| Opportunity ID | integer | Created Capsule opportunity ID. |
| Opportunity    | dict    | Raw created opportunity.        |

#### Update Opportunity

Update a sales opportunity in Capsule CRM.

**Inputs**

| Field             | Type            | Required | Description                                                                                 |
| ----------------- | --------------- | -------- | ------------------------------------------------------------------------------------------- |
| Opportunity ID    | integer         | Yes      | Capsule opportunity ID.                                                                     |
| Name              | string          | No       | Opportunity name.                                                                           |
| Milestone ID      | integer         | No       | Capsule milestone ID.                                                                       |
| Owner ID          | integer         | No       | Capsule owner user ID.                                                                      |
| Team ID           | integer         | No       | Capsule team ID.                                                                            |
| Description       | textarea        | No       | Opportunity description.                                                                    |
| Value Amount      | number          | No       | Opportunity value amount.                                                                   |
| Value Currency    | string          | No       | Opportunity value currency.                                                                 |
| Expected Close On | date            | No       | Expected close date.                                                                        |
| Probability       | integer         | No       | Opportunity win probability.                                                                |
| Duration Basis    | select (string) | No       | Opportunity duration basis. Available values: Fixed, Hour, Day, Week, Month, Quarter, Year. |
| Duration          | integer         | No       | Opportunity duration.                                                                       |
| Embed             | array           | No       | Optional Capsule embeds to include.                                                         |

**Outputs**

| Field          | Type    | Description                     |
| -------------- | ------- | ------------------------------- |
| Opportunity ID | integer | Updated Capsule opportunity ID. |
| Opportunity    | dict    | Raw updated opportunity.        |

#### Create Task

Create a follow-up task in Capsule CRM.

**Inputs**

| Field          | Type            | Required | Description                                              |
| -------------- | --------------- | -------- | -------------------------------------------------------- |
| Description    | string          | Yes      | Task description.                                        |
| Due On         | date            | Yes      | Task due date.                                           |
| Party ID       | integer         | No       | Capsule party ID.                                        |
| Opportunity ID | integer         | No       | Capsule opportunity ID.                                  |
| Detail         | textarea        | No       | Task detail.                                             |
| Due Time       | string          | No       | Task due time.                                           |
| Status         | select (string) | No       | Task status. Available values: Open, Completed, Pending. |
| Owner ID       | integer         | No       | Capsule owner user ID.                                   |
| Category ID    | integer         | No       | Capsule task category ID.                                |
| Embed          | array           | No       | Optional Capsule embeds to include.                      |

**Outputs**

| Field   | Type    | Description              |
| ------- | ------- | ------------------------ |
| Task ID | integer | Created Capsule task ID. |
| Task    | dict    | Raw created task.        |

### Important behavior

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/integrations/catalog/capsule-crm.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
