# Capsule CRM

> Manage your Capsule CRM contacts and sales: find, add, update and delete people and organisations, track opportunities through the pipeline, start projects, create and complete tasks, and add notes to a record's history.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/capsule-crm

## Actions

### Add note

Add a note to the history of one contact, opportunity or project.

**Inputs**

- Note (`content`, text, required): The text of the note.
- Contact ID (`party_id`, text): Attach it to this contact. Give only one of the three ids.
- Opportunity ID (`opportunity_id`, text): Or attach it to this opportunity.
- Project ID (`project_id`, text): Or attach it to this project.
- When (`entry_at`, date and time): When it happened. Left empty, now.

**Outputs**

- `entry` (object): The history entry

**Example output**

```json
{
  "entry": {
    "activityType": {
      "id": -1,
      "name": "Note"
    },
    "content": "Called Ann about the proposal.",
    "createdAt": "2026-10-16T10:30:00Z",
    "creator": {
      "id": 61,
      "name": "Jo Bloggs",
      "username": "jo"
    },
    "entryAt": "2026-10-16T10:30:00Z",
    "id": 145,
    "party": {
      "id": 11588,
      "name": "Ann Smith",
      "pictureURL": "https://capsulecrm.com/theme/default/images/person_avatar_70.png",
      "type": "person"
    },
    "subject": null,
    "type": "note",
    "updatedAt": "2026-10-16T10:30:00Z"
  }
}
```

### Create contact

Add a person or an organisation to Capsule, with an email address, phone number, website, postal address and tags.

**Inputs**

- Contact type (`party_type`, text, required): A person (give a first or last name) or an organisation (give an organisation name). One of: `person`, `organisation`.
- First name (`first_name`, text): A person's first name.
- Last name (`last_name`, text): A person's last name.
- Job title (`job_title`, text): A person's job title.
- Organisation (`organisation`, text): The organisation a person works for: its id, or its name. A name Capsule does not have yet creates the organisation.
- Organisation name (`name`, text): An organisation's name. Capsule requires it to be unique.
- Background (`about`, text): Notes about the contact, shown on its page in Capsule.
- Email address (`email`, text): An email address. On an update it is added beside the existing ones.
- Email type (`email_type`, text): Whether the email address is for work or home. One of: `Work`, `Home`.
- Phone number (`phone`, text): A phone number. On an update it is added beside the existing ones.
- Phone type (`phone_type`, text): What kind of phone number it is. One of: `Work`, `Mobile`, `Direct`, `Home`, `Fax`.
- Website (`website`, text): A web address, such as https://example.com. Added on an update.
- Street (`street`, text): The street part of a postal address. Added on an update.
- City (`city`, text): The city of the postal address.
- State or county (`state`, text): The state or county of the postal address.
- Postcode (`zip_code`, text): The postcode or ZIP code of the postal address.
- Country (`country`, text): The country's name in English, such as United Kingdom.
- Address type (`address_type`, text): What kind of address it is. One of: `Office`, `Postal`, `Billing`, `Shipping`, `Home`.
- Owner (`owner_id`, text): The Capsule user who owns it. Left empty, Capsule makes it you.
- Tags (`tags`, list): Tag names to add. A tag Capsule does not have yet is created.

**Outputs**

- `party` (object): The contact

**Example output**

```json
{
  "party": {
    "about": null,
    "addresses": [
      {
        "city": "London",
        "country": "United Kingdom",
        "id": 12137,
        "state": null,
        "street": "1 High Street",
        "type": "Office",
        "zip": "EC1A 1AA"
      }
    ],
    "createdAt": "2026-10-15T09:00:00Z",
    "emailAddresses": [
      {
        "address": "ann@example.com",
        "id": 12135,
        "type": "Work"
      }
    ],
    "firstName": "Ann",
    "id": 11588,
    "jobTitle": "Head of Sales",
    "lastContactedAt": null,
    "lastName": "Smith",
    "name": null,
    "organisation": {
      "id": 11587,
      "name": "Acme Ltd",
      "pictureURL": "https://capsulecrm.com/theme/default/images/org_avatar_70.png",
      "type": "organisation"
    },
    "owner": {
      "id": 61,
      "name": "Jo Bloggs",
      "username": "jo"
    },
    "phoneNumbers": [
      {
        "id": 12136,
        "number": "+44 20 7946 0000",
        "type": "Work"
      }
    ],
    "pictureURL": "https://capsulecrm.com/theme/default/images/person_avatar_70.png",
    "tags": [
      {
        "id": 94,
        "name": "Customer"
      }
    ],
    "team": null,
    "title": null,
    "type": "person",
    "updatedAt": "2026-10-16T10:30:00Z",
    "websites": [
      {
        "address": "https://example.com",
        "id": 12138,
        "service": "URL",
        "type": "Work",
        "url": "https://example.com"
      }
    ]
  }
}
```

