InTouch Hub · Blue Isle Software

Capsule CRM

Manage parties, opportunities, and tasks in Capsule CRM via its REST API v2.

Provided free and as is, without warranty of any kind — including merchantability, fitness for a particular purpose, and the accuracy or completeness of any result. See the licence. You are responsible for checking what this produces before relying on it.

capsulecontactscrmcrm-salesemailpipelinesalessearchstatussummary

Capsule CRM

Manage parties, opportunities, and tasks in Capsule CRM via its REST API v2.

This tool wraps the Capsule Developer API (https://api.capsulecrm.com/api/v2) using only the Python standard library. It reads and writes the three core Capsule record types — parties (people and organisations), opportunities, and tasks.

Operations

Operation Method / Endpoint What it does
list_parties GET /parties List parties (contacts), newest page first.
search_parties GET /parties/search?q= Search parties by name, postcode, or phone (requires query).
create_party POST /parties Create a person (firstName/lastName) or an organisation (organisation).
list_opportunities GET /opportunities List opportunities.
create_opportunity POST /opportunities Create an opportunity (requires name, partyId, milestoneId).
list_tasks GET /tasks List tasks; optional status filter (open/completed/pending).
create_task POST /tasks Create a task (requires description).

All read operations accept page (default 1) and perPage (1–100, default 50).

API key setup

Capsule supports a single personal access token so you do not need the full OAuth 2 flow for an internal integration:

  1. Sign in to Capsule.
  2. Go to My Preferences > API Authentication Tokens.
  3. Generate a token and copy it.
  4. Pass it as the apiKey input. The tool sends it as Authorization: Bearer <token> on every request.

No userEmail or app id is needed — the token alone authenticates the request.

Inputs

Input Required Notes
apiKey yes Personal access token (Bearer).
operation yes One of the operations above.
query for search_parties Search value.
name for create_opportunity Opportunity name (or org name on create_party).
firstName / lastName for person create_party At least one required.
organisation for org create_party Sets party type to organisation.
email optional Work email attached on create_party.
description for create_task Task summary (optional opportunity description).
detail optional Longer task note.
partyId for create_opportunity Required; optional on create_task.
milestoneId for create_opportunity Pipeline stage id.
dueOn optional Task due date, YYYY-MM-DD.
status optional list_tasks filter.
page / perPage optional Paging for list/search.

Outputs

The tool never raises on a non-2xx response; it returns the status and body so the caller can branch on them. A transport-level failure (DNS, refused, timeout) emits {"error": ...} and exits non-zero, marking the step FAILED.

Examples

Search for a contact named "Acme":

operation = search_parties
query     = Acme

Create a person with a work email:

operation = create_party
firstName = Scott
lastName  = Spacey
email     = [email protected]

Create an organisation:

operation    = create_party
organisation = Capsule Ltd
email        = [email protected]

Open a new opportunity against party 42 in milestone 3:

operation   = create_opportunity
name        = Website redesign
partyId     = 42
milestoneId = 3
description = Q3 redesign engagement

List open tasks:

operation = list_tasks
status    = open

Create a follow-up task due next week:

operation   = create_task
description  = Follow up on proposal
partyId      = 42
dueOn        = 2026-06-20

Notes

Publishes

The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.

Input Properties

Every property this tool accepts, from its own tool.iml.

Property Type Required Default Description
apiKey string yes — Capsule personal access token. Generate it in the Capsule web app under My Preferences > API Authentication Tokens (sent as the 'Authorization: Bearer ' header). A single token works without the OAuth 2 flow.
operation string yes — One of: list_parties, search_parties, create_party, list_opportunities, create_opportunity, list_tasks, create_task
query string no — For search_parties: the search value (a name, postcode, or phone number). Required for search_parties; ignored otherwise.
name string no — For create_opportunity this is the opportunity name (required). For create_party of an organisation this is the company name. Ignored by list/search.
firstName string no — First name for create_party (person). Provide firstName and/or lastName when creating a person.
lastName string no — Last name for create_party (person). Provide firstName and/or lastName when creating a person.
organisation string no — Company name for create_party. When set, the party is created as an organisation instead of a person.
email string no — Work email address attached to the new party on create_party. Ignored by other operations.
description string no — For create_task this is the task description/summary (required). For create_opportunity this is the optional opportunity description.
detail string no — Optional longer note/detail body for create_task. Ignored by other operations.
partyId string no — Numeric party id. Required for create_opportunity; optional for create_task to attach the task to a party.
milestoneId string no — Numeric milestone id for the opportunity's pipeline stage. Required for create_opportunity.
dueOn string no — Due date for create_task in YYYY-MM-DD format. Optional.
status string no — For list_tasks: filter by task status (open, completed, or pending). Defaults to all when empty.
page string no — 1-based page number for list/search operations. Defaults to 1 when empty.
perPage string no — Number of records per page for list/search operations (1-100). Defaults to 50 when empty.