InTouch Hub · Blue Isle Software

Affinity

Sync relationships, organizations, and deal lists in Affinity CRM via its REST API.

crmsalesaffinityrelationships

Affinity

Sync relationships, organizations, and deal lists in Affinity CRM via its V1 REST API.

This tool is a thin, deterministic wrapper over the Affinity V1 API (https://api.affinity.co). It reads lists and searches people and organizations, and writes new people, organizations, and lists. Responses are returned verbatim as the raw JSON body plus the HTTP status code, so jobs can parse or branch on them.

Operations

operation method + path type required params
list_lists GET /lists read
search_persons GET /persons?term=... read term
search_organizations GET /organizations?term=... read term
create_person POST /persons write firstName, lastName
create_organization POST /organizations write name
create_list POST /lists write name, listType

For search_persons, term may be an email address, first name, or last name. For search_organizations, term may be an organization name or a domain.

For create_list, listType is the Affinity list entity type code: 0 = person, 1 = organization, 8 = opportunity. Set isPublic to true to make the list visible to the whole team (default is private).

apiKey setup

  1. Sign in to Affinity and open Settings > API.
  2. Generate an API key.
  3. Pass it as the apiKey input.

Affinity authenticates with HTTP Basic auth: the API key is sent as the basic-auth password with an empty username (Authorization: Basic base64(":" + apiKey)). This tool handles that encoding for you — you only supply the raw key.

Outputs

On a transport-level failure the tool prints {"error": "..."} and exits non-zero so the job step is marked FAILED. Non-2xx HTTP responses (e.g. 401 unauthorized, 422 validation) are returned as result + status so the caller can inspect them.

Examples

List all accessible lists:

{ "apiKey": "AFFINITY_KEY", "operation": "list_lists" }

Search people by email or name:

{ "apiKey": "AFFINITY_KEY", "operation": "search_persons", "term": "[email protected]" }

Search organizations by name or domain:

{ "apiKey": "AFFINITY_KEY", "operation": "search_organizations", "term": "acme.com" }

Create a person:

{
  "apiKey": "AFFINITY_KEY",
  "operation": "create_person",
  "firstName": "Jane",
  "lastName": "Doe",
  "email": "[email protected]"
}

Create an organization:

{
  "apiKey": "AFFINITY_KEY",
  "operation": "create_organization",
  "name": "Acme Inc",
  "domain": "acme.com"
}

Create an organization list:

{
  "apiKey": "AFFINITY_KEY",
  "operation": "create_list",
  "name": "Q3 Pipeline",
  "listType": "1",
  "isPublic": "true"
}