### Create opportunity

Add a sales opportunity for a contact at a pipeline milestone, with its value and expected close date.

**Inputs**

- Contact ID (`party_id`, text, required): The person or organisation the opportunity is with, by id, from 'Search contacts' or an earlier step.
- Name (`name`, text, required): The opportunity's name, such as 'Website redesign'.
- Milestone (`milestone_id`, text, required): The pipeline stage the opportunity is at.
- Description (`description`, text): What the opportunity is about.
- Value (`value_amount`, number): What the opportunity is worth, such as 1500. At least 0.
- Currency (`currency`, text): The value's three-letter currency code, such as GBP or USD. Left empty, Capsule uses the account's currency.
- Expected close date (`expected_close_on`, date): When you expect to win or lose it.
- Probability (`probability`, number): The chance of winning it, 0 to 100 percent. Left empty, the milestone's own probability applies. From 0 to 100.
- Value is paid (`duration_basis`, text): Whether the value is paid once, or per hour, day, month and so on. One of: `FIXED` (One-off (fixed value)), `HOUR` (Per hour), `DAY` (Per day), `WEEK` (Per week), `MONTH` (Per month), `QUARTER` (Per quarter), `YEAR` (Per year).
- Number of periods (`duration`, number): For a value paid per period, how many periods: 12 with Per month is a year's contract. Leave empty for a one-off value. At least 1.
- Owner (`owner_id`, text): The Capsule user who owns it. Left empty, Capsule makes it you.
- Tags (`tags`, list): Tag names to add. A tag Capsule does not have yet is created.

**Outputs**

- `opportunity` (object): The opportunity

**Example output**

```json
{
  "opportunity": {
    "closedOn": null,
    "createdAt": "2026-10-15T09:00:00Z",
    "description": "A new site for Acme.",
    "duration": null,
    "durationBasis": "FIXED",
    "expectedCloseOn": "2026-12-31",
    "id": 83948,
    "lastContactedAt": null,
    "lostReason": null,
    "milestone": {
      "id": 14,
      "name": "Proposal"
    },
    "name": "Website redesign",
    "owner": {
      "id": 61,
      "name": "Jo Bloggs",
      "username": "jo"
    },
    "party": {
      "id": 11588,
      "name": "Ann Smith",
      "pictureURL": "https://capsulecrm.com/theme/default/images/person_avatar_70.png",
      "type": "person"
    },
    "probability": 40,
    "tags": [],
    "team": null,
    "updatedAt": "2026-10-16T10:30:00Z",
    "value": {
      "amount": 1500,
      "currency": "GBP"
    }
  }
}
```

### Create project

Add a project for a contact, optionally linked to the opportunity it came from.

**Inputs**

- Contact ID (`party_id`, text, required): The person or organisation the project is for, by id.
- Name (`name`, text, required): The project's name.
- Description (`description`, text): What the project is about.
- Opportunity ID (`opportunity_id`, text): The opportunity the project came from, if any.
- Start date (`start_on`, date): When the project starts.
- Expected close date (`expected_close_on`, date): When you expect the project to finish.
- Owner (`owner_id`, text): The Capsule user who owns it. Left empty, Capsule makes it you.
- Tags (`tags`, list): Tag names to add. A tag Capsule does not have yet is created.

**Outputs**

- `project` (object): The project

**Example output**

```json
{
  "project": {
    "closedOn": null,
    "createdAt": "2026-10-15T09:00:00Z",
    "description": "Build the site Acme bought.",
    "expectedCloseOn": "2027-03-31",
    "id": 39581,
    "name": "Website build",
    "opportunity": null,
    "owner": {
      "id": 61,
      "name": "Jo Bloggs",
      "username": "jo"
    },
    "party": {
      "id": 11588,
      "name": "Ann Smith",
      "pictureURL": "https://capsulecrm.com/theme/default/images/person_avatar_70.png",
      "type": "person"
    },
    "stage": null,
    "startOn": "2027-01-04",
    "status": "OPEN",
    "team": null,
    "updatedAt": "2026-10-15T09:00:00Z"
  }
}
```

### Create task

