Tools
This is a reference catalogue. Tools cannot be configured or run from this page.
Get Relationships for a Company
AFFINITY_GET_RELATIONSHIPS_FOR_A_COMPANYAffinity API v2 action. Get Relationships for a Company. Returns the relationships for a given company, including the interaction score that measures the strength of each relationship based on communication patterns such as emails, meetings, and other interactions. Each relationship includes two persons (person1 and person2) who have a connection related to this company.
Get Relationships for a Person
AFFINITY_GET_RELATIONSHIPS_FOR_A_PERSONAffinity API v2 action. Get Relationships for a Person. Returns the relationships for a given person, including the interaction score that measures the strength of each relationship based on communication patterns such as emails, meetings, and other interactions. Each relationship includes two persons (person1 and person2) who have a connection.
Get replies for a Note
AFFINITY_GET_REPLIES_FOR_A_NOTEAffinity API v2 action. Get replies for a Note. This endpoint returns reply notes for a given note id. You can filter replies using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties. | **Property Name** | **Type** | **Allowed Operators** | **Examples** | |---|---|---|---| | `creator.id` | `int32` | `=` | `creator.id=1` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-02-04T10:48:24Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-02-03T10:48:24Z` |
Get values for a single field on a Company
AFFINITY_GET_VALUES_FOR_A_SINGLE_FIELD_ON_A_COMPANYBeta Affinity API v2 action. Get values for a single field on a Company. Paginate through all values for a field on a company.
Get values for a single field on a List Entry
AFFINITY_GET_VALUES_FOR_A_SINGLE_FIELD_ON_A_LIST_ENTRYBeta Affinity API v2 action. Get values for a single field on a List Entry. Paginate through all values for a field on a list entry.
Get values for a single field on a Person
AFFINITY_GET_VALUES_FOR_A_SINGLE_FIELD_ON_A_PERSONBeta Affinity API v2 action. Get values for a single field on a Person. Paginate through all values for a field on a person.
Initiate Company Merge
AFFINITY_INITIATE_COMPANY_MERGEAffinity API v2 action. Initiate Company Merge. Initiate a company merge to combine a duplicate company profile into a primary company profile. This is an asynchronous process that will merge all data from the duplicate company into the primary company. Once the merge is initiated, you can track its progress using the returned task URL. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role.
Initiate Person Merge
AFFINITY_INITIATE_PERSON_MERGEAffinity API v2 action. Initiate Person Merge. Initiate a person merge to combine a duplicate person profile into a primary person profile. This is an asynchronous process that will merge all data from the duplicate person into the primary person. Once the merge is initiated, you can track its progress using the returned task URL. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role.
Perform batch operations on a company's fields
AFFINITY_PERFORM_BATCH_OPERATIONS_ON_A_COMPANY_S_FIELDSAffinity API v2 action. Perform batch operations on a company's fields. Perform batch operations on a company's fields. Currently the only operation at the endpoint is `update-fields`, which allows you to update multiple field values with a single request. This is equivalent to calling [the single field update](/api-reference/companies/update-a-single-field-value-on-a-company) endpoint multiple times. You can update up to 100 fields per request.
Perform batch operations on a list entry's fields
AFFINITY_PERFORM_BATCH_OPERATIONS_ON_A_LIST_ENTRY_S_FIELDSAffinity API v2 action. Perform batch operations on a list entry's fields. Perform batch operations on a list entry's fields. Currently the only operation at the endpoint is `update-fields`, which allows you to update multiple field values with a single request. This is equivalent to calling [the single field update](/api-reference/lists/update-a-single-field-value-on-a-list-entry) endpoint multiple times. You can update up to 100 fields per request. Requires the "Export data from Lists" [permission](/pages/external-api-v2/permissions).
Perform batch operations on a person's fields
AFFINITY_PERFORM_BATCH_OPERATIONS_ON_A_PERSON_S_FIELDSAffinity API v2 action. Perform batch operations on a person's fields. Perform batch operations on a person's fields. Currently the only operation at the endpoint is `update-fields`, which allows you to update multiple field values with a single request. This is equivalent to calling [the single field update](/api-reference/persons/update-a-single-field-value-on-a-person) endpoint multiple times. You can update up to 100 fields per request.
Perform batch operations on suggestions in a set
AFFINITY_PERFORM_BATCH_OPERATIONS_ON_SUGGESTIONS_IN_A_SETBeta Affinity API v2 action. Perform batch operations on suggestions in a set. The endpoint returns 404 when AI agents access is not enabled for the organization. Accept or reject suggestions in a set. Accepted values are written to the CRM. - `apply-suggested-field-updates`: decide every `pending` suggestion. `acceptedValue` overrides the suggested value. - `dismiss`: reject all `pending` suggestions. Writes are not atomic: one suggestion failing does not stop the others. A `failed` outcome carries a `failureReason`. The set is `done` after either operation. Returns `400`, writing nothing, when the set is not `open`, a `pending` suggestion has no decision, or a decision names an unknown, duplicate, or decided suggestion, pairs `acceptedValue` with `rejected`, or has an `acceptedValue` type that does not match the field.
Search Companies
AFFINITY_SEARCH_COMPANIESBeta Affinity API v2 action. Search Companies. Search for Companies matching the given criteria. Accepts an optional combination of filters, sorts, and a search term. Omitting the body is equivalent to `GET /v2/companies` with default pagination. Requires the "Export All Organizations directory" [permission](/pages/external-api-v2/permissions).
Search Files by Keyword
AFFINITY_SEARCH_FILES_BY_KEYWORDAffinity API v2 action. Search Files by Keyword. Search files by keyword. The scope of the search is controlled by the request body: - Provide `fileIds` to limit the search to specific files. - Provide `companyId` to limit the search to files associated with a specific company. - Omit both to search across your entire account. `fileIds` and `companyId` are mutually exclusive. Returns up to `limit` files ordered by relevance. Prompts with no strong matches may still return low-relevance results. Each result contains a matched file and a single representative excerpt (a matching passage from that file). Even if a file contains multiple matching passages, it appears exactly once in the response with one excerpt.
Search List Entries
AFFINITY_SEARCH_LIST_ENTRIESBeta Affinity API v2 action. Search List Entries. Search for List Entries on a List matching the given criteria. Accepts an optional combination of filters, sorts, and a search term. All fields in the request body are optional. Omitting the body entirely is equivalent to `GET /v2/lists/{listId}/list-entries` with default pagination. Requires the "Export data from Lists" [permission](/pages/external-api-v2/permissions).
Search Notes by Keyword
AFFINITY_SEARCH_NOTES_BY_KEYWORDAffinity API v2 action. Search Notes by Keyword. Search notes by keyword. The scope of the search is controlled by the request body: - Provide `noteIds` to limit the search to specific notes. - Provide `companyId` to limit the search to notes associated with a specific company. - Omit both to search across your entire account. `noteIds` and `companyId` are mutually exclusive. Returns up to `limit` notes ordered by relevance. Prompts with no strong matches may still return low-relevance results. Each result contains a matched note and a single representative excerpt (a matching passage from that note). Even if a note contains multiple matching passages, it appears exactly once in the response with one excerpt.
Search Persons
AFFINITY_SEARCH_PERSONSBeta Affinity API v2 action. Search Persons. Search for Persons matching the given criteria. Accepts an optional combination of filters, sorts, and a search term. Omitting the body is equivalent to `GET /v2/persons` with default pagination. Requires the "Export All People directory" [permission](/pages/external-api-v2/permissions).
Semantic Search
AFFINITY_SEMANTIC_SEARCHAffinity API v2 action. Semantic Search. Perform an AI-powered semantic search. Use the `entityType` field in the request body to specify which entity type to search. Currently only supports companies. The `prompt` field accepts natural language describing the companies to find.
Send Feedback
AFFINITY_SEND_FEEDBACKAffinity API v2 action. Send Feedback. Send feedback to Affinity about a particular product area or feature.
Update a Company Field
AFFINITY_UPDATE_A_COMPANY_FIELDBeta Affinity API v2 action. Update a Company Field. Updates a Company Field. Only the provided properties are updated. Requires the Manage global fields permission. Accepts the Field ID of a custom field (`field-<number>`), of an enriched field (for example, `affinity-data-location`), or of a native field (for example, `source-of-introduction`). An enriched or native field by its `field-<number>` ID returns 404. A field from a restricted data partner (see Partner Data Restrictions) returns 404. On native and enriched fields, only `isRequired` can be updated. Fields that are computed by Affinity, such as `first-email`, return 404.