Add a task with a due date, on its own or attached to one contact, opportunity or project.

**Inputs**

- Task (`description`, text, required): What needs doing, such as 'Send the proposal'.
- Due date (`due_on`, date, required): The day the task is due.
- Due time (`due_time`, time): The time it is due, in the owner's time zone.
- Details (`detail`, text): More about the task.
- Contact ID (`party_id`, text): Attach it to this contact. Give only one of the three ids.
- Opportunity ID (`opportunity_id`, text): Or attach it to this opportunity.
- Project ID (`project_id`, text): Or attach it to this project.
- Owner (`owner_id`, text): The Capsule user who owns it. Left empty, Capsule makes it you.

**Outputs**

- `task` (object): The task

**Example output**

```json
{
  "task": {
    "completedAt": null,
    "createdAt": "2026-10-15T09:00:00Z",
    "description": "Send the proposal",
    "detail": null,
    "dueOn": "2026-10-30",
    "dueTime": "09:30:00",
    "id": 9012,
    "kase": null,
    "opportunity": null,
    "owner": {
      "id": 61,
      "name": "Jo Bloggs",
      "username": "jo"
    },
    "party": {
      "id": 11588,
      "name": "Ann Smith",
      "pictureURL": "https://capsulecrm.com/theme/default/images/person_avatar_70.png",
      "type": "person"
    },
    "status": "OPEN",
    "updatedAt": "2026-10-15T09:00:00Z"
  }
}
```

### Delete contact

Delete a person or organisation from Capsule, with its history. Capsule may finish a large deletion a little later.

**Inputs**

- Contact ID (`party_id`, text, required): The person's or organisation's id, from 'List contacts', 'Search contacts' or an earlier step. The contact's page address works too.

**Outputs**

- `deleted` (true/false): Always true once accepted
- `job_url` (text): Where to check a scheduled deletion; empty otherwise
- `party_id` (number): The contact deleted
- `scheduled` (true/false): True when Capsule will finish the deletion later

**Example output**

```json
{
  "deleted": true,
  "job_url": "",
  "party_id": 11588,
  "scheduled": false
}
```

### Delete opportunity

Delete a sales opportunity from Capsule.

**Inputs**

- Opportunity ID (`opportunity_id`, text, required): The opportunity's id, from 'List opportunities' or an earlier step. The opportunity's page address works too.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `opportunity_id` (number): The opportunity deleted

**Example output**

```json
{
  "deleted": true,
  "opportunity_id": 83948
}
```

### Get contact

Get one person or organisation with its email addresses, phone numbers, addresses, websites and owner.

**Inputs**

- Contact ID (`party_id`, text, required): The person's or organisation's id, from 'List contacts', 'Search contacts' or an earlier step. The contact's page address works too.
- Include (`embed`, list): Extra details to return with each contact. One or more of: `tags`, `fields` (Custom fields), `organisation` (Organisation details), `missingImportantFields` (Missing important fields flag).

**Outputs**

- `party` (object): The contact

**Example output**

```json
{
  "party": {
    "about": null,
    "addresses": [
      {
        "city": "London",
        "country": "United Kingdom",
        "id": 12137,
        "state": null,
        "street": "1 High Street",
        "type": "Office",
        "zip": "EC1A 1AA"
      }
    ],
    "createdAt": "2026-10-15T09:00:00Z",
    "emailAddresses": [
      {
        "address": "ann@example.com",
        "id": 12135,
        "type": "Work"
      }
    ],
    "firstName": "Ann",
    "id": 11588,
    "jobTitle": "Head of Sales",
    "lastContactedAt": null,
    "lastName": "Smith",
    "name": null,
    "organisation": {
      "id": 11587,
      "name": "Acme Ltd",
      "pictureURL": "https://capsulecrm.com/theme/default/images/org_avatar_70.png",
      "type": "organisation"
    },
    "owner": {
      "id": 61,
      "name": "Jo Bloggs",
      "username": "jo"
    },
    "phoneNumbers": [
      {
        "id": 12136,
        "number": "+44 20 7946 0000",
        "type": "Work"
      }
    ],
    "pictureURL": "https://capsulecrm.com/theme/default/images/person_avatar_70.png",
    "tags": [
      {
        "id": 94,
        "name": "Customer"
      }
    ],
    "team": null,
    "title": null,
    "type": "person",
    "updatedAt": "2026-10-16T10:30:00Z",
    "websites": [
      {
        "address": "https://example.com",
        "id": 12138,
        "service": "URL",
        "type": "Work",
        "url": "https://example.com"
      }
    ]
  }
}
```

### Get opportunity

Get one sales opportunity with its contact, milestone, value, probability and expected close date.

**Inputs**

- Opportunity ID (`opportunity_id`, text, required): The opportunity's id, from 'List opportunities' or an earlier step. The opportunity's page address works too.
- Include (`embed`, list): Extra details to return with each opportunity. One or more of: `tags`, `fields` (Custom fields), `party` (Contact details), `milestone` (Milestone details), `missingImportantFields` (Missing important fields flag).

**Outputs**

- `opportunity` (object): The opportunity

**Example output**

```json
{
  "opportunity": {
    "closedOn": null,
    "createdAt": "2026-10-15T09:00:00Z",
    "description": "A new site for Acme.",
    "duration": null,
    "durationBasis": "FIXED",
    "expectedCloseOn": "2026-12-31",
    "id": 83948,
    "lastContactedAt": null,
    "lostReason": null,
    "milestone": {
      "id": 14,
      "name": "Proposal"
    },
    "name": "Website redesign",
    "owner": {
      "id": 61,
      "name": "Jo Bloggs",
      "username": "jo"
    },
    "party": {
      "id": 11588,
      "name": "Ann Smith",
      "pictureURL": "https://capsulecrm.com/theme/default/images/person_avatar_70.png",
      "type": "person"
    },
    "probability": 40,
    "tags": [],
    "team": null,
    "updatedAt": "2026-10-16T10:30:00Z",
    "value": {
      "amount": 1500,
      "currency": "GBP"
    }
  }
}
```

### List contacts

List the people and organisations in Capsule, one page at a time, optionally only those changed since a moment.

**Inputs**

- Changed since (`since`, date and time): Only records created or changed after this moment.
- Include (`embed`, list): Extra details to return with each contact. One or more of: `tags`, `fields` (Custom fields), `organisation` (Organisation details), `missingImportantFields` (Missing important fields flag).
- Page (`page`, number): Which page to return, starting at 1. Use 'next_page' from a result. At least 1.
- Page size (`per_page`, number): How many to return, 1 to 100. Capsule's default is 50. From 1 to 100.

**Outputs**

- `count` (number): How many are on this page
- `has_more` (true/false): True when there is another page
- `next_page` (number): The page to ask for next; null on the last page
- `page` (number): The page number this is
- `parties` (list): The contacts on this page

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_page": null,
  "page": 1,
  "parties": [
    {
      "about": null,
      "addresses": [
        {
          "city": "London",
          "country": "United Kingdom",
          "id": 12137,
          "state": null,
          "street": "1 High Street",
          "type": "Office",
          "zip": "EC1A 1AA"
        }
      ],
      "createdAt": "2026-10-15T09:00:00Z",
      "emailAddresses": [
        {
          "address": "ann@example.com",
          "id": 12135,
          "type": "Work"
        }
      ],
      "firstName": "Ann",
      "id": 11588,
      "jobTitle": "Head of Sales",
      "lastContactedAt": null,
      "lastName": "Smith",
      "name": null,
      "organisation": {
        "id": 11587,
        "name": "Acme Ltd",
        "pictureURL": "https://capsulecrm.com/theme/default/images/org_avatar_70.png",
        "type": "organisation"
      },
      "owner": {
        "id": 61,
        "name": "Jo Bloggs",
        "username": "jo"
      },
      "phoneNumbers": [
        {
          "id": 12136,
          "number": "+44 20 7946 0000",
          "type": "Work"
        }
      ],
      "pictureURL": "https://capsulecrm.com/theme/default/images/person_avatar_70.png",
      "tags": [
        {
          "id": 94,
          "name": "Customer"
        }
      ],
      "team": null,
      "title": null,
      "type": "person",
      "updatedAt": "2026-10-16T10:30:00Z",
      "websites": [
        {
          "address": "https://example.com",
          "id": 12138,
          "service": "URL",
          "type": "Work",
          "url": "https://example.com"
        }
      ]
    }
  ]
}
```

### List history

List the history of one contact, opportunity or project: its notes, emails and completed tasks, newest first.

**Inputs**

- Record type (`parent_type`, text, required): Whether the id is a contact's, an opportunity's or a project's. One of: `parties` (Contact), `opportunities` (Opportunity), `kases` (Project).
- Record ID (`parent_id`, text, required): The contact's, opportunity's or project's id.
- Page (`page`, number): Which page to return, starting at 1. Use 'next_page' from a result. At least 1.
- Page size (`per_page`, number): How many to return, 1 to 50. Capsule's default is 50. From 1 to 50.

**Outputs**

- `count` (number): How many are on this page
- `entries` (list): The history entries on this page
- `has_more` (true/false): True when there is another page
- `next_page` (number): The page to ask for next; null on the last page
- `page` (number): The page number this is

**Example output**

```json
{
  "count": 1,
  "entries": [
    {
      "activityType": {
        "id": -1,
        "name": "Note"
      },
      "content": "Called Ann about the proposal.",
      "createdAt": "2026-10-16T10:30:00Z",
      "creator": {
        "id": 61,
        "name": "Jo Bloggs",
        "username": "jo"
      },
      "entryAt": "2026-10-16T10:30:00Z",
      "id": 145,
      "party": {
        "id": 11588,
        "name": "Ann Smith",
        "pictureURL": "https://capsulecrm.com/theme/default/images/person_avatar_70.png",
        "type": "person"
      },
      "subject": null,
      "type": "note",
      "updatedAt": "2026-10-16T10:30:00Z"
    }
  ],
  "has_more": false,
  "next_page": null,
  "page": 1
}
```

### List milestones

List the sales pipeline's milestones with their probabilities. Won and Lost are marked as closing an opportunity.

**Inputs**

- Page (`page`, number): Which page to return, starting at 1. Use 'next_page' from a result. At least 1.
- Page size (`per_page`, number): How many to return, 1 to 100. Capsule's default is 50. From 1 to 100.

**Outputs**

- `count` (number): How many are on this page
- `has_more` (true/false): True when there is another page
- `milestones` (list): The milestones
- `next_page` (number): The page to ask for next; null on the last page
- `page` (number): The page number this is

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "milestones": [
    {
      "complete": false,
      "createdAt": "2026-01-05T09:00:00Z",
      "daysUntilStale": 14,
      "description": "A proposal has been sent",
      "id": 14,
      "name": "Proposal",
      "probability": 40,
      "updatedAt": "2026-01-05T09:00:00Z"
    }
  ],
  "next_page": null,
  "page": 1
}
```

### List opportunities

List sales opportunities with their contact, milestone and value, one page at a time, optionally only those changed since a moment.

**Inputs**

- Changed since (`since`, date and time): Only records created or changed after this moment.
- Include (`embed`, list): Extra details to return with each opportunity. One or more of: `tags`, `fields` (Custom fields), `party` (Contact details), `milestone` (Milestone details), `missingImportantFields` (Missing important fields flag).
- Page (`page`, number): Which page to return, starting at 1. Use 'next_page' from a result. At least 1.
- Page size (`per_page`, number): How many to return, 1 to 100. Capsule's default is 50. From 1 to 100.

**Outputs**

- `count` (number): How many are on this page
- `has_more` (true/false): True when there is another page
- `next_page` (number): The page to ask for next; null on the last page
- `opportunities` (list): The opportunities on this page
- `page` (number): The page number this is

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_page": null,
  "opportunities": [
    {
      "closedOn": null,
      "createdAt": "2026-10-15T09:00:00Z",
      "description": "A new site for Acme.",
      "duration": null,
      "durationBasis": "FIXED",
      "expectedCloseOn": "2026-12-31",
      "id": 83948,
      "lastContactedAt": null,
      "lostReason": null,
      "milestone": {
        "id": 14,
        "name": "Proposal"
      },
      "name": "Website redesign",
      "owner": {
        "id": 61,
        "name": "Jo Bloggs",
        "username": "jo"
      },
      "party": {
        "id": 11588,
        "name": "Ann Smith",
        "pictureURL": "https://capsulecrm.com/theme/default/images/person_avatar_70.png",
        "type": "person"
      },
      "probability": 40,
      "tags": [],
      "team": null,
      "updatedAt": "2026-10-16T10:30:00Z",
      "value": {
        "amount": 1500,
        "currency": "GBP"
      }
    }
  ],
  "page": 1
}
```

### List projects

List projects with their contact, status and dates, one page at a time, optionally only those changed since a moment.

**Inputs**

- Changed since (`since`, date and time): Only records created or changed after this moment.
- Include (`embed`, list): Extra details to return with each project. One or more of: `tags`, `fields` (Custom fields), `party` (Contact details), `opportunity` (Opportunity details), `missingImportantFields` (Missing important fields flag).
- Page (`page`, number): Which page to return, starting at 1. Use 'next_page' from a result. At least 1.
- Page size (`per_page`, number): How many to return, 1 to 100. Capsule's default is 50. From 1 to 100.

**Outputs**

- `count` (number): How many are on this page
- `has_more` (true/false): True when there is another page
- `next_page` (number): The page to ask for next; null on the last page
- `page` (number): The page number this is
- `projects` (list): The projects on this page

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_page": null,
  "page": 1,
  "projects": [
    {
      "closedOn": null,
      "createdAt": "2026-10-15T09:00:00Z",
      "description": "Build the site Acme bought.",
      "expectedCloseOn": "2027-03-31",
      "id": 39581,
      "name": "Website build",
      "opportunity": null,
      "owner": {
        "id": 61,
        "name": "Jo Bloggs",
        "username": "jo"
      },
      "party": {
        "id": 11588,
        "name": "Ann Smith",
        "pictureURL": "https://capsulecrm.com/theme/default/images/person_avatar_70.png",
        "type": "person"
      },
      "stage": null,
      "startOn": "2027-01-04",
      "status": "OPEN",
      "team": null,
      "updatedAt": "2026-10-15T09:00:00Z"
    }
  ]
}
```

### List tasks

List tasks with their due dates and what they are attached to. Capsule returns only open tasks unless you choose a status.

**Inputs**

- Status (`status`, list): Which tasks to include. Left empty, open tasks only. One or more of: `open`, `completed`, `pending`.
- Include (`embed`, list): Extra details to return with each task. One or more of: `party` (Contact details), `opportunity` (Opportunity details), `kase` (Project details), `owner` (Owner details), `nextTask` (Next task in its track).
- Page (`page`, number): Which page to return, starting at 1. Use 'next_page' from a result. At least 1.
- Page size (`per_page`, number): How many to return, 1 to 100. Capsule's default is 50. From 1 to 100.

**Outputs**

- `count` (number): How many are on this page
- `has_more` (true/false): True when there is another page
- `next_page` (number): The page to ask for next; null on the last page
- `page` (number): The page number this is
- `tasks` (list): The tasks on this page

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_page": null,
  "page": 1,
  "tasks": [
    {
      "completedAt": null,
      "createdAt": "2026-10-15T09:00:00Z",
      "description": "Send the proposal",
      "detail": null,
      "dueOn": "2026-10-30",
      "dueTime": "09:30:00",
      "id": 9012,
      "kase": null,
      "opportunity": null,
      "owner": {
        "id": 61,
        "name": "Jo Bloggs",
        "username": "jo"
      },
      "party": {
        "id": 11588,
        "name": "Ann Smith",
        "pictureURL": "https://capsulecrm.com/theme/default/images/person_avatar_70.png",
        "type": "person"
      },
      "status": "OPEN",
      "updatedAt": "2026-10-15T09:00:00Z"
    }
  ]
}
```

### List users

List the users on the Capsule account with their time zones and default currencies.

**Inputs**: None.

**Outputs**

- `count` (number): How many users there are
- `users` (list): The account's users

**Example output**

```json
{
  "count": 1,
  "users": [
    {
      "currency": "GBP",
      "id": 61,
      "lastLoginAt": "2026-10-16T08:00:00Z",
      "locale": "en-GB",
      "name": "Jo Bloggs",
      "party": {
        "id": 891,
        "name": "Jo Bloggs",
        "pictureURL": "https://capsulecrm.com/theme/default/images/person_avatar_70.png",
        "type": "person"
      },
      "status": "ACTIVE",
      "timezone": "Europe/London",
      "username": "jo"
    }
  ]
}
```

### Search contacts

Find people and organisations by name, postcode or phone number, the same way Capsule's own search box does.

**Inputs**

- Search for (`query`, text, required): A name, a postcode or a phone number.
- Include (`embed`, list): Extra details to return with each contact. One or more of: `tags`, `fields` (Custom fields), `organisation` (Organisation details), `missingImportantFields` (Missing important fields flag).
- Page (`page`, number): Which page to return, starting at 1. Use 'next_page' from a result. At least 1.
- Page size (`per_page`, number): How many to return, 1 to 100. Capsule's default is 50. From 1 to 100.

**Outputs**

- `count` (number): How many are on this page
- `has_more` (true/false): True when there is another page
- `next_page` (number): The page to ask for next; null on the last page
- `page` (number): The page number this is
- `parties` (list): The matching contacts

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_page": null,
  "page": 1,
  "parties": [
    {
      "about": null,
      "addresses": [
        {
          "city": "London",
          "country": "United Kingdom",
          "id": 12137,
          "state": null,
          "street": "1 High Street",
          "type": "Office",
          "zip": "EC1A 1AA"
        }
      ],
      "createdAt": "2026-10-15T09:00:00Z",
      "emailAddresses": [
        {
          "address": "ann@example.com",
          "id": 12135,
          "type": "Work"
        }
      ],
      "firstName": "Ann",
      "id": 11588,
      "jobTitle": "Head of Sales",
      "lastContactedAt": null,
      "lastName": "Smith",
      "name": null,
      "organisation": {
        "id": 11587,
        "name": "Acme Ltd",
        "pictureURL": "https://capsulecrm.com/theme/default/images/org_avatar_70.png",
        "type": "organisation"
      },
      "owner": {
        "id": 61,
        "name": "Jo Bloggs",
        "username": "jo"
      },
      "phoneNumbers": [
        {
          "id": 12136,
          "number": "+44 20 7946 0000",
          "type": "Work"
        }
      ],
      "pictureURL": "https://capsulecrm.com/theme/default/images/person_avatar_70.png",
      "tags": [
        {
          "id": 94,
          "name": "Customer"
        }
      ],
      "team": null,
      "title": null,
      "type": "person",
      "updatedAt": "2026-10-16T10:30:00Z",
      "websites": [
        {
          "address": "https://example.com",
          "id": 12138,
          "service": "URL",
          "type": "Work",
          "url": "https://example.com"
        }
      ]
    }
  ]
}
```

### Update contact

Change a person's or organisation's details. Only the fields you fill in change. An email address, phone number, website, address or tag is added beside the existing ones, never replacing them.

**Inputs**

- Contact ID (`party_id`, text, required): The person's or organisation's id, from 'List contacts', 'Search contacts' or an earlier step. The contact's page address works too.
- First name (`first_name`, text): A person's first name.
- Last name (`last_name`, text): A person's last name.
- Job title (`job_title`, text): A person's job title.
- Organisation (`organisation`, text): The organisation a person works for: its id, or its name. A name Capsule does not have yet creates the organisation.
- Organisation name (`name`, text): An organisation's name. Capsule requires it to be unique.
- Background (`about`, text): Notes about the contact, shown on its page in Capsule.
- Email address (`email`, text): An email address. On an update it is added beside the existing ones.
- Email type (`email_type`, text): Whether the email address is for work or home. One of: `Work`, `Home`.
- Phone number (`phone`, text): A phone number. On an update it is added beside the existing ones.
- Phone type (`phone_type`, text): What kind of phone number it is. One of: `Work`, `Mobile`, `Direct`, `Home`, `Fax`.
- Website (`website`, text): A web address, such as https://example.com. Added on an update.
- Street (`street`, text): The street part of a postal address. Added on an update.
- City (`city`, text): The city of the postal address.
- State or county (`state`, text): The state or county of the postal address.
- Postcode (`zip_code`, text): The postcode or ZIP code of the postal address.
- Country (`country`, text): The country's name in English, such as United Kingdom.
- Address type (`address_type`, text): What kind of address it is. One of: `Office`, `Postal`, `Billing`, `Shipping`, `Home`.
- Owner (`owner_id`, text): Hand it to another Capsule user. Left empty, the owner stays.
- Tags (`tags`, list): Tag names to add. A tag Capsule does not have yet is created.

**Outputs**

- `party` (object): The contact

**Example output**

```json
{
  "party": {
    "about": null,
    "addresses": [
      {
        "city": "London",
        "country": "United Kingdom",
        "id": 12137,
        "state": null,
        "street": "1 High Street",
        "type": "Office",
        "zip": "EC1A 1AA"
      }
    ],
    "createdAt": "2026-10-15T09:00:00Z",
    "emailAddresses": [
      {
        "address": "ann@example.com",
        "id": 12135,
        "type": "Work"
      }
    ],
    "firstName": "Ann",
    "id": 11588,
    "jobTitle": "Head of Sales",
    "lastContactedAt": null,
    "lastName": "Smith",
    "name": null,
    "organisation": {
      "id": 11587,
      "name": "Acme Ltd",
      "pictureURL": "https://capsulecrm.com/theme/default/images/org_avatar_70.png",
      "type": "organisation"
    },
    "owner": {
      "id": 61,
      "name": "Jo Bloggs",
      "username": "jo"
    },
    "phoneNumbers": [
      {
        "id": 12136,
        "number": "+44 20 7946 0000",
        "type": "Work"
      }
    ],
    "pictureURL": "https://capsulecrm.com/theme/default/images/person_avatar_70.png",
    "tags": [
      {
        "id": 94,
        "name": "Customer"
      }
    ],
    "team": null,
    "title": null,
    "type": "person",
    "updatedAt": "2026-10-16T10:30:00Z",
    "websites": [
      {
        "address": "https://example.com",
        "id": 12138,
        "service": "URL",
        "type": "Work",
        "url": "https://example.com"
      }
    ]
  }
}
```

### Update opportunity

Change an opportunity's details or move it along the pipeline. Only the fields you fill in change; moving it to the Won or Lost milestone closes it.

**Inputs**

- Opportunity ID (`opportunity_id`, text, required): The opportunity's id, from 'List opportunities' or an earlier step. The opportunity's page address works too.
- Name (`name`, text): A new name for the opportunity.
- Milestone (`milestone_id`, text): Move it to this milestone. Moving it to Won or Lost closes the opportunity.
- Description (`description`, text): What the opportunity is about.
- Value (`value_amount`, number): What the opportunity is worth, such as 1500. At least 0.
- Currency (`currency`, text): The value's three-letter currency code, such as GBP or USD. Left empty, Capsule uses the account's currency.
- Expected close date (`expected_close_on`, date): When you expect to win or lose it.
- Probability (`probability`, number): The chance of winning it, 0 to 100 percent. Left empty, the milestone's own probability applies. From 0 to 100.
- Value is paid (`duration_basis`, text): Whether the value is paid once, or per hour, day, month and so on. One of: `FIXED` (One-off (fixed value)), `HOUR` (Per hour), `DAY` (Per day), `WEEK` (Per week), `MONTH` (Per month), `QUARTER` (Per quarter), `YEAR` (Per year).
- Number of periods (`duration`, number): For a value paid per period, how many periods: 12 with Per month is a year's contract. Leave empty for a one-off value. At least 1.
- Owner (`owner_id`, text): Hand it to another Capsule user. Left empty, the owner stays.

**Outputs**

- `opportunity` (object): The opportunity

**Example output**

```json
{
  "opportunity": {
    "closedOn": null,
    "createdAt": "2026-10-15T09:00:00Z",
    "description": "A new site for Acme.",
    "duration": null,
    "durationBasis": "FIXED",
    "expectedCloseOn": "2026-12-31",
    "id": 83948,
    "lastContactedAt": null,
    "lostReason": null,
    "milestone": {
      "id": 14,
      "name": "Proposal"
    },
    "name": "Website redesign",
    "owner": {
      "id": 61,
      "name": "Jo Bloggs",
      "username": "jo"
    },
    "party": {
      "id": 11588,
      "name": "Ann Smith",
      "pictureURL": "https://capsulecrm.com/theme/default/images/person_avatar_70.png",
      "type": "person"
    },
    "probability": 40,
    "tags": [],
    "team": null,
    "updatedAt": "2026-10-16T10:30:00Z",
    "value": {
      "amount": 1500,
      "currency": "GBP"
    }
  }
}
```

### Update task

Change a task's details or due date, or complete it by setting its status to Completed. Only the fields you fill in change.

**Inputs**

- Task ID (`task_id`, text, required): The task's id, from 'List tasks' or 'Create task'.
- Task (`description`, text): A new description of what needs doing.
- Details (`detail`, text): New details for the task.
- Due date (`due_on`, date): A new due date.
- Due time (`due_time`, time): A new due time, in the owner's time zone.
- Status (`status`, text): Completed to complete the task, Open to reopen it. One of: `OPEN`, `COMPLETED`.
- Owner (`owner_id`, text): Hand it to another Capsule user. Left empty, the owner stays.

**Outputs**

- `task` (object): The task

**Example output**

```json
{
  "task": {
    "completedAt": null,
    "createdAt": "2026-10-15T09:00:00Z",
    "description": "Send the proposal",
    "detail": null,
    "dueOn": "2026-10-30",
    "dueTime": "09:30:00",
    "id": 9012,
    "kase": null,
    "opportunity": null,
    "owner": {
      "id": 61,
      "name": "Jo Bloggs",
      "username": "jo"
    },
    "party": {
      "id": 11588,
      "name": "Ann Smith",
      "pictureURL": "https://capsulecrm.com/theme/default/images/person_avatar_70.png",
      "type": "person"
    },
    "status": "COMPLETED",
    "updatedAt": "2026-10-15T09:00:00Z"
  }
}
```
