# Get current user Source: https://developer.affinity.co/api-reference/2024-01-01/auth/get-current-user /schema/temp/versions/2024-01-01.yml get /v2/auth/whoami Returns information about the authenticated user, their current organization, and API key permissions. Use this endpoint to verify your authentication and understand your available API access levels. # Get metadata on all Calls Source: https://developer.affinity.co/api-reference/2024-01-01/calls/get-metadata-on-all-calls /schema/temp/versions/2024-01-01.yml get /v2/calls Paginate through all calls in Affinity. Returns basic information about the call interaction and its participants. Will only return calls that the current authenticated user has permission to see. You can filter calls 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** | |---|---|---|---| | `id` | `int64` | `=` | `id=1\|id=2\|id=3` | | `startTime` | `datetime` | `>`, `<`, `>=`, `<=` | `sentAt>2025-01-01T01:00:00Z` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z` | # Get metadata on all Chat Messages Source: https://developer.affinity.co/api-reference/2024-01-01/chat-messages/get-metadata-on-all-chat-messages /schema/temp/versions/2024-01-01.yml get /v2/chat-messages Paginate through all chat messages in Affinity. Returns basic information about the chat message interaction and its participants. Will only return chat messages that the current authenticated user has permission to see. You can filter chat messages 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** | |---|---|---|---| | `id` | `int64` | `=` | `id=1\|id=2\|id=3` | | `sentAt` | `datetime` | `>`, `<`, `>=`, `<=` | `sentAt>2025-01-01T01:00:00Z` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z` | # Get a Company's List Entries Source: https://developer.affinity.co/api-reference/2024-01-01/companies/get-a-companys-list-entries /schema/temp/versions/2024-01-01.yml get /v2/companies/{companyId}/list-entries Paginate through the List Entries (AKA rows) for the given Company across all Lists. Each List Entry includes field data for the Company, including list-specific field data. Each List Entry also includes metadata about its creation, i.e., when it was added to the List and by whom. # Get a Company's Lists Source: https://developer.affinity.co/api-reference/2024-01-01/companies/get-a-companys-lists /schema/temp/versions/2024-01-01.yml get /v2/companies/{companyId}/lists Paginate through all Lists where the given Company appears as an entry and that you have access to view. Returns basic List information for each List that contains this Company. # Get a single Company Source: https://developer.affinity.co/api-reference/2024-01-01/companies/get-a-single-company /schema/temp/versions/2024-01-01.yml get /v2/companies/{companyId} Returns basic information and non-list-specific field data on the requested Company. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/companies/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, Companies will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. # Get a single field value on a Company Source: https://developer.affinity.co/api-reference/2024-01-01/companies/get-a-single-field-value-on-a-company /schema/temp/versions/2024-01-01.yml get /v2/companies/{companyId}/fields/{fieldId} | ⚠️ This endpoint is currently in BETA | |--| Retrieve a single field on a company. Returns basic information and the field value. # Get all Companies Source: https://developer.affinity.co/api-reference/2024-01-01/companies/get-all-companies /schema/temp/versions/2024-01-01.yml get /v2/companies Paginate through Companies in Affinity. Returns basic information and non-list-specific field data on each Company. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/companies/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, Companies will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. Requires the "Export All Organizations directory" [permission](/pages/external-api-v2/permissions). # Get dropdown options for a Company Field Source: https://developer.affinity.co/api-reference/2024-01-01/companies/get-dropdown-options-for-a-company-field /schema/temp/versions/2024-01-01.yml get /v2/companies/fields/{fieldId}/dropdown-options | ⚠️ This endpoint is currently in BETA | |--| Returns the dropdown options for a specific dropdown or ranked-dropdown field on a Company. Use the returned dropdown option IDs when writing dropdown field values via the field update endpoints. # Get field values on a single Company Source: https://developer.affinity.co/api-reference/2024-01-01/companies/get-field-values-on-a-single-company /schema/temp/versions/2024-01-01.yml get /v2/companies/{companyId}/fields | ⚠️ This endpoint is currently in BETA | |--| Paginate through field values on a single company. Enriched, global, and relationship-intelligence fields will be included by default. The `ids` and `types` parameters can be used to filter the collection. These parameters are mutually exclusive. List fields are not returned by this endpoint. To retrieve or update list field values, use the [list entry fields](/api-reference/lists/get-field-values-on-a-single-list-entry) endpoints. # Get metadata on Company Fields Source: https://developer.affinity.co/api-reference/2024-01-01/companies/get-metadata-on-company-fields /schema/temp/versions/2024-01-01.yml get /v2/companies/fields Returns metadata on non-list-specific Company Fields. Use the returned Field IDs to request field data from the GET `/v2/companies` and GET `/v2/companies/{id}` endpoints. You can filter Fields 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** | |---|---|---|---| | `name` | `text` | `=`, `=~` | `name="Location"`, `name=~loc` | Use the `includes` query parameter to add optional metadata to each Field in the response. Pass `includes` more than once to request multiple values. | **Value** | **Adds to each Field** | |---|---| | `filterability` | How the field can be used in filter expressions on GET `/v2/companies` and POST `/v2/companies/search` | | `sortability` | How the field can be used in sort expressions on those endpoints | Example: `GET /v2/companies/fields?includes=filterability&includes=sortability` # Get Notes for a Company Source: https://developer.affinity.co/api-reference/2024-01-01/companies/get-notes-for-a-company /schema/temp/versions/2024-01-01.yml get /v2/companies/{companyId}/notes | ⚠️ This endpoint is currently in BETA | |--| Returns relevant notes for a given company which includes directly attached notes and notes attached to persons on this company. You can filter notes 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 Relationships for a Company Source: https://developer.affinity.co/api-reference/2024-01-01/companies/get-relationships-for-a-company /schema/temp/versions/2024-01-01.yml get /v2/companies/{companyId}/relationships | ⚠️ This endpoint is currently in BETA | |--| | **⚠️ Upcoming changes to this endpoint will not be backwards-compatible.** | |--| 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. Relationships whose internal team member is a deactivated user are excluded from the results. ## Interaction score The `interactionScore` is a value between `0.0` and `1.0` that reflects how frequently the two persons interact across email, calendar events, and chat messages. The more interactions, the higher the score. Recent interactions are weighted slightly higher than older ones. As rough guidance, scores at or above `0.7` typically indicate two persons that communicate regularly, scores between `0.4` and `0.7` indicate occasional communication, and scores below `0.4` indicate only sporadic communication. ## LinkedIn connections The collection also includes relationships based on a LinkedIn connection between an internal team member and a person related to this company. Whenever a LinkedIn connection exists between the two persons in a relationship, `linkedIn` is populated with the date the connection was made. `linkedIn` is `null` when no LinkedIn connection between the two persons is known by Affinity. Note that LinkedIn-based relationships which do not have any interaction data will have an `interactionScore` of `0`. ## Filters You can filter relationships using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties. | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `interactionScore` | `double` | Strength of the relationship, between `0.0` and `1.0`. Higher means stronger. | `>`, `<`, `>=`, `<=` | `interactionScore>=0.5` | ## Sorting You can sort relationships using the `orderBy` query parameter. `interactionScore` is the only sortable property. # Perform batch operations on a company's fields Source: https://developer.affinity.co/api-reference/2024-01-01/companies/perform-batch-operations-on-a-companys-fields /schema/temp/versions/2024-01-01.yml patch /v2/companies/{companyId}/fields | ⚠️ This endpoint is currently in BETA | |--| 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. # Search Companies Source: https://developer.affinity.co/api-reference/2024-01-01/companies/search-companies /schema/temp/versions/2024-01-01.yml post /v2/companies/search | ⚠️ This endpoint is currently in BETA | |--| 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). ### Field IDs Field IDs used in `filters`, `sorts`, and `search.fieldIds` follow the formats described in [Working with Field Data](/pages/data-model/working-with-field-data). Use `GET /v2/companies/fields` to discover the available fields and their `valueType`. ### `attributeId` Some fields require an `attributeId` to specify which aspect to filter or sort on. The following relationship intelligence fields all use `attributeId: "date-of-activity"`: `last-email`, `first-email`, `last-contact`, `last-event`, `first-event`, `next-event`. Use `GET /v2/companies/fields` to confirm which fields require an `attributeId`. ### Search The `search.term` is always matched against the company name and primary domain. Providing `search.fieldIds` extends the search to those additional fields; it does not restrict matching to only those fields. Fields with a `valueType` of `datetime` are not searchable and are silently ignored if included in `search.fieldIds`. ### Limits - **Items per filter group** (filters or nested groups): 50 - **Values per filter** (e.g. options in `is-any-of`): 100 - **Sort criteria**: 5 - **Search term minimum length**: 3 characters - **Results per page**: 100 ### Pagination Uses cursor-based pagination. # Update a single field value on a Company Source: https://developer.affinity.co/api-reference/2024-01-01/companies/update-a-single-field-value-on-a-company /schema/temp/versions/2024-01-01.yml post /v2/companies/{companyId}/fields/{fieldId} | ⚠️ This endpoint is currently in BETA | |--| Update a single field value on a company. # Get All Company Merge Tasks Source: https://developer.affinity.co/api-reference/2024-01-01/company-merges/get-all-company-merge-tasks /schema/temp/versions/2024-01-01.yml get /v2/tasks/company-merges Retrieve paginated company merge tasks for the organization. Returns all merge tasks initiated by users in your organization, including their current status, the companies involved, and task details. You can filter tasks 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** | |---|---|---|---| | `status` | `enum` | `=` | `status=in-progress`, `status=success`, `status=failed` | Tasks are returned in reverse chronological order (most recent first). Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get All Company Merges Source: https://developer.affinity.co/api-reference/2024-01-01/company-merges/get-all-company-merges /schema/temp/versions/2024-01-01.yml get /v2/company-merges Retrieve paginated company merges for the organization. Returns all company merges initiated by users in your organization, including their current status, the companies involved, and merge details. You can filter company merges 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** | |---|---|---|---| | `status` | `enum` | `=` | `status=in-progress`, `status=success`, `status=failed` | | `taskId` | `text` | `=` | `taskId=789e0123-e45b-67c8-d901-234567890123` | Company merges are returned in reverse chronological order (most recent first). Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get Company Merge Source: https://developer.affinity.co/api-reference/2024-01-01/company-merges/get-company-merge /schema/temp/versions/2024-01-01.yml get /v2/company-merges/{mergeId} Retrieve the status and details of a specific company merge. Returns information about the company merge including its current status, the companies involved, timestamps, and any error information if the merge failed. The `mergeId` can be obtained from the response of the [Get All Company Merges](/api-reference/company-merges/get-all-company-merges) endpoint, or by filtering company merges by task ID using `/v2/company-merges?filter=taskId={taskId}` after initiating a merge. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get Company Merge Task Source: https://developer.affinity.co/api-reference/2024-01-01/company-merges/get-company-merge-task /schema/temp/versions/2024-01-01.yml get /v2/tasks/company-merges/{taskId} Retrieve the status and details of a specific task for company merges. Returns information about the company merges for a specific task including its overall status, number of merges in-progress, completed, and failed. Detailed information about individual merges for this task can be found by querying: `/v2/company-merges?filter=taskId={taskId}` See [Company Merges](/api-reference/company-merges/get-all-company-merges) for more details. Task statuses: - `in-progress`: The merge task is currently being processed. - `success`: The merge task completed successfully. - `failed`: The merge task failed. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Initiate Company Merge Source: https://developer.affinity.co/api-reference/2024-01-01/company-merges/initiate-company-merge /schema/temp/versions/2024-01-01.yml post /v2/company-merges 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. # Get metadata on all Emails Source: https://developer.affinity.co/api-reference/2024-01-01/emails/get-metadata-on-all-emails /schema/temp/versions/2024-01-01.yml get /v2/emails Paginate through all emails in Affinity. Returns basic information about the email interaction and its participants. Will only return emails or subject lines that the current authenticated user has permission to see. Email bodies (the message content) are not available through the API. Only metadata such as the subject, participants, and timestamps is returned. If the authenticated user does not have permission to see an email's subject, the `subject` field is obfuscated and returned as `********` rather than the actual subject line. You can filter emails 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** | |---|---|---|---| | `id` | `int64` | `=` | `id=1\|id=2\|id=3` | | `sentAt` | `datetime` | `>`, `<`, `>=`, `<=` | `sentAt>2025-01-01T01:00:00Z` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z` | # Send Feedback Source: https://developer.affinity.co/api-reference/2024-01-01/feedback/send-feedback /schema/temp/versions/2024-01-01.yml post /v2/feedback | ⚠️ This endpoint is currently in BETA | |--| Send feedback to Affinity about a particular product area or feature. # Get all field value changes Source: https://developer.affinity.co/api-reference/2024-01-01/field-value-changes/get-all-field-value-changes /schema/temp/versions/2024-01-01.yml get /v2/field-value-changes Retrieve field value changes across all entities and fields in your Affinity workspace. For an overview of field value changes, including which fields support change tracking and how the action types behave, see [Field Value Changes](/pages/data-model/working-with-field-data#field-value-changes). This endpoint is built for delta-sync. Within a single sync, follow `pagination.nextUrl` to page through results until it becomes `null`, which means you have reached the most recent change. To run the next incremental sync, record the `changedAt` of the last change you processed and, on your next sync, filter for changes newer than that timestamp (for example, `filter=changedAt>2024-06-01T12:00:00Z`). Do not persist `nextUrl` between syncs, since it is `null` once you are caught up. Changes are returned in ascending order of `changedAt`, then by internal change ID. Only fields with change tracking enabled are included. You can filter results using the `filter` query parameter. | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `field.id` | `text` | | `=` | `field.id=field-1234` | | `listEntry.id` | `int64` | | `=` | `listEntry.id=5678` | | `changer.id` | `int64` | The person who made the change. | `=` | `changer.id=9012` | | `changedAt` | `datetime` | When the change was made. | `>`, `<`, `>=`, `<=` | `changedAt>=2025-01-01T00:00:00Z` | | `actionType` | `text` | The type of change (`add`, `update`, `delete`) | `=` | `actionType=add` | Filters can be combined: - `|` (OR) to match any of multiple values: `field.id=field-1 | field.id=field-2` - `&` (AND) to require all conditions: `changedAt>=2025-01-01T00:00:00Z & changedAt<=2025-12-31T23:59:59Z` # Search Files by Keyword Source: https://developer.affinity.co/api-reference/2024-01-01/files/search-files-by-keyword /schema/temp/versions/2024-01-01.yml post /v2/files/search 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. # Get Coworker Inferred Connections Source: https://developer.affinity.co/api-reference/2024-01-01/inferred-connections/get-coworker-inferred-connections /schema/temp/versions/2024-01-01.yml get /v2/inferred-connections/coworkers | ⚠️ This endpoint is currently in BETA | |--| Returns inferred connections based on shared work history, grouped by the target person, strongest first. A connection is the belief that a `source` (a person in your Affinity data, with an `id`, whom you know) might know a `target` (a person not in your Affinity data, described only, whom you want to know), because the two had overlapping employment at a shared company. The same target can be reachable through several people you know. Connections are grouped by target: each item in `data` is one target together with the `connections` to them. Within a target, connections are ordered by `confidence` descending; targets are ordered by their strongest connection, strongest first. Each `target` carries the company they work at **today** in `target.currentCompany`: the company at which they are a potential contact now, which is not necessarily the shared employer behind the connection. The `filter` parameter is required and must contain at least one filter. The only currently supported filter is `target.currentCompany.id`, which narrows the targets to a single such company. ## Filters | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `target.currentCompany.id` | `integer` | The id of the company the `target` person currently works at. Must reference a single company; filtering on more than one (e.g. `target.currentCompany.id = 1 \| target.currentCompany.id = 2`) returns a `400`. | `=` | `target.currentCompany.id = 123` | # Get Investor-Executive Inferred Connections Source: https://developer.affinity.co/api-reference/2024-01-01/inferred-connections/get-investor-executive-inferred-connections /schema/temp/versions/2024-01-01.yml get /v2/inferred-connections/investor-executive-connections | ⚠️ This endpoint is currently in BETA | |--| Returns investor-executive inferred connections, grouped by the target person, strongest first. A connection is the belief that a `source` (a person in your Affinity data, with an `id`, whom you know) might know a `target` (a person not in your Affinity data, described only, whom you want to know). In this connection type the source is an investor and the target is an executive: the source invested in a company where the target was an executive. The same target can be reachable through several people you know. Connections are grouped by target: each item in `data` is one target together with the `connections` to them. Within a target, connections are ordered by `confidence` descending; targets are ordered by their strongest connection, strongest first. Each `target` carries the company they work at **today** in `target.currentCompany`: the company at which they are a potential contact now, which is not necessarily the company involved in the investment. The `filter` parameter is required and must contain at least one filter. The only currently supported filter is `target.currentCompany.id`, which narrows the targets to a single such company. ## Filters | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `target.currentCompany.id` | `integer` | The id of the company the `target` person currently works at. Must reference a single company; filtering on more than one (e.g. `target.currentCompany.id = 1 \| target.currentCompany.id = 2`) returns a `400`. | `=` | `target.currentCompany.id = 123` | # Create a dropdown option for a List Field Source: https://developer.affinity.co/api-reference/2024-01-01/lists/create-a-dropdown-option-for-a-list-field /schema/temp/versions/2024-01-01.yml post /v2/lists/{listId}/fields/{fieldId}/dropdown-options | ⚠️ This endpoint is currently in BETA | |--| Create a dropdown option for a List Field. **Note:** Creating dropdown options on status fields is not yet supported. Requests where `fieldId` refers to a status field will return a 400 error. # Create a List Source: https://developer.affinity.co/api-reference/2024-01-01/lists/create-a-list /schema/temp/versions/2024-01-01.yml post /v2/lists | ⚠️ This endpoint is currently in BETA | |--| Create a new List. The List type determines the kind of entities (Companies, Persons, or Opportunities) that can be added. The requester is recorded as the creator and the owner. # Delete a dropdown option for a List Field Source: https://developer.affinity.co/api-reference/2024-01-01/lists/delete-a-dropdown-option-for-a-list-field /schema/temp/versions/2024-01-01.yml delete /v2/lists/{listId}/fields/{fieldId}/dropdown-options/{dropdownOptionId} | ⚠️ This endpoint is currently in BETA | |--| Delete a dropdown option for a List Field. **Warning:** This permanently removes the option and clears every field value currently set to it across all List Entries. The cleared values cannot be recovered. # Get a dropdown option for a List Field Source: https://developer.affinity.co/api-reference/2024-01-01/lists/get-a-dropdown-option-for-a-list-field /schema/temp/versions/2024-01-01.yml get /v2/lists/{listId}/fields/{fieldId}/dropdown-options/{dropdownOptionId} | ⚠️ This endpoint is currently in BETA | |--| Get a single dropdown option for a List Field. # Get a single field value Source: https://developer.affinity.co/api-reference/2024-01-01/lists/get-a-single-field-value /schema/temp/versions/2024-01-01.yml get /v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId} Returns a single field value on a list entry. # Get a single List Entry on a List Source: https://developer.affinity.co/api-reference/2024-01-01/lists/get-a-single-list-entry-on-a-list /schema/temp/versions/2024-01-01.yml get /v2/lists/{listId}/list-entries/{listEntryId} Retrieve a single list entry. Returns basic information and field data, including list-specific field data. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/lists/{listId}/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, the List Entry will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. # Get all List Entries on a List Source: https://developer.affinity.co/api-reference/2024-01-01/lists/get-all-list-entries-on-a-list /schema/temp/versions/2024-01-01.yml get /v2/lists/{listId}/list-entries Paginate through the List Entries (AKA rows) on a given List. Returns basic information and field data, including list-specific field data, on each Company, Person, or Opportunity on the List. List Entries also include metadata about their creation, i.e., when they were added to the List and by whom. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/lists/{listId}/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, List Entries will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. Requires the "Export data from Lists" [permission](/pages/external-api-v2/permissions). # Get all List Entries on a Saved View Source: https://developer.affinity.co/api-reference/2024-01-01/lists/get-all-list-entries-on-a-saved-view /schema/temp/versions/2024-01-01.yml get /v2/lists/{listId}/saved-views/{viewId}/list-entries Paginate through the List Entries (AKA rows) on a given Saved View. Use this endpoint when you need to filter entities or only want **some** field data to be returned: This endpoint respects the filters set on a Saved View via web app, and only returns field data corresponding to the columns that have been pulled into the Saved View via web app. Though this endpoint respects the Saved View's filters and column/Field selection, it does not yet preserve sort order. This endpoint also only supports **sheet-type Saved Views**, and not board- or dashboard-type Saved Views. See the [Data Model](/pages/data-model/the-basics) section for more information about Saved Views. Requires the "Export data from Lists" [permission](/pages/external-api-v2/permissions). # Get dropdown options for a List Field Source: https://developer.affinity.co/api-reference/2024-01-01/lists/get-dropdown-options-for-a-list-field /schema/temp/versions/2024-01-01.yml get /v2/lists/{listId}/fields/{fieldId}/dropdown-options | ⚠️ This endpoint is currently in BETA | |--| Returns the dropdown options for a specific dropdown or ranked-dropdown field on a List. Use the returned dropdown option IDs when writing dropdown field values via the field update endpoints. # Get Field Value Changes on a List Entry Source: https://developer.affinity.co/api-reference/2024-01-01/lists/get-field-value-changes-on-a-list-entry /schema/temp/versions/2024-01-01.yml get /v2/lists/{listId}/list-entries/{listEntryId}/field-value-changes | ⚠️ This endpoint is currently in BETA | |--| Paginate through the historical value changes on the fields of a List Entry. For an overview of field value changes, including which fields support change tracking and how the action types behave, see [Field Value Changes](/pages/data-model/working-with-field-data#field-value-changes). Each change includes who made the change, when it occurred, the action that was performed, and the value that was set. Changes are sorted by `changedAt` in ascending order (oldest first). You can filter field value changes using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties. | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `field.id` | `text` | | `=` | `field.id=field-1234` | | `changedAt` | `datetime` | When the change was made. | `>`, `<`, `>=`, `<=` | `changedAt>2026-01-01T00:00:00Z` | | `changer.id` | `int64` | The person who made the change. | `=` | `changer.id=1234` | | `actionType` | `text` | The type of change (`add`, `update`, `delete`) | `=` | `actionType=add` | # Get field values on a single List Entry Source: https://developer.affinity.co/api-reference/2024-01-01/lists/get-field-values-on-a-single-list-entry /schema/temp/versions/2024-01-01.yml get /v2/lists/{listId}/list-entries/{listEntryId}/fields Paginate through all field values on a single list entry. All fields will be included by default. The `ids` and `types` parameters can be used to filter the collection. # Get metadata on a single List Source: https://developer.affinity.co/api-reference/2024-01-01/lists/get-metadata-on-a-single-list /schema/temp/versions/2024-01-01.yml get /v2/lists/{listId} Retrieve detailed information about a specific List you have access to view. Returns List configuration including name, owner, privacy settings, and creation details. # Get metadata on a single List's Fields Source: https://developer.affinity.co/api-reference/2024-01-01/lists/get-metadata-on-a-single-lists-fields /schema/temp/versions/2024-01-01.yml get /v2/lists/{listId}/fields Returns metadata on the Fields available on a single List. Use the returned Field IDs to request field data from the GET `/v2/lists/{listId}/list-entries` endpoint. You can filter Fields 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** | |---|---|---|---| | `name` | `text` | `=`, `=~` | `name="Status"`, `name=~stat` | Use the `includes` query parameter to add optional metadata to each Field in the response. Pass `includes` more than once to request multiple values. | **Value** | **Adds to each Field** | |---|---| | `filterability` | How the field can be used in filter expressions on POST `/v2/lists/{listId}/list-entries/search` | | `sortability` | How the field can be used in sort expressions on that endpoint | Example: `GET /v2/lists/{listId}/fields?includes=filterability&includes=sortability` # Get metadata on a single Saved View Source: https://developer.affinity.co/api-reference/2024-01-01/lists/get-metadata-on-a-single-saved-view /schema/temp/versions/2024-01-01.yml get /v2/lists/{listId}/saved-views/{viewId} Retrieve detailed information about a specific Saved View you have access to view. Returns Saved View configuration including name, type, and creation date. # Get metadata on all Lists Source: https://developer.affinity.co/api-reference/2024-01-01/lists/get-metadata-on-all-lists /schema/temp/versions/2024-01-01.yml get /v2/lists Paginate through all Lists in your organization that you have access to view. Returns basic information about each List, including name, owner, and privacy settings. # Get metadata on Saved Views Source: https://developer.affinity.co/api-reference/2024-01-01/lists/get-metadata-on-saved-views /schema/temp/versions/2024-01-01.yml get /v2/lists/{listId}/saved-views Paginate through all Saved Views you have access to view for a specific List. Returns basic information about each Saved View, including name, type, and creation date. # Perform batch operations on a list entry's fields Source: https://developer.affinity.co/api-reference/2024-01-01/lists/perform-batch-operations-on-a-list-entrys-fields /schema/temp/versions/2024-01-01.yml patch /v2/lists/{listId}/list-entries/{listEntryId}/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). # Search List Entries Source: https://developer.affinity.co/api-reference/2024-01-01/lists/search-list-entries /schema/temp/versions/2024-01-01.yml post /v2/lists/{listId}/list-entries/search | ⚠️ This endpoint is currently in BETA | |--| 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). ### Field IDs Field IDs used in `filters`, `sorts`, and `search.fieldIds` follow the formats described in [Working with Field Data](/pages/data-model/working-with-field-data). Use `GET /v2/lists/{listId}/fields?includes=filterability` to discover which fields are filterable and what operators each supports. Use `GET /v2/lists/{listId}/fields?includes=sortability` for sortable fields. ### `attributeId` Some fields require an `attributeId` to specify which aspect to filter or sort on. The following relationship intelligence fields all use `attributeId: "date-of-activity"`: `last-email`, `first-email`, `last-contact`, `last-event`, `first-event`, `next-event`. Use `GET /v2/lists/{listId}/fields?includes=filterability` to confirm which fields require an `attributeId`. ### Search The `search.term` is always matched against the entity's name and primary identifier: company name and primary domain (company lists), person first name, last name, and primary email address (person lists), or opportunity name (opportunity lists). Providing `search.fieldIds` extends the search to those additional fields; it does not restrict matching to only those fields. Fields with a `valueType` of `datetime` are not searchable and are silently ignored if included in `search.fieldIds`. ### Limits - **Items per filter group** (filters or nested groups): 50 - **Values per filter** (e.g. options in `is-any-of`): 100 - **Sort criteria**: 5 - **Search term minimum length**: 3 characters - **Results per page**: 100 ### Pagination Uses cursor-based pagination. # Update a dropdown option for a List Field Source: https://developer.affinity.co/api-reference/2024-01-01/lists/update-a-dropdown-option-for-a-list-field /schema/temp/versions/2024-01-01.yml post /v2/lists/{listId}/fields/{fieldId}/dropdown-options/{dropdownOptionId} | ⚠️ This endpoint is currently in BETA | |--| Update a dropdown option for a List Field. **Note:** Updating dropdown options on status fields is not yet supported. Requests where `fieldId` refers to a status field will return a 400 error. # Update a single field value on a List Entry Source: https://developer.affinity.co/api-reference/2024-01-01/lists/update-a-single-field-value-on-a-list-entry /schema/temp/versions/2024-01-01.yml post /v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId} Update a single field value. Requires the "Export data from Lists" [permission](/pages/external-api-v2/permissions). # Get metadata on all Meetings Source: https://developer.affinity.co/api-reference/2024-01-01/meetings/get-metadata-on-all-meetings /schema/temp/versions/2024-01-01.yml get /v2/meetings Paginate through all Meetings in Affinity. Returns basic information about past and future meeting interactions and its attendees. You can filter meetings 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** | |---|---|---|---| | `id` | `int64` | `=` | `id=1\|id=2\|id=3` | | `startTime` | `datetime` | `>`, `<`, `>=`, `<=` | `startTime>2025-01-01T01:00:00Z` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z` | # Create a Note Source: https://developer.affinity.co/api-reference/2024-01-01/notes/create-a-note /schema/temp/versions/2024-01-01.yml post /v2/notes Create a new note. By default it is authored by the calling user; set `creator` to attribute it to a different internal person in your organization. Notes can be attached directly to entities (`Persons`, `Companies`, `Opportunities`), anchored to an interaction (`meeting`, `call`, or `chat message`), or written as a reply to an existing note. The `type` field selects the shape of the request body. AI Notetaker note types (`ai-notetaker`, `ai-notetaker-reply`) are system-generated and cannot be created through this endpoint. | **`type`** | **Description** | **Required** | **Optional** | |------------|-----------------|--------------|--------------| | `entities` | A note attached directly to one or more entities. | `content`, and at least one of `persons` / `companies` / `opportunities`. | Any combination of `persons` / `companies` / `opportunities`. | | `interaction` | A note anchored to a meeting, call, or chat message. | `content`, `interaction.{type,id}`. | `persons` / `companies` / `opportunities`, added as direct associations on top of the interaction's own participants. | | `user-reply` | A reply to an existing root note. Replies have no entity associations or interaction attachment of their own. | `content`, `parent.id` (must reference an existing root note the caller can access). | None | By default a note is authored by the calling user. To attribute a note to a different member of your organization, set the optional `creator` field to reference that person by id. The referenced person must be an active internal person in your organization. By default a note's creation time is the time of the request. To backfill a historical note, set the optional `createdAt` field to the time the note should be recorded as created. **Body content.** `content.html` is rendered HTML that must use only the allowed tags; submitting restricted tags, attributes, URL schemes, or mention spans will cause the request to fail. See the request examples below for representative payloads. # Delete a single Note Source: https://developer.affinity.co/api-reference/2024-01-01/notes/delete-a-single-note /schema/temp/versions/2024-01-01.yml delete /v2/notes/{noteId} Delete a note. You can only delete notes you created. Deleting a root note also deletes its replies (both user replies and AI Notetaker replies); deleting a reply removes only that reply. # Get a single Note Source: https://developer.affinity.co/api-reference/2024-01-01/notes/get-a-single-note /schema/temp/versions/2024-01-01.yml get /v2/notes/{noteId} Get a Note with a given id # Get all Notes Source: https://developer.affinity.co/api-reference/2024-01-01/notes/get-all-notes /schema/temp/versions/2024-01-01.yml get /v2/notes Returns all notes, with the exception of replies. You can filter notes 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** | |---|---|---|---| | `id` | `int32` | `=` | `id=1\|id=2\|id=3` | | `creator.id` | `int32` | `=` | `creator.id=1` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-02-04T10:48:24Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-02-03T10:48:24Z` | # Get Companies attached to a Note Source: https://developer.affinity.co/api-reference/2024-01-01/notes/get-companies-attached-to-a-note /schema/temp/versions/2024-01-01.yml get /v2/notes/{noteId}/attached-companies Returns directly attached companies for a given Note. # Get Opportunities attached to a Note Source: https://developer.affinity.co/api-reference/2024-01-01/notes/get-opportunities-attached-to-a-note /schema/temp/versions/2024-01-01.yml get /v2/notes/{noteId}/attached-opportunities Returns directly attached opportunities for a given Note. # Get Persons attached to a Note Source: https://developer.affinity.co/api-reference/2024-01-01/notes/get-persons-attached-to-a-note /schema/temp/versions/2024-01-01.yml get /v2/notes/{noteId}/attached-persons Returns directly attached persons for a given Note. # Get replies for a Note Source: https://developer.affinity.co/api-reference/2024-01-01/notes/get-replies-for-a-note /schema/temp/versions/2024-01-01.yml get /v2/notes/{noteId}/replies 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` | # Search Notes by Keyword Source: https://developer.affinity.co/api-reference/2024-01-01/notes/search-notes-by-keyword /schema/temp/versions/2024-01-01.yml post /v2/notes/search 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. # Update a single Note Source: https://developer.affinity.co/api-reference/2024-01-01/notes/update-a-single-note /schema/temp/versions/2024-01-01.yml post /v2/notes/{noteId} Make an update to an existing note's body content or its entity associations. You can only update notes you have write access to. You can update any type of note including AI Notetaker notes (`ai-notetaker`, `ai-notetaker-reply`), but a note's type itself cannot be changed. All body properties are optional: only the properties supplied are updated, and other properties are left unchanged. For each of `persons`, `companies`, and `opportunities`, you may: - omit the field to leave existing associations unchanged - send an empty array (`[]`) to clear all associations of that kind - send a non-empty array to replace the existing set with the supplied list. Reply notes (`user-reply`, `ai-notetaker-reply`) have no entity associations, so only `content` can be updated for replies. Updating `content` is subject to the same HTML restrictions as creation; submitting restricted HTML will cause the request to fail. See the request examples below. The content of notes that contain @mentions cannot be updated through this endpoint; attempting to do so returns `400 Bad Request`. Returns `204 No Content` on success, regardless of whether any properties actually changed. # Get a single Opportunity Source: https://developer.affinity.co/api-reference/2024-01-01/opportunities/get-a-single-opportunity /schema/temp/versions/2024-01-01.yml get /v2/opportunities/{opportunityId} Returns basic information but **not** field data on the requested Opportunity. To access field data on Opportunities, use the `/lists/{list_id}/list-entries` or the `/v2/lists/{list_id}/saved-views/{view_id}/list-entries` GET endpoint. # Get all Opportunities Source: https://developer.affinity.co/api-reference/2024-01-01/opportunities/get-all-opportunities /schema/temp/versions/2024-01-01.yml get /v2/opportunities Paginate through Opportunities in Affinity. Returns basic information but **not** field data on each Opportunity. To access field data on Opportunities, use the `/lists/{list_id}/list-entries` or the `/v2/lists/{list_id}/saved-views/{view_id}/list-entries` GET endpoint. Requires the "Export data from Lists" [permission](/pages/external-api-v2/permissions). # Get Notes for an Opportunity Source: https://developer.affinity.co/api-reference/2024-01-01/opportunities/get-notes-for-an-opportunity /schema/temp/versions/2024-01-01.yml get /v2/opportunities/{opportunityId}/notes Returns Notes for a given Opportunity which includes directly attached notes and those attached to persons on this Opportunity. You can filter notes 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 All Person Merge Tasks Source: https://developer.affinity.co/api-reference/2024-01-01/person-merges/get-all-person-merge-tasks /schema/temp/versions/2024-01-01.yml get /v2/tasks/person-merges Retrieve paginated person merge tasks for the organization. Returns all merge tasks initiated by users in your organization, including their current status, the persons involved, and task details. You can filter tasks 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** | |---|---|---|---| | `status` | `enum` | `=` | `status=in-progress`, `status=success`, `status=failed` | Tasks are returned in reverse chronological order (most recent first). Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get All Person Merges Source: https://developer.affinity.co/api-reference/2024-01-01/person-merges/get-all-person-merges /schema/temp/versions/2024-01-01.yml get /v2/person-merges Retrieve paginated person merges for the organization. Returns all person merges initiated by users in your organization, including their current status, the persons involved, and merge details. You can filter person merges 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** | |---|---|---|---| | `status` | `enum` | `=` | `status=in-progress`, `status=success`, `status=failed` | | `taskId` | `text` | `=` | `taskId=789e0123-e45b-67c8-d901-234567890123` | Person merges are returned in reverse chronological order (most recent first). Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get Person Merge Source: https://developer.affinity.co/api-reference/2024-01-01/person-merges/get-person-merge /schema/temp/versions/2024-01-01.yml get /v2/person-merges/{mergeId} Retrieve the status and details of a specific person merge. Returns information about the person merge including its current status, the persons involved, timestamps, and any error information if the merge failed. The `mergeId` can be obtained from the response of the [Get All Person Merges](/api-reference/person-merges/get-all-person-merges) endpoint, or by filtering person merges by task ID using `/v2/person-merges?filter=taskId={taskId}` after initiating a merge. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get Person Merge Task Source: https://developer.affinity.co/api-reference/2024-01-01/person-merges/get-person-merge-task /schema/temp/versions/2024-01-01.yml get /v2/tasks/person-merges/{taskId} Retrieve the status and details of a specific task for person merges. Returns information about the person merges for a specific task including its overall status, number of merges in-progress, completed, and failed. Detailed information about individual merges for this task can be found by querying: `/v2/person-merges?filter=taskId={taskId}` See [Person Merges](/api-reference/person-merges/get-all-person-merges) for more details. Task statuses: - `in-progress`: The merge task is currently being processed. - `success`: The merge task completed successfully. - `failed`: The merge task failed. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Initiate Person Merge Source: https://developer.affinity.co/api-reference/2024-01-01/person-merges/initiate-person-merge /schema/temp/versions/2024-01-01.yml post /v2/person-merges 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. # Get a Person's List Entries Source: https://developer.affinity.co/api-reference/2024-01-01/persons/get-a-persons-list-entries /schema/temp/versions/2024-01-01.yml get /v2/persons/{personId}/list-entries Paginate through the List Entries (AKA rows) for the given Person across all Lists. Each List Entry includes field data for the Person, including list-specific field data. Each List Entry also includes metadata about its creation, i.e., when it was added to the List and by whom. # Get a Person's Lists Source: https://developer.affinity.co/api-reference/2024-01-01/persons/get-a-persons-lists /schema/temp/versions/2024-01-01.yml get /v2/persons/{personId}/lists Paginate through all Lists where the given Person appears as an entry and that you have access to view. Returns basic List information for each List that contains this Person. # Get a single field on a Person Source: https://developer.affinity.co/api-reference/2024-01-01/persons/get-a-single-field-on-a-person /schema/temp/versions/2024-01-01.yml get /v2/persons/{personId}/fields/{fieldId} | ⚠️ This endpoint is currently in BETA | |--| Retrieve a single field on a person. Returns basic information and the field value. # Get a single Person Source: https://developer.affinity.co/api-reference/2024-01-01/persons/get-a-single-person /schema/temp/versions/2024-01-01.yml get /v2/persons/{personId} Returns basic information and non-list-specific field data on the requested Person. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/persons/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, Persons will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. # Get all Persons Source: https://developer.affinity.co/api-reference/2024-01-01/persons/get-all-persons /schema/temp/versions/2024-01-01.yml get /v2/persons Paginate through Persons in Affinity. Returns basic information and non-list-specific field data on each Person. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/persons/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, Persons will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. Requires the "Export All People directory" [permission](/pages/external-api-v2/permissions). # Get dropdown options for a Person Field Source: https://developer.affinity.co/api-reference/2024-01-01/persons/get-dropdown-options-for-a-person-field /schema/temp/versions/2024-01-01.yml get /v2/persons/fields/{fieldId}/dropdown-options | ⚠️ This endpoint is currently in BETA | |--| Returns the dropdown options for a specific dropdown or ranked-dropdown field on a Person. Use the returned dropdown option IDs when writing dropdown field values via the field update endpoints. # Get field values on a single Person Source: https://developer.affinity.co/api-reference/2024-01-01/persons/get-field-values-on-a-single-person /schema/temp/versions/2024-01-01.yml get /v2/persons/{personId}/fields | ⚠️ This endpoint is currently in BETA | |--| Paginate through field values on a single person. Enriched, global, and relationship-intelligence fields will be included by default. The `ids` and `types` parameters can be used to filter the collection. These parameters are mutually exclusive. List fields are not returned by this endpoint. To retrieve or update list field values, use the [list entry fields](/api-reference/lists/get-field-values-on-a-single-list-entry) endpoints. # Get metadata on Person Fields Source: https://developer.affinity.co/api-reference/2024-01-01/persons/get-metadata-on-person-fields /schema/temp/versions/2024-01-01.yml get /v2/persons/fields Returns metadata on non-list-specific Person Fields. Use the returned Field IDs to request field data from the GET `/v2/persons` and GET `/v2/persons/{id}` endpoints. You can filter Fields 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** | |---|---|---|---| | `name` | `text` | `=`, `=~` | `name="Location"`, `name=~loc` | Use the `includes` query parameter to add optional metadata to each Field in the response. Pass `includes` more than once to request multiple values. | **Value** | **Adds to each Field** | |---|---| | `filterability` | How the field can be used in filter expressions on GET `/v2/persons` and POST `/v2/persons/search` | | `sortability` | How the field can be used in sort expressions on those endpoints | Example: `GET /v2/persons/fields?includes=filterability&includes=sortability` # Get Notes for a Person Source: https://developer.affinity.co/api-reference/2024-01-01/persons/get-notes-for-a-person /schema/temp/versions/2024-01-01.yml get /v2/persons/{personId}/notes Returns notes for a given person id which includes directly attached notes, notes on meetings this person attended, and notes where this person is mentioned. You can filter notes 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 Relationships for a Person Source: https://developer.affinity.co/api-reference/2024-01-01/persons/get-relationships-for-a-person /schema/temp/versions/2024-01-01.yml get /v2/persons/{personId}/relationships | ⚠️ This endpoint is currently in BETA | |--| | **⚠️ Upcoming changes to this endpoint will not be backwards-compatible.** | |--| 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. Relationships whose internal team member is a deactivated user are excluded from the results. ## Interaction score The `interactionScore` is a value between `0.0` and `1.0` that reflects how frequently the two persons interact across email, calendar events, and chat messages. The more interactions, the higher the score. Recent interactions are weighted slightly higher than older ones. As rough guidance, scores at or above `0.7` typically indicate two persons that communicate regularly, scores between `0.4` and `0.7` indicate occasional communication, and scores below `0.4` indicate only sporadic communication. ## LinkedIn connections The collection also includes relationships based on a LinkedIn connection between the given person and their internal team member counterpart. Whenever a LinkedIn connection exists between the two persons in a relationship, `linkedIn` is populated with the date the connection was made.`linkedIn` is `null` when no LinkedIn connection exists between the two persons. Note that LinkedIn-based relationships which do not have any interaction data will have an `interactionScore` of `0`. ## Filters You can filter relationships using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties. | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `interactionScore` | `double` | Strength of the relationship, between `0.0` and `1.0`. Higher means stronger. | `>`, `<`, `>=`, `<=` | `interactionScore>=0.5` | ## Sorting You can sort relationships using the `orderBy` query parameter. `interactionScore` is the only sortable property. # Perform batch operations on a person's fields Source: https://developer.affinity.co/api-reference/2024-01-01/persons/perform-batch-operations-on-a-persons-fields /schema/temp/versions/2024-01-01.yml patch /v2/persons/{personId}/fields | ⚠️ This endpoint is currently in BETA | |--| 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. # Search Persons Source: https://developer.affinity.co/api-reference/2024-01-01/persons/search-persons /schema/temp/versions/2024-01-01.yml post /v2/persons/search | ⚠️ This endpoint is currently in BETA | |--| 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). ### Field IDs Field IDs used in `filters`, `sorts`, and `search.fieldIds` follow the formats described in [Working with Field Data](/pages/data-model/working-with-field-data). Use `GET /v2/persons/fields` to discover the available fields and their `valueType`. ### `attributeId` Some fields require an `attributeId` to specify which aspect to filter or sort on. The following relationship intelligence fields all use `attributeId: "date-of-activity"`: `last-email`, `first-email`, `last-contact`, `last-event`, `first-event`, `next-event`. Use `GET /v2/persons/fields` to confirm which fields require an `attributeId`. ### Search The `search.term` is always matched against the person's first name, last name, and primary email address. Providing `search.fieldIds` extends the search to those additional fields; it does not restrict matching to only those fields. Fields with a `valueType` of `datetime` are not searchable and are silently ignored if included in `search.fieldIds`. ### Limits - **Items per filter group** (filters or nested groups): 50 - **Values per filter** (e.g. options in `is-any-of`): 100 - **Sort criteria**: 5 - **Search term minimum length**: 3 characters - **Results per page**: 100 ### Pagination Uses cursor-based pagination. # Update a single field value on a Person Source: https://developer.affinity.co/api-reference/2024-01-01/persons/update-a-single-field-value-on-a-person /schema/temp/versions/2024-01-01.yml post /v2/persons/{personId}/fields/{fieldId} | ⚠️ This endpoint is currently in BETA | |--| Update a single field value on a person. # Create a Reminder Source: https://developer.affinity.co/api-reference/2024-01-01/reminders/create-a-reminder /schema/temp/versions/2024-01-01.yml post /v2/reminders Creates a new Reminder. Exactly one of `company`, `person`, or `opportunity` must be provided. The `creator` of the new reminder is the user associated with the API key. # Get all Reminders Source: https://developer.affinity.co/api-reference/2024-01-01/reminders/get-all-reminders /schema/temp/versions/2024-01-01.yml get /v2/reminders Returns a page of Reminders visible to the caller. You can filter reminders 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** | |---|---|---|---| | `id` | `int64` | `=` | `id=1\|id=2\|id=3` | | `type` | `enum` | `=` | `type=one-time`, `type=recurring` | | `status` | `enum` | `=` | `status=active`, `status=overdue`, `status=completed` | | `resetTrigger` | `enum` | `=` | `resetTrigger=interaction`, `resetTrigger=email`, `resetTrigger=event` | | `dueDate` | `datetime` | `>`, `<`, `>=`, `<=` | `dueDate>=2026-01-01T00:00:00Z` | | `completedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `completedAt=2026-01-01T00:00:00Z` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt>=2026-01-01T00:00:00Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2026-01-01T00:00:00Z` | | `owner.id` | `int64` | `=`, `!=` | `owner.id=1\|owner.id=2`, `owner.id!=3` | | `creator.id` | `int64` | `=` | `creator.id=1` | | `completer.id` | `int64` | `=` | `completer.id=1` | | `company.id` | `int64` | `=` | `company.id=42` | | `person.id` | `int64` | `=` | `person.id=42` | | `opportunity.id` | `int64` | `=` | `opportunity.id=42` | Results are ordered by `dueDate` ascending (soonest-due first). # Semantic Search Source: https://developer.affinity.co/api-reference/2024-01-01/semantic-search/semantic-search /schema/temp/versions/2024-01-01.yml post /v2/semantic-search | ⚠️ This endpoint is currently in BETA | |--| Perform an AI-powered semantic search. Use the `entity-type` field in the request body to specify which entity type to search. Currently only supports companies. # Get a single Transcript Source: https://developer.affinity.co/api-reference/2024-01-01/transcripts/get-a-single-transcript /schema/temp/versions/2024-01-01.yml get /v2/transcripts/{transcriptId} Get a transcript with a given id with the first 100 fragments of the transcript. Use the /fragments endpoint to fetch all fragments of the transcript. # Get all Transcripts Source: https://developer.affinity.co/api-reference/2024-01-01/transcripts/get-all-transcripts /schema/temp/versions/2024-01-01.yml get /v2/transcripts Paginate through all transcripts and return basic metadata only. Use the single transcript endpoint to fetch the entire transcript data. Will only return transcripts that the current authenticated user has permission to see. You can filter transcripts 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** | |---|---|---|---| | `id` | `int32` | `=` | `id=1` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-02-04T10:48:24Z` | # Get fragments of a transcript Source: https://developer.affinity.co/api-reference/2024-01-01/transcripts/get-fragments-of-a-transcript /schema/temp/versions/2024-01-01.yml get /v2/transcripts/{transcriptId}/fragments Get fragments of a transcript given a transcript id. # Get a single User Source: https://developer.affinity.co/api-reference/2024-01-01/users/get-a-single-user /schema/temp/versions/2024-01-01.yml get /v2/users/{userId} | ⚠️ This endpoint is currently in BETA | |--| Returns information about a single internal User, including name, primary email address, all email addresses, photo URL, account status, and account role. The `userId` path parameter is the same identifier as the User's corresponding Person ID — every internal User has a matching Person record, and they share the same numeric ID. You can use a Person ID returned from any Persons endpoint here, and vice versa. The `emailAddresses` and `role` properties are only returned to callers with the "Manage Users" [permission](/pages/external-api-v2/permissions). # Get all Users Source: https://developer.affinity.co/api-reference/2024-01-01/users/get-all-users /schema/temp/versions/2024-01-01.yml get /v2/users | ⚠️ This endpoint is currently in BETA | |--| Paginate through internal Users in your organization. Returns information about each User, including name, primary email address, all email addresses, photo URL, account status, and account role. The `emailAddresses` and `role` properties are only returned to callers with the "Manage Users" [permission](/pages/external-api-v2/permissions). Use the optional `term` parameter to filter by first name, last name, or primary email address. You can also filter users 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** | |---|---|---|---| | `id` | `int32` | `=` | `id=1\|id=2\|id=3` | | `status` | `enum` | `=` | `status=active` | # Get current user Source: https://developer.affinity.co/api-reference/2026-07-15/auth/get-current-user /schema/temp/versions/2026-07-15.yml get /v2/auth/whoami Returns information about the authenticated user, their current organization, and API key permissions. Use this endpoint to verify your authentication and understand your available API access levels. # Get metadata on all Calls Source: https://developer.affinity.co/api-reference/2026-07-15/calls/get-metadata-on-all-calls /schema/temp/versions/2026-07-15.yml get /v2/calls Paginate through all calls in Affinity. Returns basic information about the call interaction and its participants. Will only return calls that the current authenticated user has permission to see. You can filter calls 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** | |---|---|---|---| | `id` | `int64` | `=` | `id=1\|id=2\|id=3` | | `startTime` | `datetime` | `>`, `<`, `>=`, `<=` | `sentAt>2025-01-01T01:00:00Z` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z` | # Get metadata on all Chat Messages Source: https://developer.affinity.co/api-reference/2026-07-15/chat-messages/get-metadata-on-all-chat-messages /schema/temp/versions/2026-07-15.yml get /v2/chat-messages Paginate through all chat messages in Affinity. Returns basic information about the chat message interaction and its participants. Will only return chat messages that the current authenticated user has permission to see. You can filter chat messages 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** | |---|---|---|---| | `id` | `int64` | `=` | `id=1\|id=2\|id=3` | | `sentAt` | `datetime` | `>`, `<`, `>=`, `<=` | `sentAt>2025-01-01T01:00:00Z` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z` | # Get a Company's List Entries Source: https://developer.affinity.co/api-reference/2026-07-15/companies/get-a-companys-list-entries /schema/temp/versions/2026-07-15.yml get /v2/companies/{companyId}/list-entries Paginate through the List Entries (AKA rows) for the given Company across all Lists. Each List Entry includes field data for the Company, including list-specific field data. Each List Entry also includes metadata about its creation, i.e., when it was added to the List and by whom. # Get a Company's Lists Source: https://developer.affinity.co/api-reference/2026-07-15/companies/get-a-companys-lists /schema/temp/versions/2026-07-15.yml get /v2/companies/{companyId}/lists Paginate through all Lists where the given Company appears as an entry and that you have access to view. Returns basic List information for each List that contains this Company. # Get a single Company Source: https://developer.affinity.co/api-reference/2026-07-15/companies/get-a-single-company /schema/temp/versions/2026-07-15.yml get /v2/companies/{companyId} Returns basic information and non-list-specific field data on the requested Company. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/companies/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, Companies will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. # Get a single field value on a Company Source: https://developer.affinity.co/api-reference/2026-07-15/companies/get-a-single-field-value-on-a-company /schema/temp/versions/2026-07-15.yml get /v2/companies/{companyId}/fields/{fieldId} | ⚠️ This endpoint is currently in BETA | |--| Retrieve a single field on a company. Returns basic information and the field value. # Get all Companies Source: https://developer.affinity.co/api-reference/2026-07-15/companies/get-all-companies /schema/temp/versions/2026-07-15.yml get /v2/companies Paginate through Companies in Affinity. Returns basic information and non-list-specific field data on each Company. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/companies/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, Companies will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. Requires the "Export All Organizations directory" [permission](/pages/external-api-v2/permissions). # Get dropdown options for a Company Field Source: https://developer.affinity.co/api-reference/2026-07-15/companies/get-dropdown-options-for-a-company-field /schema/temp/versions/2026-07-15.yml get /v2/companies/fields/{fieldId}/dropdown-options Returns the dropdown options for a specific dropdown or ranked-dropdown field on a Company. Use the returned dropdown option IDs when writing dropdown field values via the field update endpoints. # Get field values on a single Company Source: https://developer.affinity.co/api-reference/2026-07-15/companies/get-field-values-on-a-single-company /schema/temp/versions/2026-07-15.yml get /v2/companies/{companyId}/fields | ⚠️ This endpoint is currently in BETA | |--| Paginate through field values on a single company. Enriched, global, and relationship-intelligence fields will be included by default. The `ids` and `types` parameters can be used to filter the collection. These parameters are mutually exclusive. List fields are not returned by this endpoint. To retrieve or update list field values, use the [list entry fields](/api-reference/lists/get-field-values-on-a-single-list-entry) endpoints. # Get metadata on Company Fields Source: https://developer.affinity.co/api-reference/2026-07-15/companies/get-metadata-on-company-fields /schema/temp/versions/2026-07-15.yml get /v2/companies/fields Returns metadata on non-list-specific Company Fields. Use the returned Field IDs to request field data from the GET `/v2/companies` and GET `/v2/companies/{id}` endpoints. You can filter Fields 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** | |---|---|---|---| | `name` | `text` | `=`, `=~` | `name="Location"`, `name=~loc` | Use the `includes` query parameter to add optional metadata to each Field in the response. Pass `includes` more than once to request multiple values. | **Value** | **Adds to each Field** | |---|---| | `filterability` | How the field can be used in filter expressions on GET `/v2/companies` and POST `/v2/companies/search` | | `sortability` | How the field can be used in sort expressions on those endpoints | Example: `GET /v2/companies/fields?includes=filterability&includes=sortability` # Get Notes for a Company Source: https://developer.affinity.co/api-reference/2026-07-15/companies/get-notes-for-a-company /schema/temp/versions/2026-07-15.yml get /v2/companies/{companyId}/notes Returns relevant notes for a given company which includes directly attached notes and notes attached to persons on this company. You can filter notes 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 Relationships for a Company Source: https://developer.affinity.co/api-reference/2026-07-15/companies/get-relationships-for-a-company /schema/temp/versions/2026-07-15.yml get /v2/companies/{companyId}/relationships 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. ## Interaction score The `interactionScore` is a value between `0.0` and `1.0` that reflects how frequently the two persons interact across email, calendar events, and chat messages. The more interactions, the higher the score. Recent interactions are weighted slightly higher than older ones. As rough guidance, scores at or above `0.7` typically indicate two persons that communicate regularly, scores between `0.4` and `0.7` indicate occasional communication, and scores below `0.4` indicate only sporadic communication. ## LinkedIn connections The collection also includes relationships based on a LinkedIn connection between an internal team member and a person related to this company. Whenever a LinkedIn connection exists between the two persons in a relationship, `linkedIn` is populated with the date the connection was made. `linkedIn` is `null` when no LinkedIn connection between the two persons is known by Affinity. Note that LinkedIn-based relationships which do not have any interaction data will have an `interactionScore` of `0`. ## Filters You can filter relationships using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties. | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `interactionScore` | `double` | Strength of the relationship, between `0.0` and `1.0`. Higher means stronger. | `>`, `<`, `>=`, `<=` | `interactionScore>=0.5` | ## Sorting You can sort relationships using the `orderBy` query parameter. `interactionScore` is the only sortable property. # Perform batch operations on a company's fields Source: https://developer.affinity.co/api-reference/2026-07-15/companies/perform-batch-operations-on-a-companys-fields /schema/temp/versions/2026-07-15.yml patch /v2/companies/{companyId}/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. # Search Companies Source: https://developer.affinity.co/api-reference/2026-07-15/companies/search-companies /schema/temp/versions/2026-07-15.yml post /v2/companies/search | ⚠️ This endpoint is currently in BETA | |--| 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). ### Field IDs Field IDs used in `filters`, `sorts`, and `search.fieldIds` follow the formats described in [Working with Field Data](/pages/data-model/working-with-field-data). Use `GET /v2/companies/fields` to discover the available fields and their `valueType`. ### `attributeId` Some fields require an `attributeId` to specify which aspect to filter or sort on. The following relationship intelligence fields all use `attributeId: "date-of-activity"`: `last-email`, `first-email`, `last-contact`, `last-event`, `first-event`, `next-event`. Use `GET /v2/companies/fields` to confirm which fields require an `attributeId`. ### Search The `search.term` is always matched against the company name and primary domain. Providing `search.fieldIds` extends the search to those additional fields; it does not restrict matching to only those fields. Fields with a `valueType` of `datetime` are not searchable and are silently ignored if included in `search.fieldIds`. ### Limits - **Items per filter group** (filters or nested groups): 50 - **Values per filter** (e.g. options in `is-any-of`): 100 - **Sort criteria**: 5 - **Search term minimum length**: 3 characters - **Results per page**: 100 ### Pagination Uses cursor-based pagination. # Update a single field value on a Company Source: https://developer.affinity.co/api-reference/2026-07-15/companies/update-a-single-field-value-on-a-company /schema/temp/versions/2026-07-15.yml post /v2/companies/{companyId}/fields/{fieldId} Update a single field value on a company. # Get All Company Duplicate Suggestions Source: https://developer.affinity.co/api-reference/2026-07-15/company-duplicate-suggestions/get-all-company-duplicate-suggestions /schema/temp/versions/2026-07-15.yml get /v2/duplicates/company-suggestions | ⚠️ This endpoint is currently in BETA | |--| Retrieves company duplicate suggestions detected for your organization. Each suggestion contains a recommended `primaryProfile` and a `duplicateProfiles` array containing the single company profile Affinity has identified as a likely duplicate, along with the `matchCriteria` that produced the suggestion. The full company payload is returned for both sides so that an automated agent can evaluate the suggestion without additional lookups. Only actionable suggestions are returned: pairs that have no feedback recorded yet (not merged, not marked as not-duplicates, and not skipped) and whose underlying company profiles are still active and eligible to be merged. Suggestions that have already been acted on are omitted. You can narrow the results using the `filter` query parameter, which accepts the Affinity Filtering Language. The filterable properties are: | **Property Name** | **Type** | **Allowed Operators** | **Examples** | |---|---|---|---| | `matchCriteria` | `enum` | `=` | `matchCriteria=name`, `matchCriteria=domain-redirect`, `matchCriteria=domain-match` | To act on a suggestion, call `POST /v2/company-merges` with the `id` of the `primaryProfile` and the `id` of the entry in `duplicateProfiles`. Once the merge is applied, the suggestion stops being returned by this endpoint immediately. Marking the pair as not duplicates has the same permanent effect. There is currently no way to retrieve a suggestion after either action. Skipping a suggestion is not permanent and works differently. It hides a `name` match suggestion from the user who skipped it for two weeks, after which the suggestion is returned again. It does not change what other users see, and it does not apply to the other match criteria. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions), which is granted to organization admins. # Get All Company Merge Tasks Source: https://developer.affinity.co/api-reference/2026-07-15/company-merges/get-all-company-merge-tasks /schema/temp/versions/2026-07-15.yml get /v2/tasks/company-merges Retrieve paginated company merge tasks for the organization. Returns all merge tasks initiated by users in your organization, including their current status, the companies involved, and task details. You can filter tasks 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** | |---|---|---|---| | `status` | `enum` | `=` | `status=in-progress`, `status=success`, `status=failed` | Tasks are returned in reverse chronological order (most recent first). Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get All Company Merges Source: https://developer.affinity.co/api-reference/2026-07-15/company-merges/get-all-company-merges /schema/temp/versions/2026-07-15.yml get /v2/company-merges Retrieve paginated company merges for the organization. Returns all company merges initiated by users in your organization, including their current status, the companies involved, and merge details. You can filter company merges 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** | |---|---|---|---| | `status` | `enum` | `=` | `status=in-progress`, `status=success`, `status=failed` | | `taskId` | `text` | `=` | `taskId=789e0123-e45b-67c8-d901-234567890123` | Company merges are returned in reverse chronological order (most recent first). Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get Company Merge Source: https://developer.affinity.co/api-reference/2026-07-15/company-merges/get-company-merge /schema/temp/versions/2026-07-15.yml get /v2/company-merges/{mergeId} Retrieve the status and details of a specific company merge. Returns information about the company merge including its current status, the companies involved, timestamps, and any error information if the merge failed. The `mergeId` can be obtained from the response of the [Get All Company Merges](/api-reference/company-merges/get-all-company-merges) endpoint, or by filtering company merges by task ID using `/v2/company-merges?filter=taskId={taskId}` after initiating a merge. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get Company Merge Task Source: https://developer.affinity.co/api-reference/2026-07-15/company-merges/get-company-merge-task /schema/temp/versions/2026-07-15.yml get /v2/tasks/company-merges/{taskId} Retrieve the status and details of a specific task for company merges. Returns information about the company merges for a specific task including its overall status, number of merges in-progress, completed, and failed. Detailed information about individual merges for this task can be found by querying: `/v2/company-merges?filter=taskId={taskId}` See [Company Merges](/api-reference/company-merges/get-all-company-merges) for more details. Task statuses: - `in-progress`: The merge task is currently being processed. - `success`: The merge task completed successfully. - `failed`: The merge task failed. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Initiate Company Merge Source: https://developer.affinity.co/api-reference/2026-07-15/company-merges/initiate-company-merge /schema/temp/versions/2026-07-15.yml post /v2/company-merges 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. # Get metadata on all Emails Source: https://developer.affinity.co/api-reference/2026-07-15/emails/get-metadata-on-all-emails /schema/temp/versions/2026-07-15.yml get /v2/emails Paginate through all emails in Affinity. Returns basic information about the email interaction and its participants. Will only return emails or subject lines that the current authenticated user has permission to see. Email bodies (the message content) are not available through the API. Only metadata such as the subject, participants, and timestamps is returned. If the authenticated user does not have permission to see an email's subject, the `subject` field is obfuscated and returned as `********` rather than the actual subject line. You can filter emails 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** | |---|---|---|---| | `id` | `int64` | `=` | `id=1\|id=2\|id=3` | | `sentAt` | `datetime` | `>`, `<`, `>=`, `<=` | `sentAt>2025-01-01T01:00:00Z` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z` | # Send Feedback Source: https://developer.affinity.co/api-reference/2026-07-15/feedback/send-feedback /schema/temp/versions/2026-07-15.yml post /v2/feedback Send feedback to Affinity about a particular product area or feature. # Get all field value changes Source: https://developer.affinity.co/api-reference/2026-07-15/field-value-changes/get-all-field-value-changes /schema/temp/versions/2026-07-15.yml get /v2/field-value-changes Retrieve field value changes across all entities and fields in your Affinity workspace. For an overview of field value changes, including which fields support change tracking and how the action types behave, see [Field Value Changes](/pages/data-model/working-with-field-data#field-value-changes). This endpoint is built for delta-sync. Within a single sync, follow `pagination.nextUrl` to page through results until it becomes `null`, which means you have reached the most recent change. To run the next incremental sync, record the `changedAt` of the last change you processed and, on your next sync, filter for changes newer than that timestamp (for example, `filter=changedAt>2024-06-01T12:00:00Z`). Do not persist `nextUrl` between syncs, since it is `null` once you are caught up. Changes are returned in ascending order of `changedAt`, then by internal change ID. Only fields with change tracking enabled are included. You can filter results using the `filter` query parameter. | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `field.id` | `text` | | `=` | `field.id=field-1234` | | `listEntry.id` | `int64` | | `=` | `listEntry.id=5678` | | `changer.id` | `int64` | The person who made the change. | `=` | `changer.id=9012` | | `changedAt` | `datetime` | When the change was made. | `>`, `<`, `>=`, `<=` | `changedAt>=2025-01-01T00:00:00Z` | | `actionType` | `text` | The type of change (`add`, `update`, `delete`) | `=` | `actionType=add` | Filters can be combined: - `|` (OR) to match any of multiple values: `field.id=field-1 | field.id=field-2` - `&` (AND) to require all conditions: `changedAt>=2025-01-01T00:00:00Z & changedAt<=2025-12-31T23:59:59Z` # Search Files by Keyword Source: https://developer.affinity.co/api-reference/2026-07-15/files/search-files-by-keyword /schema/temp/versions/2026-07-15.yml post /v2/files/search 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. # Get Coworker Inferred Connections Source: https://developer.affinity.co/api-reference/2026-07-15/inferred-connections/get-coworker-inferred-connections /schema/temp/versions/2026-07-15.yml get /v2/inferred-connections/coworkers | ⚠️ This endpoint is currently in BETA | |--| Returns inferred connections based on shared work history, grouped by the target person, strongest first. A connection is the belief that a `source` (a person in your Affinity data, with an `id`, whom you know) might know a `target` (a person not in your Affinity data, described only, whom you want to know), because the two had overlapping employment at a shared company. The same target can be reachable through several people you know. Connections are grouped by target: each item in `data` is one target together with the `connections` to them. Within a target, connections are ordered strongest first; targets are ordered by their strongest connection, strongest first. Each `target` carries the company they work at **today** in `target.currentCompany`: the company at which they are a potential contact now, which is not necessarily the shared employer behind the connection. The `filter` parameter is required and must contain at least one filter. The only currently supported filter is `target.currentCompany.id`, which narrows the targets to a single such company. ## Filters | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `target.currentCompany.id` | `integer` | The id of the company the `target` person currently works at. Must reference a single company; filtering on more than one (e.g. `target.currentCompany.id = 1 \| target.currentCompany.id = 2`) returns a `400`. | `=` | `target.currentCompany.id = 123` | # Get Investor-Executive Inferred Connections Source: https://developer.affinity.co/api-reference/2026-07-15/inferred-connections/get-investor-executive-inferred-connections /schema/temp/versions/2026-07-15.yml get /v2/inferred-connections/investor-executive-connections | ⚠️ This endpoint is currently in BETA | |--| Returns investor-executive inferred connections, grouped by the target person, strongest first. A connection is the belief that a `source` (a person in your Affinity data, with an `id`, whom you know) might know a `target` (a person not in your Affinity data, described only, whom you want to know). In this connection type the source is an investor and the target is an executive: the source invested in a company where the target was an executive. The same target can be reachable through several people you know. Connections are grouped by target: each item in `data` is one target together with the `connections` to them. Within a target, connections are ordered strongest first; targets are ordered by their strongest connection, strongest first. Each `target` carries the company they work at **today** in `target.currentCompany`: the company at which they are a potential contact now, which is not necessarily the company involved in the investment. The `filter` parameter is required and must contain at least one filter. The only currently supported filter is `target.currentCompany.id`, which narrows the targets to a single such company. ## Filters | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `target.currentCompany.id` | `integer` | The id of the company the `target` person currently works at. Must reference a single company; filtering on more than one (e.g. `target.currentCompany.id = 1 \| target.currentCompany.id = 2`) returns a `400`. | `=` | `target.currentCompany.id = 123` | # Create a dropdown option for a List Field Source: https://developer.affinity.co/api-reference/2026-07-15/lists/create-a-dropdown-option-for-a-list-field /schema/temp/versions/2026-07-15.yml post /v2/lists/{listId}/fields/{fieldId}/dropdown-options Create a dropdown option for a List Field. # Create a List Source: https://developer.affinity.co/api-reference/2026-07-15/lists/create-a-list /schema/temp/versions/2026-07-15.yml post /v2/lists Create a new List. The List type determines the kind of entities (Companies, Persons, or Opportunities) that can be added. The requester is recorded as the creator and the owner. # Delete a dropdown option for a List Field Source: https://developer.affinity.co/api-reference/2026-07-15/lists/delete-a-dropdown-option-for-a-list-field /schema/temp/versions/2026-07-15.yml delete /v2/lists/{listId}/fields/{fieldId}/dropdown-options/{dropdownOptionId} Delete a dropdown option for a List Field. **Warning:** This permanently removes the option and clears every field value currently set to it across all List Entries. The cleared values cannot be recovered. # Get a dropdown option for a List Field Source: https://developer.affinity.co/api-reference/2026-07-15/lists/get-a-dropdown-option-for-a-list-field /schema/temp/versions/2026-07-15.yml get /v2/lists/{listId}/fields/{fieldId}/dropdown-options/{dropdownOptionId} Get a single dropdown option for a List Field. # Get a single field value Source: https://developer.affinity.co/api-reference/2026-07-15/lists/get-a-single-field-value /schema/temp/versions/2026-07-15.yml get /v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId} Returns a single field value on a list entry. # Get a single List Entry on a List Source: https://developer.affinity.co/api-reference/2026-07-15/lists/get-a-single-list-entry-on-a-list /schema/temp/versions/2026-07-15.yml get /v2/lists/{listId}/list-entries/{listEntryId} Retrieve a single list entry. Returns basic information and field data, including list-specific field data. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/lists/{listId}/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, the List Entry will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. # Get all List Entries on a List Source: https://developer.affinity.co/api-reference/2026-07-15/lists/get-all-list-entries-on-a-list /schema/temp/versions/2026-07-15.yml get /v2/lists/{listId}/list-entries Paginate through the List Entries (AKA rows) on a given List. Returns basic information and field data, including list-specific field data, on each Company, Person, or Opportunity on the List. List Entries also include metadata about their creation, i.e., when they were added to the List and by whom. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/lists/{listId}/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, List Entries will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. Requires the "Export data from Lists" [permission](/pages/external-api-v2/permissions). # Get all List Entries on a Saved View Source: https://developer.affinity.co/api-reference/2026-07-15/lists/get-all-list-entries-on-a-saved-view /schema/temp/versions/2026-07-15.yml get /v2/lists/{listId}/saved-views/{viewId}/list-entries Paginate through the List Entries (AKA rows) on a given Saved View. Use this endpoint when you need to filter entities or only want **some** field data to be returned: This endpoint respects the filters set on a Saved View via web app, and only returns field data corresponding to the columns that have been pulled into the Saved View via web app. Though this endpoint respects the Saved View's filters and column/Field selection, it does not yet preserve sort order. This endpoint also only supports **sheet-type Saved Views**, and not board- or dashboard-type Saved Views. See the [Data Model](/pages/data-model/the-basics) section for more information about Saved Views. Requires the "Export data from Lists" [permission](/pages/external-api-v2/permissions). # Get dropdown options for a List Field Source: https://developer.affinity.co/api-reference/2026-07-15/lists/get-dropdown-options-for-a-list-field /schema/temp/versions/2026-07-15.yml get /v2/lists/{listId}/fields/{fieldId}/dropdown-options Returns the dropdown options for a specific dropdown, ranked-dropdown, or status-dropdown field on a List. Use the returned dropdown option IDs when writing dropdown field values via the field update endpoints. # Get Field Value Changes on a List Entry Source: https://developer.affinity.co/api-reference/2026-07-15/lists/get-field-value-changes-on-a-list-entry /schema/temp/versions/2026-07-15.yml get /v2/lists/{listId}/list-entries/{listEntryId}/field-value-changes Paginate through the historical value changes on the fields of a List Entry. For an overview of field value changes, including which fields support change tracking and how the action types behave, see [Field Value Changes](/pages/data-model/working-with-field-data#field-value-changes). Each change includes who made the change, when it occurred, the action that was performed, and the value that was set. Changes are sorted by `changedAt` in ascending order (oldest first). You can filter field value changes using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties. | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `field.id` | `text` | | `=` | `field.id=field-1234` | | `changedAt` | `datetime` | When the change was made. | `>`, `<`, `>=`, `<=` | `changedAt>2026-01-01T00:00:00Z` | | `changer.id` | `int64` | The person who made the change. | `=` | `changer.id=1234` | | `actionType` | `text` | The type of change (`add`, `update`, `delete`) | `=` | `actionType=add` | # Get field values on a single List Entry Source: https://developer.affinity.co/api-reference/2026-07-15/lists/get-field-values-on-a-single-list-entry /schema/temp/versions/2026-07-15.yml get /v2/lists/{listId}/list-entries/{listEntryId}/fields Paginate through all field values on a single list entry. All fields will be included by default. The `ids` and `types` parameters can be used to filter the collection. # Get metadata on a single List Source: https://developer.affinity.co/api-reference/2026-07-15/lists/get-metadata-on-a-single-list /schema/temp/versions/2026-07-15.yml get /v2/lists/{listId} Retrieve detailed information about a specific List you have access to view. Returns List configuration including name, owner, privacy settings, and creation details. # Get metadata on a single List's Fields Source: https://developer.affinity.co/api-reference/2026-07-15/lists/get-metadata-on-a-single-lists-fields /schema/temp/versions/2026-07-15.yml get /v2/lists/{listId}/fields Returns metadata on the Fields available on a single List. Use the returned Field IDs to request field data from the GET `/v2/lists/{listId}/list-entries` endpoint. You can filter Fields 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** | |---|---|---|---| | `name` | `text` | `=`, `=~` | `name="Status"`, `name=~stat` | Use the `includes` query parameter to add optional metadata to each Field in the response. Pass `includes` more than once to request multiple values. | **Value** | **Adds to each Field** | |---|---| | `filterability` | How the field can be used in filter expressions on POST `/v2/lists/{listId}/list-entries/search` | | `sortability` | How the field can be used in sort expressions on that endpoint | The `time-in-current-status` Field is only filterable and sortable when the List has a Status column configured. On a List without one, its `filterability` and `sortability` are `null`. Example: `GET /v2/lists/{listId}/fields?includes=filterability&includes=sortability` # Get metadata on a single Saved View Source: https://developer.affinity.co/api-reference/2026-07-15/lists/get-metadata-on-a-single-saved-view /schema/temp/versions/2026-07-15.yml get /v2/lists/{listId}/saved-views/{viewId} Retrieve detailed information about a specific Saved View you have access to view. Returns Saved View configuration including name, type, and creation date. # Get metadata on all Lists Source: https://developer.affinity.co/api-reference/2026-07-15/lists/get-metadata-on-all-lists /schema/temp/versions/2026-07-15.yml get /v2/lists Paginate through all Lists in your organization that you have access to view. Returns basic information about each List, including name, owner, and privacy settings. # Get metadata on Saved Views Source: https://developer.affinity.co/api-reference/2026-07-15/lists/get-metadata-on-saved-views /schema/temp/versions/2026-07-15.yml get /v2/lists/{listId}/saved-views Paginate through all Saved Views you have access to view for a specific List. Returns basic information about each Saved View, including name, type, and creation date. # Perform batch operations on a list entry's fields Source: https://developer.affinity.co/api-reference/2026-07-15/lists/perform-batch-operations-on-a-list-entrys-fields /schema/temp/versions/2026-07-15.yml patch /v2/lists/{listId}/list-entries/{listEntryId}/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). # Search List Entries Source: https://developer.affinity.co/api-reference/2026-07-15/lists/search-list-entries /schema/temp/versions/2026-07-15.yml post /v2/lists/{listId}/list-entries/search | ⚠️ This endpoint is currently in BETA | |--| 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). ### Field IDs Field IDs used in `filters`, `sorts`, and `search.fieldIds` follow the formats described in [Working with Field Data](/pages/data-model/working-with-field-data). Use `GET /v2/lists/{listId}/fields?includes=filterability` to discover which fields are filterable and what operators each supports. Use `GET /v2/lists/{listId}/fields?includes=sortability` for sortable fields. ### `attributeId` Some fields require an `attributeId` to specify which aspect to filter or sort on. The following relationship intelligence fields all use `attributeId: "date-of-activity"`: `last-email`, `first-email`, `last-contact`, `last-event`, `first-event`, `next-event`. Use `GET /v2/lists/{listId}/fields?includes=filterability` to confirm which fields require an `attributeId`. ### Search The `search.term` is always matched against the entity's name and primary identifier: company name and primary domain (company lists), person first name, last name, and primary email address (person lists), or opportunity name (opportunity lists). Providing `search.fieldIds` extends the search to those additional fields; it does not restrict matching to only those fields. Fields with a `valueType` of `datetime` are not searchable and are silently ignored if included in `search.fieldIds`. ### Limits - **Items per filter group** (filters or nested groups): 50 - **Values per filter** (e.g. options in `is-any-of`): 100 - **Sort criteria**: 5 - **Search term minimum length**: 3 characters - **Results per page**: 100 ### Pagination Uses cursor-based pagination. # Update a dropdown option for a List Field Source: https://developer.affinity.co/api-reference/2026-07-15/lists/update-a-dropdown-option-for-a-list-field /schema/temp/versions/2026-07-15.yml post /v2/lists/{listId}/fields/{fieldId}/dropdown-options/{dropdownOptionId} Update a dropdown option for a List Field. # Update a single field value on a List Entry Source: https://developer.affinity.co/api-reference/2026-07-15/lists/update-a-single-field-value-on-a-list-entry /schema/temp/versions/2026-07-15.yml post /v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId} Update a single field value. Requires the "Export data from Lists" [permission](/pages/external-api-v2/permissions). # Get a single Meeting Source: https://developer.affinity.co/api-reference/2026-07-15/meetings/get-a-single-meeting /schema/temp/versions/2026-07-15.yml get /v2/meetings/{meetingId} | ⚠️ This endpoint is currently in BETA | |--| Retrieve detailed information about a specific Meeting you have access to view. Returns meeting details including title, timing, organizer, creator, and attendee information. # Get metadata on all Meetings Source: https://developer.affinity.co/api-reference/2026-07-15/meetings/get-metadata-on-all-meetings /schema/temp/versions/2026-07-15.yml get /v2/meetings Paginate through all Meetings in Affinity. Returns basic information about past and future meeting interactions and its attendees. You can filter meetings 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** | |---|---|---|---| | `id` | `int64` | `=` | `id=1\|id=2\|id=3` | | `startTime` | `datetime` | `>`, `<`, `>=`, `<=` | `startTime>2025-01-01T01:00:00Z` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z` | # Create a Note Source: https://developer.affinity.co/api-reference/2026-07-15/notes/create-a-note /schema/temp/versions/2026-07-15.yml post /v2/notes Create a new note. By default it is authored by the calling user; set `creator` to attribute it to a different internal person in your organization. Notes can be attached directly to entities (`Persons`, `Companies`, `Opportunities`), anchored to an interaction (`meeting`, `call`, or `chat message`), or written as a reply to an existing note. The `type` field selects the shape of the request body. AI Notetaker note types (`ai-notetaker`, `ai-notetaker-reply`) are system-generated and cannot be created through this endpoint. | **`type`** | **Description** | **Required** | **Optional** | |------------|-----------------|--------------|--------------| | `entities` | A note attached directly to one or more entities. | `content`, and at least one of `persons` / `companies` / `opportunities`. | Any combination of `persons` / `companies` / `opportunities`. | | `interaction` | A note anchored to a meeting, call, or chat message. | `content`, `interaction.{type,id}`. | `persons` / `companies` / `opportunities`, added as direct associations on top of the interaction's own participants. | | `user-reply` | A reply to an existing root note. Replies have no entity associations or interaction attachment of their own. | `content`, `parent.id` (must reference an existing root note the caller can access). | None | By default a note is authored by the calling user. To attribute a note to a different member of your organization, set the optional `creator` field to reference that person by id. The referenced person must be an active internal person in your organization. By default a note's creation time is the time of the request. To backfill a historical note, set the optional `createdAt` field to the time the note should be recorded as created. **Body content.** `content.html` is rendered HTML that must use only the allowed tags; submitting restricted tags, attributes, URL schemes, or mention spans will cause the request to fail. See the request examples below for representative payloads. # Delete a single Note Source: https://developer.affinity.co/api-reference/2026-07-15/notes/delete-a-single-note /schema/temp/versions/2026-07-15.yml delete /v2/notes/{noteId} Delete a note. You can only delete notes you created. Deleting a root note also deletes its replies (both user replies and AI Notetaker replies); deleting a reply removes only that reply. # Get a single Note Source: https://developer.affinity.co/api-reference/2026-07-15/notes/get-a-single-note /schema/temp/versions/2026-07-15.yml get /v2/notes/{noteId} Get a Note with a given id # Get all Notes Source: https://developer.affinity.co/api-reference/2026-07-15/notes/get-all-notes /schema/temp/versions/2026-07-15.yml get /v2/notes Returns all notes, with the exception of replies. You can filter notes 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** | |---|---|---|---| | `id` | `int32` | `=` | `id=1\|id=2\|id=3` | | `creator.id` | `int32` | `=` | `creator.id=1` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-02-04T10:48:24Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-02-03T10:48:24Z` | # Get Companies attached to a Note Source: https://developer.affinity.co/api-reference/2026-07-15/notes/get-companies-attached-to-a-note /schema/temp/versions/2026-07-15.yml get /v2/notes/{noteId}/attached-companies Returns directly attached companies for a given Note. # Get Opportunities attached to a Note Source: https://developer.affinity.co/api-reference/2026-07-15/notes/get-opportunities-attached-to-a-note /schema/temp/versions/2026-07-15.yml get /v2/notes/{noteId}/attached-opportunities Returns directly attached opportunities for a given Note. # Get Persons attached to a Note Source: https://developer.affinity.co/api-reference/2026-07-15/notes/get-persons-attached-to-a-note /schema/temp/versions/2026-07-15.yml get /v2/notes/{noteId}/attached-persons Returns directly attached persons for a given Note. # Get replies for a Note Source: https://developer.affinity.co/api-reference/2026-07-15/notes/get-replies-for-a-note /schema/temp/versions/2026-07-15.yml get /v2/notes/{noteId}/replies 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` | # Search Notes by Keyword Source: https://developer.affinity.co/api-reference/2026-07-15/notes/search-notes-by-keyword /schema/temp/versions/2026-07-15.yml post /v2/notes/search 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. # Update a single Note Source: https://developer.affinity.co/api-reference/2026-07-15/notes/update-a-single-note /schema/temp/versions/2026-07-15.yml post /v2/notes/{noteId} Make an update to an existing note's body content or its entity associations. You can only update notes you have write access to. You can update any type of note including AI Notetaker notes (`ai-notetaker`, `ai-notetaker-reply`), but a note's type itself cannot be changed. All body properties are optional: only the properties supplied are updated, and other properties are left unchanged. For each of `persons`, `companies`, and `opportunities`, you may: - omit the field to leave existing associations unchanged - send an empty array (`[]`) to clear all associations of that kind - send a non-empty array to replace the existing set with the supplied list. Reply notes (`user-reply`, `ai-notetaker-reply`) have no entity associations, so only `content` can be updated for replies. Updating `content` is subject to the same HTML restrictions as creation; submitting restricted HTML will cause the request to fail. See the request examples below. The content of notes that contain @mentions cannot be updated through this endpoint; attempting to do so returns `400 Bad Request`. Returns `204 No Content` on success, regardless of whether any properties actually changed. # Get a single Opportunity Source: https://developer.affinity.co/api-reference/2026-07-15/opportunities/get-a-single-opportunity /schema/temp/versions/2026-07-15.yml get /v2/opportunities/{opportunityId} Returns basic information but **not** field data on the requested Opportunity. To access field data on Opportunities, use the `/lists/{list_id}/list-entries` or the `/v2/lists/{list_id}/saved-views/{view_id}/list-entries` GET endpoint. # Get all Opportunities Source: https://developer.affinity.co/api-reference/2026-07-15/opportunities/get-all-opportunities /schema/temp/versions/2026-07-15.yml get /v2/opportunities Paginate through Opportunities in Affinity. Returns basic information but **not** field data on each Opportunity. To access field data on Opportunities, use the `/lists/{list_id}/list-entries` or the `/v2/lists/{list_id}/saved-views/{view_id}/list-entries` GET endpoint. Requires the "Export data from Lists" [permission](/pages/external-api-v2/permissions). # Get Notes for an Opportunity Source: https://developer.affinity.co/api-reference/2026-07-15/opportunities/get-notes-for-an-opportunity /schema/temp/versions/2026-07-15.yml get /v2/opportunities/{opportunityId}/notes Returns Notes for a given Opportunity which includes directly attached notes and those attached to persons on this Opportunity. You can filter notes 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 All Person Duplicate Suggestions Source: https://developer.affinity.co/api-reference/2026-07-15/person-duplicate-suggestions/get-all-person-duplicate-suggestions /schema/temp/versions/2026-07-15.yml get /v2/duplicates/person-suggestions | ⚠️ This endpoint is currently in BETA | |--| Retrieves person duplicate suggestions detected for your organization. Each suggestion contains a recommended `primaryProfile` and a `duplicateProfiles` array containing the single person profile Affinity has identified as a likely duplicate, along with the `matchCriteria` that produced the suggestion. The full person payload is returned for both sides so that an automated agent can evaluate the suggestion without additional lookups. Only actionable suggestions are returned: pairs that have no feedback recorded yet (not merged, not marked as not-duplicates, and not skipped) and whose underlying person profiles are still active and eligible to be merged. Suggestions that have already been acted on are omitted. You can narrow the results using the `filter` query parameter, which accepts the Affinity Filtering Language. The filterable properties are: | **Property Name** | **Type** | **Allowed Operators** | **Examples** | |---|---|---|---| | `matchCriteria` | `enum` | `=` | `matchCriteria=name`, `matchCriteria=intelligent` | To act on a suggestion, call `POST /v2/person-merges` with the `id` of the `primaryProfile` and the `id` of the entry in `duplicateProfiles`. Once the merge is applied, the suggestion stops being returned by this endpoint immediately. Marking the pair as not duplicates has the same permanent effect. There is currently no way to retrieve a suggestion after either action. Skipping a suggestion is not permanent and works differently. It hides a `name` match suggestion from the user who skipped it for two weeks, after which the suggestion is returned again. It does not change what other users see, and it does not apply to the other match criteria. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions), which is granted to organization admins. # Get All Person Merge Tasks Source: https://developer.affinity.co/api-reference/2026-07-15/person-merges/get-all-person-merge-tasks /schema/temp/versions/2026-07-15.yml get /v2/tasks/person-merges Retrieve paginated person merge tasks for the organization. Returns all merge tasks initiated by users in your organization, including their current status, the persons involved, and task details. You can filter tasks 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** | |---|---|---|---| | `status` | `enum` | `=` | `status=in-progress`, `status=success`, `status=failed` | Tasks are returned in reverse chronological order (most recent first). Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get All Person Merges Source: https://developer.affinity.co/api-reference/2026-07-15/person-merges/get-all-person-merges /schema/temp/versions/2026-07-15.yml get /v2/person-merges Retrieve paginated person merges for the organization. Returns all person merges initiated by users in your organization, including their current status, the persons involved, and merge details. You can filter person merges 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** | |---|---|---|---| | `status` | `enum` | `=` | `status=in-progress`, `status=success`, `status=failed` | | `taskId` | `text` | `=` | `taskId=789e0123-e45b-67c8-d901-234567890123` | Person merges are returned in reverse chronological order (most recent first). Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get Person Merge Source: https://developer.affinity.co/api-reference/2026-07-15/person-merges/get-person-merge /schema/temp/versions/2026-07-15.yml get /v2/person-merges/{mergeId} Retrieve the status and details of a specific person merge. Returns information about the person merge including its current status, the persons involved, timestamps, and any error information if the merge failed. The `mergeId` can be obtained from the response of the [Get All Person Merges](/api-reference/person-merges/get-all-person-merges) endpoint, or by filtering person merges by task ID using `/v2/person-merges?filter=taskId={taskId}` after initiating a merge. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get Person Merge Task Source: https://developer.affinity.co/api-reference/2026-07-15/person-merges/get-person-merge-task /schema/temp/versions/2026-07-15.yml get /v2/tasks/person-merges/{taskId} Retrieve the status and details of a specific task for person merges. Returns information about the person merges for a specific task including its overall status, number of merges in-progress, completed, and failed. Detailed information about individual merges for this task can be found by querying: `/v2/person-merges?filter=taskId={taskId}` See [Person Merges](/api-reference/person-merges/get-all-person-merges) for more details. Task statuses: - `in-progress`: The merge task is currently being processed. - `success`: The merge task completed successfully. - `failed`: The merge task failed. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Initiate Person Merge Source: https://developer.affinity.co/api-reference/2026-07-15/person-merges/initiate-person-merge /schema/temp/versions/2026-07-15.yml post /v2/person-merges 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. # Create a Person Source: https://developer.affinity.co/api-reference/2026-07-15/persons/create-a-person /schema/temp/versions/2026-07-15.yml post /v2/persons This endpoint is currently in BETA. Creates a new Person. Setting `fields` values requires the "Edit Global Field Values" permission and returns a 403 error if the caller lacks it. # Delete a Person Source: https://developer.affinity.co/api-reference/2026-07-15/persons/delete-a-person /schema/temp/versions/2026-07-15.yml delete /v2/persons/{personId} This endpoint is currently in BETA. Deletes a Person. Returns a 403 error if the Person is internal or inferred internal, since those Persons cannot be deleted. # Get a Person's List Entries Source: https://developer.affinity.co/api-reference/2026-07-15/persons/get-a-persons-list-entries /schema/temp/versions/2026-07-15.yml get /v2/persons/{personId}/list-entries Paginate through the List Entries (AKA rows) for the given Person across all Lists. Each List Entry includes field data for the Person, including list-specific field data. Each List Entry also includes metadata about its creation, i.e., when it was added to the List and by whom. # Get a Person's Lists Source: https://developer.affinity.co/api-reference/2026-07-15/persons/get-a-persons-lists /schema/temp/versions/2026-07-15.yml get /v2/persons/{personId}/lists Paginate through all Lists where the given Person appears as an entry and that you have access to view. Returns basic List information for each List that contains this Person. # Get a single field on a Person Source: https://developer.affinity.co/api-reference/2026-07-15/persons/get-a-single-field-on-a-person /schema/temp/versions/2026-07-15.yml get /v2/persons/{personId}/fields/{fieldId} | ⚠️ This endpoint is currently in BETA | |--| Retrieve a single field on a person. Returns basic information and the field value. # Get a single Person Source: https://developer.affinity.co/api-reference/2026-07-15/persons/get-a-single-person /schema/temp/versions/2026-07-15.yml get /v2/persons/{personId} Returns basic information and non-list-specific field data on the requested Person. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/persons/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, Persons will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. # Get all Persons Source: https://developer.affinity.co/api-reference/2026-07-15/persons/get-all-persons /schema/temp/versions/2026-07-15.yml get /v2/persons Paginate through Persons in Affinity. Returns basic information and non-list-specific field data on each Person. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/persons/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, Persons will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. Requires the "Export All People directory" [permission](/pages/external-api-v2/permissions). # Get dropdown options for a Person Field Source: https://developer.affinity.co/api-reference/2026-07-15/persons/get-dropdown-options-for-a-person-field /schema/temp/versions/2026-07-15.yml get /v2/persons/fields/{fieldId}/dropdown-options Returns the dropdown options for a specific dropdown or ranked-dropdown field on a Person. Use the returned dropdown option IDs when writing dropdown field values via the field update endpoints. # Get field values on a single Person Source: https://developer.affinity.co/api-reference/2026-07-15/persons/get-field-values-on-a-single-person /schema/temp/versions/2026-07-15.yml get /v2/persons/{personId}/fields | ⚠️ This endpoint is currently in BETA | |--| Paginate through field values on a single person. Enriched, global, and relationship-intelligence fields will be included by default. The `ids` and `types` parameters can be used to filter the collection. These parameters are mutually exclusive. List fields are not returned by this endpoint. To retrieve or update list field values, use the [list entry fields](/api-reference/lists/get-field-values-on-a-single-list-entry) endpoints. # Get metadata on Person Fields Source: https://developer.affinity.co/api-reference/2026-07-15/persons/get-metadata-on-person-fields /schema/temp/versions/2026-07-15.yml get /v2/persons/fields Returns metadata on non-list-specific Person Fields. Use the returned Field IDs to request field data from the GET `/v2/persons` and GET `/v2/persons/{id}` endpoints. You can filter Fields 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** | |---|---|---|---| | `name` | `text` | `=`, `=~` | `name="Location"`, `name=~loc` | Use the `includes` query parameter to add optional metadata to each Field in the response. Pass `includes` more than once to request multiple values. | **Value** | **Adds to each Field** | |---|---| | `filterability` | How the field can be used in filter expressions on GET `/v2/persons` and POST `/v2/persons/search` | | `sortability` | How the field can be used in sort expressions on those endpoints | Example: `GET /v2/persons/fields?includes=filterability&includes=sortability` # Get Notes for a Person Source: https://developer.affinity.co/api-reference/2026-07-15/persons/get-notes-for-a-person /schema/temp/versions/2026-07-15.yml get /v2/persons/{personId}/notes Returns notes for a given person id which includes directly attached notes, notes on meetings this person attended, and notes where this person is mentioned. You can filter notes 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 Relationships for a Person Source: https://developer.affinity.co/api-reference/2026-07-15/persons/get-relationships-for-a-person /schema/temp/versions/2026-07-15.yml get /v2/persons/{personId}/relationships 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. ## Interaction score The `interactionScore` is a value between `0.0` and `1.0` that reflects how frequently the two persons interact across email, calendar events, and chat messages. The more interactions, the higher the score. Recent interactions are weighted slightly higher than older ones. As rough guidance, scores at or above `0.7` typically indicate two persons that communicate regularly, scores between `0.4` and `0.7` indicate occasional communication, and scores below `0.4` indicate only sporadic communication. ## LinkedIn connections The collection also includes relationships based on a LinkedIn connection between the given person and their internal team member counterpart. Whenever a LinkedIn connection exists between the two persons in a relationship, `linkedIn` is populated with the date the connection was made.`linkedIn` is `null` when no LinkedIn connection exists between the two persons. Note that LinkedIn-based relationships which do not have any interaction data will have an `interactionScore` of `0`. ## Filters You can filter relationships using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties. | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `interactionScore` | `double` | Strength of the relationship, between `0.0` and `1.0`. Higher means stronger. | `>`, `<`, `>=`, `<=` | `interactionScore>=0.5` | ## Sorting You can sort relationships using the `orderBy` query parameter. `interactionScore` is the only sortable property. # Perform batch operations on a person's fields Source: https://developer.affinity.co/api-reference/2026-07-15/persons/perform-batch-operations-on-a-persons-fields /schema/temp/versions/2026-07-15.yml patch /v2/persons/{personId}/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. # Search Persons Source: https://developer.affinity.co/api-reference/2026-07-15/persons/search-persons /schema/temp/versions/2026-07-15.yml post /v2/persons/search | ⚠️ This endpoint is currently in BETA | |--| 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). ### Field IDs Field IDs used in `filters`, `sorts`, and `search.fieldIds` follow the formats described in [Working with Field Data](/pages/data-model/working-with-field-data). Use `GET /v2/persons/fields` to discover the available fields and their `valueType`. ### `attributeId` Some fields require an `attributeId` to specify which aspect to filter or sort on. The following relationship intelligence fields all use `attributeId: "date-of-activity"`: `last-email`, `first-email`, `last-contact`, `last-event`, `first-event`, `next-event`. Use `GET /v2/persons/fields` to confirm which fields require an `attributeId`. ### Search The `search.term` is always matched against the person's first name, last name, and primary email address. Providing `search.fieldIds` extends the search to those additional fields; it does not restrict matching to only those fields. Fields with a `valueType` of `datetime` are not searchable and are silently ignored if included in `search.fieldIds`. ### Limits - **Items per filter group** (filters or nested groups): 50 - **Values per filter** (e.g. options in `is-any-of`): 100 - **Sort criteria**: 5 - **Search term minimum length**: 3 characters - **Results per page**: 100 ### Pagination Uses cursor-based pagination. # Update a single field value on a Person Source: https://developer.affinity.co/api-reference/2026-07-15/persons/update-a-single-field-value-on-a-person /schema/temp/versions/2026-07-15.yml post /v2/persons/{personId}/fields/{fieldId} Update a single field value on a person. # Get rate limit usage Source: https://developer.affinity.co/api-reference/2026-07-15/rate-limit/get-rate-limit-usage /schema/temp/versions/2026-07-15.yml get /v2/rate-limit | ⚠️ This endpoint is currently in BETA | |--| Returns the current rate limit usage for the authenticated caller. `orgPerMonth` is included only for callers that have a monthly quota; it is absent for callers that don't have one. # Create a Reminder Source: https://developer.affinity.co/api-reference/2026-07-15/reminders/create-a-reminder /schema/temp/versions/2026-07-15.yml post /v2/reminders Creates a new Reminder. Exactly one of `company`, `person`, or `opportunity` must be provided. The `creator` of the new reminder is the user associated with the API key. # Delete a Reminder Source: https://developer.affinity.co/api-reference/2026-07-15/reminders/delete-a-reminder /schema/temp/versions/2026-07-15.yml delete /v2/reminders/{reminderId} | ⚠️ This endpoint is currently in BETA | |--| Deletes a Reminder. Only the reminder's creator or owner may delete it. # Get a single Reminder Source: https://developer.affinity.co/api-reference/2026-07-15/reminders/get-a-single-reminder /schema/temp/versions/2026-07-15.yml get /v2/reminders/{reminderId} | ⚠️ This endpoint is currently in BETA | |--| Returns a single Reminder. Responds with `404` when the reminder does not exist or is not visible to the caller. # Get all Reminders Source: https://developer.affinity.co/api-reference/2026-07-15/reminders/get-all-reminders /schema/temp/versions/2026-07-15.yml get /v2/reminders Returns a page of Reminders visible to the caller. You can filter reminders 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** | |---|---|---|---| | `id` | `int64` | `=` | `id=1\|id=2\|id=3` | | `type` | `enum` | `=` | `type=one-time`, `type=recurring` | | `status` | `enum` | `=` | `status=active`, `status=overdue`, `status=completed` | | `resetTrigger` | `enum` | `=` | `resetTrigger=interaction`, `resetTrigger=email`, `resetTrigger=event` | | `dueDate` | `datetime` | `>`, `<`, `>=`, `<=` | `dueDate>=2026-01-01T00:00:00Z` | | `completedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `completedAt=2026-01-01T00:00:00Z` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt>=2026-01-01T00:00:00Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2026-01-01T00:00:00Z` | | `owner.id` | `int64` | `=`, `!=` | `owner.id=1\|owner.id=2`, `owner.id!=3` | | `creator.id` | `int64` | `=` | `creator.id=1` | | `completer.id` | `int64` | `=` | `completer.id=1` | | `company.id` | `int64` | `=` | `company.id=42` | | `person.id` | `int64` | `=` | `person.id=42` | | `opportunity.id` | `int64` | `=` | `opportunity.id=42` | Results are ordered by `dueDate` ascending (soonest-due first). # Semantic Search Source: https://developer.affinity.co/api-reference/2026-07-15/semantic-search/semantic-search /schema/temp/versions/2026-07-15.yml post /v2/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. Supported query dimensions include: - Industry or sector - Example: `climate tech companies in our pipeline` - Descriptive technology or business concepts - Example: `biotech companies working on extracellular vesicles` - Funding information: investment stage, funding date, amount raised, and year founded - Example: `Series A companies that raised more than $10M` - Employee metrics: headcount, hiring rate, and departure rate - Example: `companies with more than 100 employees` - Interaction history - Example: `companies our firm emailed recently` - Relationship strength - Example: `companies where we have strong connections` - Relative time references - Example: `AI companies founded in the past 3 years` - Headquarters location: city, state, country, or region - Example: `fintech startups in San Francisco` - Investor name - Example: `companies backed by Sequoia Capital` These dimensions can be combined in a single prompt, for example `climate tech companies in San Francisco that raised a Series A in the past year`. Results can be sorted by including the desired sort in the prompt itself, for example `Series B companies with the most funding`. Only one sortable attribute is supported per request. Use the `listIds` field to scope results to companies on specific lists, and combine it with `prompt` to search semantically within those lists. Retrieve list IDs from `GET /v2/lists`. The phrases `I`, `we`, and `our firm` always refer to firm-wide data: interaction history and relationship strength cannot be filtered to a specific team member. The phrases `in our pipeline` and `in our network` match companies your firm has interacted with or added to Affinity in general. They do not search for membership in a list literally named "Pipeline" or similar. To search a specific named list, use `listIds`. The following are not supported: - Third-party enrichment data such as Crunchbase, PitchBook, or Dealroom. - Company valuation and revenue metrics. - Lookup by similarity to a named company, for example `companies like OpenAI`. - Notes, email body content, or file attachments. - Custom fields. - Computed or formula-based sorts, such as a ratio between two fields. # Get a single Transcript Source: https://developer.affinity.co/api-reference/2026-07-15/transcripts/get-a-single-transcript /schema/temp/versions/2026-07-15.yml get /v2/transcripts/{transcriptId} Get a transcript with a given id with the first 100 fragments of the transcript. Use the /fragments endpoint to fetch all fragments of the transcript. # Get all Transcripts Source: https://developer.affinity.co/api-reference/2026-07-15/transcripts/get-all-transcripts /schema/temp/versions/2026-07-15.yml get /v2/transcripts Paginate through all transcripts and return basic metadata only. Use the single transcript endpoint to fetch the entire transcript data. Will only return transcripts that the current authenticated user has permission to see. You can filter transcripts 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** | |---|---|---|---| | `id` | `int32` | `=` | `id=1` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-02-04T10:48:24Z` | # Get fragments of a transcript Source: https://developer.affinity.co/api-reference/2026-07-15/transcripts/get-fragments-of-a-transcript /schema/temp/versions/2026-07-15.yml get /v2/transcripts/{transcriptId}/fragments Get fragments of a transcript given a transcript id. # Get a single User Source: https://developer.affinity.co/api-reference/2026-07-15/users/get-a-single-user /schema/temp/versions/2026-07-15.yml get /v2/users/{userId} | ⚠️ This endpoint is currently in BETA | |--| Returns information about a single internal User, including name, primary email address, all email addresses, photo URL, account status, and account role. The `userId` path parameter is the same identifier as the User's corresponding Person ID — every internal User has a matching Person record, and they share the same numeric ID. You can use a Person ID returned from any Persons endpoint here, and vice versa. The `emailAddresses` and `role` properties are only returned to callers with the "Manage Users" [permission](/pages/external-api-v2/permissions). # Get all Users Source: https://developer.affinity.co/api-reference/2026-07-15/users/get-all-users /schema/temp/versions/2026-07-15.yml get /v2/users | ⚠️ This endpoint is currently in BETA | |--| Paginate through internal Users in your organization. Returns information about each User, including name, primary email address, all email addresses, photo URL, account status, and account role. The `emailAddresses` and `role` properties are only returned to callers with the "Manage Users" [permission](/pages/external-api-v2/permissions). Use the optional `term` parameter to filter by first name, last name, or primary email address. You can also filter users 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** | |---|---|---|---| | `id` | `int32` | `=` | `id=1\|id=2\|id=3` | | `status` | `enum` | `=` | `status=active` | # Create a Webhook Source: https://developer.affinity.co/api-reference/2026-07-15/webhooks/create-a-webhook /schema/temp/versions/2026-07-15.yml post /v2/webhooks | ⚠️ This endpoint is currently in BETA | |--| Creates a new Webhook. The `creator` of the new webhook is the user associated with the API key. The URL is validated with a test delivery before the webhook is created. The request is rejected with a `validation` error on the `url` property when the URL is invalid or unreachable, contains embedded credentials, or already belongs to another webhook in the organization. The request is rejected with a `bad-request` error, which has no associated property, when the organization has reached its webhook limit. # Delete a Webhook Source: https://developer.affinity.co/api-reference/2026-07-15/webhooks/delete-a-webhook /schema/temp/versions/2026-07-15.yml delete /v2/webhooks/{webhookId} | ⚠️ This endpoint is currently in BETA | |--| Deletes a Webhook. Only the webhook's creator, or a user allowed to manage all webhooks, may delete it. # Get a single Webhook Source: https://developer.affinity.co/api-reference/2026-07-15/webhooks/get-a-single-webhook /schema/temp/versions/2026-07-15.yml get /v2/webhooks/{webhookId} | ⚠️ This endpoint is currently in BETA | |--| Returns a single Webhook created by the caller. Users allowed to manage all webhooks may retrieve any Webhook in the organization. Responds with `404` when the webhook does not exist or is not accessible. # Get all Webhooks Source: https://developer.affinity.co/api-reference/2026-07-15/webhooks/get-all-webhooks /schema/temp/versions/2026-07-15.yml get /v2/webhooks | ⚠️ This endpoint is currently in BETA | |--| Returns a page of the Webhooks created by the caller. Users allowed to manage all webhooks receive every Webhook in the organization. You can filter webhooks 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** | |---|---|---|---| | `id` | `int64` | `=` | `id=1\|id=2` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt>=2026-01-01T00:00:00Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2026-01-01T00:00:00Z` | Results are ordered by `id` ascending. # Update a Webhook Source: https://developer.affinity.co/api-reference/2026-07-15/webhooks/update-a-webhook /schema/temp/versions/2026-07-15.yml post /v2/webhooks/{webhookId} | ⚠️ This endpoint is currently in BETA | |--| Updates a Webhook. Only provided fields are changed; omitted fields keep their current value. Changing `url` on an active webhook, or setting `status` to `active` on a disabled webhook, triggers a test delivery that validates the URL before the update is applied. URLs containing embedded credentials are rejected. Only the webhook's creator, or a user allowed to manage all webhooks, may update it. # Get current user Source: https://developer.affinity.co/api-reference/2026-09-17/auth/get-current-user /schema/temp/publish.yml get /v2/auth/whoami Returns information about the authenticated user, their current organization, and API key permissions. Use this endpoint to verify your authentication and understand your available API access levels. # Get metadata on all Calls Source: https://developer.affinity.co/api-reference/2026-09-17/calls/get-metadata-on-all-calls /schema/temp/publish.yml get /v2/calls Paginate through all calls in Affinity. Returns basic information about the call interaction and its participants. Will only return calls that the current authenticated user has permission to see. You can filter calls 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** | |---|---|---|---| | `id` | `int64` | `=` | `id=1\|id=2\|id=3` | | `startTime` | `datetime` | `>`, `<`, `>=`, `<=` | `sentAt>2025-01-01T01:00:00Z` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z` | # Get metadata on all Chat Messages Source: https://developer.affinity.co/api-reference/2026-09-17/chat-messages/get-metadata-on-all-chat-messages /schema/temp/publish.yml get /v2/chat-messages Paginate through all chat messages in Affinity. Returns basic information about the chat message interaction and its participants. Will only return chat messages that the current authenticated user has permission to see. You can filter chat messages 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** | |---|---|---|---| | `id` | `int64` | `=` | `id=1\|id=2\|id=3` | | `sentAt` | `datetime` | `>`, `<`, `>=`, `<=` | `sentAt>2025-01-01T01:00:00Z` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z` | # Create a Company Field Source: https://developer.affinity.co/api-reference/2026-09-17/companies/create-a-company-field /schema/temp/publish.yml post /v2/companies/fields | ⚠️ This endpoint is currently in BETA | |--| Creates a Company Field. A Company Field is available on every company in the organization. Values for the new Field can be set on each company via `POST /v2/companies/{companyId}/fields/{fieldId}`. Requires the Manage global fields permission. Fields of value type `dropdown`, `dropdown-multi`, and `ranked-dropdown` are created without any dropdown options. # Delete a Company Field Source: https://developer.affinity.co/api-reference/2026-09-17/companies/delete-a-company-field /schema/temp/publish.yml delete /v2/companies/fields/{fieldId} | ⚠️ This endpoint is currently in BETA | |--| Deletes a Company Field. **Warning:** This permanently removes the field and clears every field value set on it across all companies. The cleared values cannot be recovered. Requires the Manage global fields permission. Accepts the Field ID of a custom field (`field-`), 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-` ID returns 404. A field from a restricted data partner (see Partner Data Restrictions) returns 404. Native and enriched fields cannot be deleted and return 400. Fields that are computed by Affinity, such as `first-email`, return 404. # Get a Company's List Entries Source: https://developer.affinity.co/api-reference/2026-09-17/companies/get-a-companys-list-entries /schema/temp/publish.yml get /v2/companies/{companyId}/list-entries Paginate through the List Entries (AKA rows) for the given Company across all Lists. Each List Entry includes field data for the Company, including list-specific field data. Each List Entry also includes metadata about its creation, i.e., when it was added to the List and by whom. # Get a Company's Lists Source: https://developer.affinity.co/api-reference/2026-09-17/companies/get-a-companys-lists /schema/temp/publish.yml get /v2/companies/{companyId}/lists Paginate through all Lists where the given Company appears as an entry and that you have access to view. Returns basic List information for each List that contains this Company. # Get a single Company Source: https://developer.affinity.co/api-reference/2026-09-17/companies/get-a-single-company /schema/temp/publish.yml get /v2/companies/{companyId} Returns basic information and non-list-specific field data on the requested Company. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/companies/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, Companies will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. # Get a single field value on a Company Source: https://developer.affinity.co/api-reference/2026-09-17/companies/get-a-single-field-value-on-a-company /schema/temp/publish.yml get /v2/companies/{companyId}/fields/{fieldId} | ⚠️ This endpoint is currently in BETA | |--| Retrieve a single field on a company. Returns basic information and the field value. # Get all Companies Source: https://developer.affinity.co/api-reference/2026-09-17/companies/get-all-companies /schema/temp/publish.yml get /v2/companies Paginate through Companies in Affinity. Returns basic information and non-list-specific field data on each Company. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/companies/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, Companies will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. Requires the "Export All Organizations directory" [permission](/pages/external-api-v2/permissions). # Get dropdown options for a Company Field Source: https://developer.affinity.co/api-reference/2026-09-17/companies/get-dropdown-options-for-a-company-field /schema/temp/publish.yml get /v2/companies/fields/{fieldId}/dropdown-options Returns the dropdown options for a specific dropdown or ranked-dropdown field on a Company. Use the returned dropdown option IDs when writing dropdown field values via the field update endpoints. # Get field values on a single Company Source: https://developer.affinity.co/api-reference/2026-09-17/companies/get-field-values-on-a-single-company /schema/temp/publish.yml get /v2/companies/{companyId}/fields | ⚠️ This endpoint is currently in BETA | |--| Paginate through field values on a single company. Enriched, global, and relationship-intelligence fields will be included by default. The `ids` and `types` parameters can be used to filter the collection. These parameters are mutually exclusive. List fields are not returned by this endpoint. To retrieve or update list field values, use the [list entry fields](/api-reference/lists/get-field-values-on-a-single-list-entry) endpoints. # Get metadata on a Company Field Source: https://developer.affinity.co/api-reference/2026-09-17/companies/get-metadata-on-a-company-field /schema/temp/publish.yml get /v2/companies/fields/{fieldId} | ⚠️ This endpoint is currently in BETA | |--| Returns metadata on a single non-list-specific Company Field. Accepts any Field ID from GET `/v2/companies/fields`, including enriched and native fields. List-specific fields and fields of other entity types return 404. # Get metadata on Company Fields Source: https://developer.affinity.co/api-reference/2026-09-17/companies/get-metadata-on-company-fields /schema/temp/publish.yml get /v2/companies/fields Returns metadata on non-list-specific Company Fields. Use the returned Field IDs to request field data from the GET `/v2/companies` and GET `/v2/companies/{id}` endpoints. You can filter Fields 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** | |---|---|---|---| | `name` | `text` | `=`, `=~` | `name="Location"`, `name=~loc` | Use the `includes` query parameter to add optional metadata to each Field in the response. Pass `includes` more than once to request multiple values. | **Value** | **Adds to each Field** | |---|---| | `filterability` | How the field can be used in filter expressions on GET `/v2/companies` and POST `/v2/companies/search` | | `sortability` | How the field can be used in sort expressions on those endpoints | Example: `GET /v2/companies/fields?includes=filterability&includes=sortability` # Get Notes for a Company Source: https://developer.affinity.co/api-reference/2026-09-17/companies/get-notes-for-a-company /schema/temp/publish.yml get /v2/companies/{companyId}/notes Returns relevant notes for a given company which includes directly attached notes and notes attached to persons on this company. You can filter notes 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 Relationships for a Company Source: https://developer.affinity.co/api-reference/2026-09-17/companies/get-relationships-for-a-company /schema/temp/publish.yml get /v2/companies/{companyId}/relationships 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. ## Interaction score The `interactionScore` is a value between `0.0` and `1.0` that reflects how frequently the two persons interact across email, calendar events, and chat messages. The more interactions, the higher the score. Recent interactions are weighted slightly higher than older ones. As rough guidance, scores at or above `0.7` typically indicate two persons that communicate regularly, scores between `0.4` and `0.7` indicate occasional communication, and scores below `0.4` indicate only sporadic communication. ## LinkedIn connections The collection also includes relationships based on a LinkedIn connection between an internal team member and a person related to this company. Whenever a LinkedIn connection exists between the two persons in a relationship, `linkedIn` is populated with the date the connection was made. `linkedIn` is `null` when no LinkedIn connection between the two persons is known by Affinity. Note that LinkedIn-based relationships which do not have any interaction data will have an `interactionScore` of `0`. ## Filters You can filter relationships using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties. | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `interactionScore` | `double` | Strength of the relationship, between `0.0` and `1.0`. Higher means stronger. | `>`, `<`, `>=`, `<=` | `interactionScore>=0.5` | ## Sorting You can sort relationships using the `orderBy` query parameter. `interactionScore` is the only sortable property. # Get values for a single field on a Company Source: https://developer.affinity.co/api-reference/2026-09-17/companies/get-values-for-a-single-field-on-a-company /schema/temp/publish.yml get /v2/companies/{companyId}/fields/{fieldId}/values | ⚠️ This endpoint is currently in BETA | |--| Paginate through all values for a field on a company. # Perform batch operations on a company's fields Source: https://developer.affinity.co/api-reference/2026-09-17/companies/perform-batch-operations-on-a-companys-fields /schema/temp/publish.yml patch /v2/companies/{companyId}/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. # Search Companies Source: https://developer.affinity.co/api-reference/2026-09-17/companies/search-companies /schema/temp/publish.yml post /v2/companies/search | ⚠️ This endpoint is currently in BETA | |--| 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). ### Field IDs Field IDs used in `filters`, `sorts`, and `search.fieldIds` follow the formats described in [Working with Field Data](/pages/data-model/working-with-field-data). Use `GET /v2/companies/fields` to discover the available fields and their `valueType`. ### `attributeId` Some fields require an `attributeId` to specify which aspect to filter or sort on. The following relationship intelligence fields all use `attributeId: "date-of-activity"`: `last-email`, `first-email`, `last-contact`, `last-event`, `first-event`, `next-event`. Use `GET /v2/companies/fields` to confirm which fields require an `attributeId`. ### Search The `search.term` is always matched against the company name and primary domain. Providing `search.fieldIds` extends the search to those additional fields; it does not restrict matching to only those fields. Fields with a `valueType` of `datetime` are not searchable and are silently ignored if included in `search.fieldIds`. ### Limits - **Items per filter group** (filters or nested groups): 50 - **Values per filter** (e.g. options in `is-any-of`): 100 - **Sort criteria**: 5 - **Search term minimum length**: 3 characters - **Results per page**: 100 ### Pagination Uses cursor-based pagination. # Update a Company Field Source: https://developer.affinity.co/api-reference/2026-09-17/companies/update-a-company-field /schema/temp/publish.yml post /v2/companies/fields/{fieldId} | ⚠️ This endpoint is currently in BETA | |--| 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-`), 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-` 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. # Update a single field value on a Company Source: https://developer.affinity.co/api-reference/2026-09-17/companies/update-a-single-field-value-on-a-company /schema/temp/publish.yml post /v2/companies/{companyId}/fields/{fieldId} Update a single field value on a company. To clear the value, send `null` as `data`; a required field cannot be cleared. For a multi-value field, `data` replaces all current values: to remove one value, send the values to keep. # Get All Company Duplicate Suggestions Source: https://developer.affinity.co/api-reference/2026-09-17/company-duplicate-suggestions/get-all-company-duplicate-suggestions /schema/temp/publish.yml get /v2/duplicates/company-suggestions | ⚠️ This endpoint is currently in BETA | |--| Retrieves company duplicate suggestions detected for your organization. Each suggestion contains a recommended `primaryProfile` and a `duplicateProfiles` array containing the single company profile Affinity has identified as a likely duplicate, along with the `matchCriteria` that produced the suggestion. The full company payload is returned for both sides so that an automated agent can evaluate the suggestion without additional lookups. Only actionable suggestions are returned: pairs that have no feedback recorded yet (not merged, not marked as not-duplicates, and not skipped) and whose underlying company profiles are still active and eligible to be merged. Suggestions that have already been acted on are omitted. You can narrow the results using the `filter` query parameter, which accepts the Affinity Filtering Language. The filterable properties are: | **Property Name** | **Type** | **Allowed Operators** | **Examples** | |---|---|---|---| | `matchCriteria` | `enum` | `=` | `matchCriteria=name`, `matchCriteria=domain-redirect`, `matchCriteria=domain-match` | To act on a suggestion, call `POST /v2/company-merges` with the `id` of the `primaryProfile` and the `id` of the entry in `duplicateProfiles`. Once the merge is applied, the suggestion stops being returned by this endpoint immediately. Marking the pair as not duplicates has the same permanent effect. There is currently no way to retrieve a suggestion after either action. Skipping a suggestion is not permanent and works differently. It hides a `name` match suggestion from the user who skipped it for two weeks, after which the suggestion is returned again. It does not change what other users see, and it does not apply to the other match criteria. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions), which is granted to organization admins. # Get All Company Merge Tasks Source: https://developer.affinity.co/api-reference/2026-09-17/company-merges/get-all-company-merge-tasks /schema/temp/publish.yml get /v2/tasks/company-merges Retrieve paginated company merge tasks for the organization. Returns all merge tasks initiated by users in your organization, including their current status, the companies involved, and task details. You can filter tasks 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** | |---|---|---|---| | `status` | `enum` | `=` | `status=in-progress`, `status=success`, `status=failed` | Tasks are returned in reverse chronological order (most recent first). Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get All Company Merges Source: https://developer.affinity.co/api-reference/2026-09-17/company-merges/get-all-company-merges /schema/temp/publish.yml get /v2/company-merges Retrieve paginated company merges for the organization. Returns all company merges initiated by users in your organization, including their current status, the companies involved, and merge details. You can filter company merges 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** | |---|---|---|---| | `status` | `enum` | `=` | `status=in-progress`, `status=success`, `status=failed` | | `taskId` | `text` | `=` | `taskId=789e0123-e45b-67c8-d901-234567890123` | Company merges are returned in reverse chronological order (most recent first). Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get Company Merge Source: https://developer.affinity.co/api-reference/2026-09-17/company-merges/get-company-merge /schema/temp/publish.yml get /v2/company-merges/{mergeId} Retrieve the status and details of a specific company merge. Returns information about the company merge including its current status, the companies involved, timestamps, and any error information if the merge failed. The `mergeId` can be obtained from the response of the [Get All Company Merges](/api-reference/company-merges/get-all-company-merges) endpoint, or by filtering company merges by task ID using `/v2/company-merges?filter=taskId={taskId}` after initiating a merge. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get Company Merge Task Source: https://developer.affinity.co/api-reference/2026-09-17/company-merges/get-company-merge-task /schema/temp/publish.yml get /v2/tasks/company-merges/{taskId} Retrieve the status and details of a specific task for company merges. Returns information about the company merges for a specific task including its overall status, number of merges in-progress, completed, and failed. Detailed information about individual merges for this task can be found by querying: `/v2/company-merges?filter=taskId={taskId}` See [Company Merges](/api-reference/company-merges/get-all-company-merges) for more details. Task statuses: - `in-progress`: The merge task is currently being processed. - `success`: The merge task completed successfully. - `failed`: The merge task failed. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Initiate Company Merge Source: https://developer.affinity.co/api-reference/2026-09-17/company-merges/initiate-company-merge /schema/temp/publish.yml post /v2/company-merges 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. # Get metadata on all Emails Source: https://developer.affinity.co/api-reference/2026-09-17/emails/get-metadata-on-all-emails /schema/temp/publish.yml get /v2/emails Paginate through all emails in Affinity. Returns basic information about the email interaction and its participants. Will only return emails or subject lines that the current authenticated user has permission to see. Email bodies (the message content) are not available through the API. Only metadata such as the subject, participants, and timestamps is returned. If the authenticated user does not have permission to see an email's subject, the `subject` field is obfuscated and returned as `********` rather than the actual subject line. You can filter emails 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** | |---|---|---|---| | `id` | `int64` | `=` | `id=1\|id=2\|id=3` | | `sentAt` | `datetime` | `>`, `<`, `>=`, `<=` | `sentAt>2025-01-01T01:00:00Z` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z` | # Send Feedback Source: https://developer.affinity.co/api-reference/2026-09-17/feedback/send-feedback /schema/temp/publish.yml post /v2/feedback Send feedback to Affinity about a particular product area or feature. # Get all field value changes Source: https://developer.affinity.co/api-reference/2026-09-17/field-value-changes/get-all-field-value-changes /schema/temp/publish.yml get /v2/field-value-changes Retrieve field value changes across all entities and fields in your Affinity workspace. For an overview of field value changes, including which fields support change tracking and how the action types behave, see [Field Value Changes](/pages/data-model/working-with-field-data#field-value-changes). This endpoint is built for delta-sync. Within a single sync, follow `pagination.nextUrl` to page through results until it becomes `null`, which means you have reached the most recent change. To run the next incremental sync, record the `changedAt` of the last change you processed and, on your next sync, filter for changes newer than that timestamp (for example, `filter=changedAt>2024-06-01T12:00:00Z`). Do not persist `nextUrl` between syncs, since it is `null` once you are caught up. Changes are returned in ascending order of `changedAt`, then by internal change ID. Only fields with change tracking enabled are included. You can filter results using the `filter` query parameter. | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `field.id` | `text` | | `=` | `field.id=field-1234` | | `listEntry.id` | `int64` | | `=` | `listEntry.id=5678` | | `changer.id` | `int64` | The person who made the change. | `=` | `changer.id=9012` | | `changedAt` | `datetime` | When the change was made. | `>`, `<`, `>=`, `<=` | `changedAt>=2025-01-01T00:00:00Z` | | `actionType` | `text` | The type of change (`add`, `update`, `delete`) | `=` | `actionType=add` | | `entity.id` | `int64` | The person, company or opportunity that the change occurred in. | `=` | `entity.id=1234` | | `field.entityType` | `enum` | The type of entity that the change occurred in (`person`, `company`, `opportunity`). | `=` | `field.entityType=company` | `entity.id` matches changes on global fields and on list fields of that entity's list entries. Ids can repeat across entity types, so combine `entity.id` with `field.entityType`: `entity.id=1234 & field.entityType=company`. Filters can be combined: - `|` (OR) to match any of multiple values: `field.id=field-1 | field.id=field-2`, `(entity.id=1 | entity.id=2) & field.entityType=company` - `&` (AND) to require all conditions: `changedAt>=2025-01-01T00:00:00Z & changedAt<=2025-12-31T23:59:59Z` # Get a single File Source: https://developer.affinity.co/api-reference/2026-09-17/files/get-a-single-file /schema/temp/publish.yml get /v2/files/{fileId} | This endpoint is currently in BETA | |--| Returns a single file's metadata and a temporary signed download URL. # Get all Files Source: https://developer.affinity.co/api-reference/2026-09-17/files/get-all-files /schema/temp/publish.yml get /v2/files | This endpoint is currently in BETA | |--| Returns a page of Files visible to the caller. You can filter files 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** | |---|---|---|---| | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt>=2026-01-01T00:00:00Z` | | `creator.id` | `int64` | `=` | `creator.id=1` | | `person.id` | `int64` | `=` | `person.id=1` | | `company.id` | `int64` | `=` | `company.id=1` | | `opportunity.id` | `int64` | `=` | `opportunity.id=1` | Results are ordered by `createdAt` descending (most recently uploaded first). # Search Files by Keyword Source: https://developer.affinity.co/api-reference/2026-09-17/files/search-files-by-keyword /schema/temp/publish.yml post /v2/files/search 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. # Get Coworker Inferred Connections Source: https://developer.affinity.co/api-reference/2026-09-17/inferred-connections/get-coworker-inferred-connections /schema/temp/publish.yml get /v2/inferred-connections/coworkers | ⚠️ This endpoint is currently in BETA | |--| Returns inferred connections based on shared work history, grouped by the target person, strongest first. A connection is the belief that a `source` (a person in your Affinity data, with an `id`, whom you know) might know a `target` (a person not in your Affinity data, described only, whom you want to know), because the two had overlapping employment at a shared company. The same target can be reachable through several people you know. Connections are grouped by target: each item in `data` is one target together with the `connections` to them. Within a target, connections are ordered strongest first; targets are ordered by their strongest connection, strongest first. Each `target` carries the company they work at **today** in `target.currentCompany`: the company at which they are a potential contact now, which is not necessarily the shared employer behind the connection. The `filter` parameter is required and must contain at least one filter. The only currently supported filter is `target.currentCompany.id`, which narrows the targets to a single such company. ## Filters | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `target.currentCompany.id` | `integer` | The id of the company the `target` person currently works at. Must reference a single company; filtering on more than one (e.g. `target.currentCompany.id = 1 \| target.currentCompany.id = 2`) returns a `400`. | `=` | `target.currentCompany.id = 123` | # Get Investor-Executive Inferred Connections Source: https://developer.affinity.co/api-reference/2026-09-17/inferred-connections/get-investor-executive-inferred-connections /schema/temp/publish.yml get /v2/inferred-connections/investor-executive-connections | ⚠️ This endpoint is currently in BETA | |--| Returns investor-executive inferred connections, grouped by the target person, strongest first. A connection is the belief that a `source` (a person in your Affinity data, with an `id`, whom you know) might know a `target` (a person not in your Affinity data, described only, whom you want to know). In this connection type the source is an investor and the target is an executive: the source invested in a company where the target was an executive. The same target can be reachable through several people you know. Connections are grouped by target: each item in `data` is one target together with the `connections` to them. Within a target, connections are ordered strongest first; targets are ordered by their strongest connection, strongest first. Each `target` carries the company they work at **today** in `target.currentCompany`: the company at which they are a potential contact now, which is not necessarily the company involved in the investment. The `filter` parameter is required and must contain at least one filter. The only currently supported filter is `target.currentCompany.id`, which narrows the targets to a single such company. ## Filters | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `target.currentCompany.id` | `integer` | The id of the company the `target` person currently works at. Must reference a single company; filtering on more than one (e.g. `target.currentCompany.id = 1 \| target.currentCompany.id = 2`) returns a `400`. | `=` | `target.currentCompany.id = 123` | # Get Introduction Paths Source: https://developer.affinity.co/api-reference/2026-09-17/intro-paths/get-introduction-paths /schema/temp/publish.yml get /v2/intro-paths Returns ranked introduction paths from an internal person to a target, strongest first. Each path is composed of one or two edges: a single edge is a direct relationship between an internal person and the target. Two edges represent an internal person reaching the target through a bridge person, where `edges[0].to` and `edges[1].from` are the same person. The target is specified with the required `filter` parameter, using exactly one of the `target.id` or `target.currentCompany.id` filter terms. `target.id` targets a specific person, whether an existing contact or a person already identified at a target company. `target.currentCompany.id` targets any person at that company; returned paths may lead to different people, and each path's target is `edges[edges.length - 1].to`, exposed as `target` for filtering. Only relative ordering is exposed. `rank` reflects each path's position among all paths to the target, computed before paging is applied, so a path keeps the same rank on whichever page it appears; it is not stable across requests as underlying data changes. `tier` is a qualitative `strong`, `moderate`, or `weak` band for the path as a whole. Neither `rank` nor `tier` exposes the underlying interaction score or inferred connection confidence used to compute them. Each edge also carries its own `tier`, independent of the path-level `tier`, so a client can distinguish which specific hop is strong or weak within a two-edge path. Results are always ordered by rank, strongest first. `orderBy` is not supported. ## Filters The `filter` parameter is required and must contain exactly one of the following filter terms. Providing both, or neither, returns a `400`. | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `target.id` | `integer` | The target person's id. | `=` | `target.id = 123` | | `target.currentCompany.id` | `integer` | The id of the company the target person currently works at; ranks paths to any person at that company. | `=` | `target.currentCompany.id = 456` | ## Path types An edge's `connectionInfo` carries whichever signals connect its two people, and more than one can be present on the same edge. `interactionScore` reflects interaction history, `lastInteraction` the most recent email, meeting, call, or chat message behind it, `linkedIn` a LinkedIn connection, and `sharedWorkHistory` or `investmentHistory` an inferred connection through shared employment or an investor-portfolio relationship. Each is `null` or empty when that signal is absent. # Add a List Entry to a List Source: https://developer.affinity.co/api-reference/2026-09-17/lists/add-a-list-entry-to-a-list /schema/temp/publish.yml post /v2/lists/{listId}/list-entries | ⚠️ This endpoint is currently in BETA | |--| Adds a Company or Person to a List as a new List Entry. Opportunities cannot be added with this endpoint. The type of the entity referenced by `entity.id` is determined by the List's type: a Company ID for a company List, a Person ID for a person List. If no entity of the List's type exists with the given ID, the request is rejected with `400 Bad Request`. Only the List's own required fields are checked. Required fields on the entity itself were already enforced when the entity was created, so they are not re-checked here. If the List has a required field, the request is rejected with `400 Bad Request` and the missing field IDs are returned in the response body. This endpoint does not accept field values, so there is no API-level remediation: populate such a List through a UI flow that provides values at add time, or remove the required flag from the List's field configuration. The new List Entry gets the same initial field values an add in the app gets: the Status field is set to the List's first open Status, and the Owners field is set to the List Entry's creator. The creator defaults to the authenticated user; it can be overridden by providing `creatorId`. # Create a dropdown option for a List Field Source: https://developer.affinity.co/api-reference/2026-09-17/lists/create-a-dropdown-option-for-a-list-field /schema/temp/publish.yml post /v2/lists/{listId}/fields/{fieldId}/dropdown-options Create a dropdown option for a List Field. # Create a List Source: https://developer.affinity.co/api-reference/2026-09-17/lists/create-a-list /schema/temp/publish.yml post /v2/lists Create a new List. The List type determines the kind of entities (Companies, Persons, or Opportunities) that can be added. The requester is recorded as the creator and the owner. # Create a List Field Source: https://developer.affinity.co/api-reference/2026-09-17/lists/create-a-list-field /schema/temp/publish.yml post /v2/lists/{listId}/fields | This endpoint is currently in BETA | |--| Creates a list-specific Field on a List. Values for the new Field can be set on each List Entry via `POST /v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}`. Requires the Standard role or higher on the List. Creating a field with `isRequired` set to `true` requires the Admin role on the List. Fields of value type `dropdown`, `dropdown-multi`, and `ranked-dropdown` are created without any dropdown options. # Delete a dropdown option for a List Field Source: https://developer.affinity.co/api-reference/2026-09-17/lists/delete-a-dropdown-option-for-a-list-field /schema/temp/publish.yml delete /v2/lists/{listId}/fields/{fieldId}/dropdown-options/{dropdownOptionId} Delete a dropdown option for a List Field. **Warning:** This permanently removes the option and clears every field value currently set to it across all List Entries. The cleared values cannot be recovered. # Delete a List Field Source: https://developer.affinity.co/api-reference/2026-09-17/lists/delete-a-list-field /schema/temp/publish.yml delete /v2/lists/{listId}/fields/{fieldId} | This endpoint is currently in BETA | |--| Deletes a list-specific Field from a List. **Warning:** This permanently removes the field and clears every field value set on it across all List Entries in the List. The cleared values cannot be recovered. Only list-specific (custom) fields can be removed via this endpoint. Native list-managed fields cannot be deleted. Requires the Admin role on the List. A user with the Standard role on the List can delete a field only when no values are set on it. # Get a dropdown option for a List Field Source: https://developer.affinity.co/api-reference/2026-09-17/lists/get-a-dropdown-option-for-a-list-field /schema/temp/publish.yml get /v2/lists/{listId}/fields/{fieldId}/dropdown-options/{dropdownOptionId} Get a single dropdown option for a List Field. # Get a single field value Source: https://developer.affinity.co/api-reference/2026-09-17/lists/get-a-single-field-value /schema/temp/publish.yml get /v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId} Returns a single field value on a list entry. # Get a single List Entry on a List Source: https://developer.affinity.co/api-reference/2026-09-17/lists/get-a-single-list-entry-on-a-list /schema/temp/publish.yml get /v2/lists/{listId}/list-entries/{listEntryId} Retrieve a single list entry. Returns basic information and field data, including list-specific field data. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/lists/{listId}/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, the List Entry will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. # Get all List Entries on a List Source: https://developer.affinity.co/api-reference/2026-09-17/lists/get-all-list-entries-on-a-list /schema/temp/publish.yml get /v2/lists/{listId}/list-entries Paginate through the List Entries (AKA rows) on a given List. Returns basic information and field data, including list-specific field data, on each Company, Person, or Opportunity on the List. List Entries also include metadata about their creation, i.e., when they were added to the List and by whom. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/lists/{listId}/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, List Entries will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. Requires the "Export data from Lists" [permission](/pages/external-api-v2/permissions). # Get all List Entries on a Saved View Source: https://developer.affinity.co/api-reference/2026-09-17/lists/get-all-list-entries-on-a-saved-view /schema/temp/publish.yml get /v2/lists/{listId}/saved-views/{viewId}/list-entries Paginate through the List Entries (AKA rows) on a given Saved View. Use this endpoint when you need to filter entities or only want **some** field data to be returned: This endpoint respects the filters set on a Saved View via web app, and only returns field data corresponding to the columns that have been pulled into the Saved View via web app. This endpoint preserves the Saved View's sort order when the Saved View uses the new Lists experience in the web app. For other Saved Views, it does not yet preserve sort order. This endpoint also only supports **sheet-type Saved Views**, and not board- or dashboard-type Saved Views. See the [Data Model](/pages/data-model/the-basics) section for more information about Saved Views. Requires the "Export data from Lists" [permission](/pages/external-api-v2/permissions). # Get dropdown options for a List Field Source: https://developer.affinity.co/api-reference/2026-09-17/lists/get-dropdown-options-for-a-list-field /schema/temp/publish.yml get /v2/lists/{listId}/fields/{fieldId}/dropdown-options Returns the dropdown options for a specific dropdown, ranked-dropdown, or status-dropdown field on a List. Use the returned dropdown option IDs when writing dropdown field values via the field update endpoints. # Get Field Value Changes on a List Entry Source: https://developer.affinity.co/api-reference/2026-09-17/lists/get-field-value-changes-on-a-list-entry /schema/temp/publish.yml get /v2/lists/{listId}/list-entries/{listEntryId}/field-value-changes Paginate through the historical value changes on the fields of a List Entry. For an overview of field value changes, including which fields support change tracking and how the action types behave, see [Field Value Changes](/pages/data-model/working-with-field-data#field-value-changes). Each change includes who made the change, when it occurred, the action that was performed, and the value that was set. Changes are sorted by `changedAt` in ascending order (oldest first). You can filter field value changes using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties. | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `field.id` | `text` | | `=` | `field.id=field-1234` | | `changedAt` | `datetime` | When the change was made. | `>`, `<`, `>=`, `<=` | `changedAt>2026-01-01T00:00:00Z` | | `changer.id` | `int64` | The person who made the change. | `=` | `changer.id=1234` | | `actionType` | `text` | The type of change (`add`, `update`, `delete`) | `=` | `actionType=add` | # Get field values on a single List Entry Source: https://developer.affinity.co/api-reference/2026-09-17/lists/get-field-values-on-a-single-list-entry /schema/temp/publish.yml get /v2/lists/{listId}/list-entries/{listEntryId}/fields Paginate through all field values on a single list entry. All fields will be included by default. The `ids` and `types` parameters can be used to filter the collection. # Get metadata on a List Field Source: https://developer.affinity.co/api-reference/2026-09-17/lists/get-metadata-on-a-list-field /schema/temp/publish.yml get /v2/lists/{listId}/fields/{fieldId} | This endpoint is currently in BETA | |--| Returns metadata on a single Field on a List. # Get metadata on a single List Source: https://developer.affinity.co/api-reference/2026-09-17/lists/get-metadata-on-a-single-list /schema/temp/publish.yml get /v2/lists/{listId} Retrieve detailed information about a specific List you have access to view. Returns List configuration including name, owner, privacy settings, and creation details. # Get metadata on a single List's Fields Source: https://developer.affinity.co/api-reference/2026-09-17/lists/get-metadata-on-a-single-lists-fields /schema/temp/publish.yml get /v2/lists/{listId}/fields Returns metadata on the Fields available on a single List. Use the returned Field IDs to request field data from the GET `/v2/lists/{listId}/list-entries` endpoint. You can filter Fields 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** | |---|---|---|---| | `name` | `text` | `=`, `=~` | `name="Status"`, `name=~stat` | Use the `includes` query parameter to add optional metadata to each Field in the response. Pass `includes` more than once to request multiple values. | **Value** | **Adds to each Field** | |---|---| | `filterability` | How the field can be used in filter expressions on POST `/v2/lists/{listId}/list-entries/search` | | `sortability` | How the field can be used in sort expressions on that endpoint | The `time-in-current-status` Field is only filterable and sortable when the List has a Status column configured. On a List without one, its `filterability` and `sortability` are `null`. Example: `GET /v2/lists/{listId}/fields?includes=filterability&includes=sortability` # Get metadata on a single Saved View Source: https://developer.affinity.co/api-reference/2026-09-17/lists/get-metadata-on-a-single-saved-view /schema/temp/publish.yml get /v2/lists/{listId}/saved-views/{viewId} Retrieve detailed information about a specific Saved View you have access to view. Returns Saved View configuration including name, type, and creation date. # Get metadata on all Lists Source: https://developer.affinity.co/api-reference/2026-09-17/lists/get-metadata-on-all-lists /schema/temp/publish.yml get /v2/lists Paginate through all Lists in your organization that you have access to view. Returns basic information about each List, including name, owner, and privacy settings. # Get metadata on Saved Views Source: https://developer.affinity.co/api-reference/2026-09-17/lists/get-metadata-on-saved-views /schema/temp/publish.yml get /v2/lists/{listId}/saved-views Paginate through all Saved Views you have access to view for a specific List. Returns basic information about each Saved View, including name, type, and creation date. # Get values for a single field on a List Entry Source: https://developer.affinity.co/api-reference/2026-09-17/lists/get-values-for-a-single-field-on-a-list-entry /schema/temp/publish.yml get /v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}/values | ⚠️ This endpoint is currently in BETA | |--| Paginate through all values for a field on a list entry. # Perform batch operations on a list entry's fields Source: https://developer.affinity.co/api-reference/2026-09-17/lists/perform-batch-operations-on-a-list-entrys-fields /schema/temp/publish.yml patch /v2/lists/{listId}/list-entries/{listEntryId}/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). # Search List Entries Source: https://developer.affinity.co/api-reference/2026-09-17/lists/search-list-entries /schema/temp/publish.yml post /v2/lists/{listId}/list-entries/search | ⚠️ This endpoint is currently in BETA | |--| 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). ### Field IDs Field IDs used in `filters`, `sorts`, and `search.fieldIds` follow the formats described in [Working with Field Data](/pages/data-model/working-with-field-data). Use `GET /v2/lists/{listId}/fields?includes=filterability` to discover which fields are filterable and what operators each supports. Use `GET /v2/lists/{listId}/fields?includes=sortability` for sortable fields. ### `attributeId` Some fields require an `attributeId` to specify which aspect to filter or sort on. The following relationship intelligence fields all use `attributeId: "date-of-activity"`: `last-email`, `first-email`, `last-contact`, `last-event`, `first-event`, `next-event`. Use `GET /v2/lists/{listId}/fields?includes=filterability` to confirm which fields require an `attributeId`. ### Search The `search.term` is always matched against the entity's name and primary identifier: company name and primary domain (company lists), person first name, last name, and primary email address (person lists), or opportunity name (opportunity lists). Providing `search.fieldIds` extends the search to those additional fields; it does not restrict matching to only those fields. Fields with a `valueType` of `datetime` are not searchable and are silently ignored if included in `search.fieldIds`. ### Limits - **Items per filter group** (filters or nested groups): 50 - **Values per filter** (e.g. options in `is-any-of`): 100 - **Sort criteria**: 5 - **Search term minimum length**: 3 characters - **Results per page**: 100 ### Pagination Uses cursor-based pagination. # Update a dropdown option for a List Field Source: https://developer.affinity.co/api-reference/2026-09-17/lists/update-a-dropdown-option-for-a-list-field /schema/temp/publish.yml post /v2/lists/{listId}/fields/{fieldId}/dropdown-options/{dropdownOptionId} Update a dropdown option for a List Field. # Update a List Field Source: https://developer.affinity.co/api-reference/2026-09-17/lists/update-a-list-field /schema/temp/publish.yml post /v2/lists/{listId}/fields/{fieldId} | This endpoint is currently in BETA | |--| Updates a list-specific Field on a List. Only the provided properties are updated. Requires the Standard role or higher on the List. Updating the List's Status or Owners field, or changing `isRequired`, requires the Admin role on the List. # Update a single field value on a List Entry Source: https://developer.affinity.co/api-reference/2026-09-17/lists/update-a-single-field-value-on-a-list-entry /schema/temp/publish.yml post /v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId} Update a single field value. To clear the value, send `null` as `data`; a required field cannot be cleared. For a multi-value field, `data` replaces all current values: to remove one value, send the values to keep. Requires the "Export data from Lists" [permission](/pages/external-api-v2/permissions). # Get a single Meeting Source: https://developer.affinity.co/api-reference/2026-09-17/meetings/get-a-single-meeting /schema/temp/publish.yml get /v2/meetings/{meetingId} | ⚠️ This endpoint is currently in BETA | |--| Retrieve detailed information about a specific Meeting you have access to view. Returns meeting details including title, timing, organizer, creator, and attendee information. # Get metadata on all Meetings Source: https://developer.affinity.co/api-reference/2026-09-17/meetings/get-metadata-on-all-meetings /schema/temp/publish.yml get /v2/meetings Paginate through all Meetings in Affinity. Returns basic information about past and future meeting interactions and its attendees. You can filter meetings 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** | |---|---|---|---| | `id` | `int64` | `=` | `id=1\|id=2\|id=3` | | `startTime` | `datetime` | `>`, `<`, `>=`, `<=` | `startTime>2025-01-01T01:00:00Z` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-01-01T01:00:00Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-01-01T01:00:00Z` | # Create a Note Source: https://developer.affinity.co/api-reference/2026-09-17/notes/create-a-note /schema/temp/publish.yml post /v2/notes Create a new note. By default it is authored by the calling user; set `creator` to attribute it to a different internal person in your organization. Notes can be attached directly to entities (`Persons`, `Companies`, `Opportunities`), anchored to an interaction (`meeting`, `call`, or `chat message`), or written as a reply to an existing note. The `type` field selects the shape of the request body. AI Notetaker note types (`ai-notetaker`, `ai-notetaker-reply`) are system-generated and cannot be created through this endpoint. | **`type`** | **Description** | **Required** | **Optional** | |------------|-----------------|--------------|--------------| | `entities` | A note attached directly to one or more entities. | `content`, and at least one of `persons` / `companies` / `opportunities`. | Any combination of `persons` / `companies` / `opportunities`. | | `interaction` | A note anchored to a meeting, call, or chat message. | `content`, `interaction.{type,id}`. | `persons` / `companies` / `opportunities`, added as direct associations on top of the interaction's own participants. | | `user-reply` | A reply to an existing root note. Replies have no entity associations or interaction attachment of their own. | `content`, `parent.id` (must reference an existing root note the caller can access). | None | By default a note is authored by the calling user. To attribute a note to a different member of your organization, set the optional `creator` field to reference that person by id. The referenced person must be an active internal person in your organization. By default a note's creation time is the time of the request. To backfill a historical note, set the optional `createdAt` field to the time the note should be recorded as created. **Body content.** `content.html` is rendered HTML that must use only the allowed tags; submitting restricted tags, attributes, URL schemes, or mention spans will cause the request to fail. See the request examples below for representative payloads. # Delete a single Note Source: https://developer.affinity.co/api-reference/2026-09-17/notes/delete-a-single-note /schema/temp/publish.yml delete /v2/notes/{noteId} Delete a note. You can only delete notes you created. Deleting a root note also deletes its replies (both user replies and AI Notetaker replies); deleting a reply removes only that reply. # Get a single Note Source: https://developer.affinity.co/api-reference/2026-09-17/notes/get-a-single-note /schema/temp/publish.yml get /v2/notes/{noteId} Get a Note with a given id # Get all Notes Source: https://developer.affinity.co/api-reference/2026-09-17/notes/get-all-notes /schema/temp/publish.yml get /v2/notes Returns all notes, with the exception of replies. You can filter notes 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** | |---|---|---|---| | `id` | `int32` | `=` | `id=1\|id=2\|id=3` | | `creator.id` | `int32` | `=` | `creator.id=1` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-02-04T10:48:24Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-02-03T10:48:24Z` | # Get Companies attached to a Note Source: https://developer.affinity.co/api-reference/2026-09-17/notes/get-companies-attached-to-a-note /schema/temp/publish.yml get /v2/notes/{noteId}/attached-companies Returns directly attached companies for a given Note. # Get Opportunities attached to a Note Source: https://developer.affinity.co/api-reference/2026-09-17/notes/get-opportunities-attached-to-a-note /schema/temp/publish.yml get /v2/notes/{noteId}/attached-opportunities Returns directly attached opportunities for a given Note. # Get Persons attached to a Note Source: https://developer.affinity.co/api-reference/2026-09-17/notes/get-persons-attached-to-a-note /schema/temp/publish.yml get /v2/notes/{noteId}/attached-persons Returns directly attached persons for a given Note. # Get replies for a Note Source: https://developer.affinity.co/api-reference/2026-09-17/notes/get-replies-for-a-note /schema/temp/publish.yml get /v2/notes/{noteId}/replies 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` | # Search Notes by Keyword Source: https://developer.affinity.co/api-reference/2026-09-17/notes/search-notes-by-keyword /schema/temp/publish.yml post /v2/notes/search 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. # Update a single Note Source: https://developer.affinity.co/api-reference/2026-09-17/notes/update-a-single-note /schema/temp/publish.yml post /v2/notes/{noteId} Make an update to an existing note's body content or its entity associations. You can only update notes you have write access to. You can update any type of note including AI Notetaker notes (`ai-notetaker`, `ai-notetaker-reply`), but a note's type itself cannot be changed. All body properties are optional: only the properties supplied are updated, and other properties are left unchanged. For each of `persons`, `companies`, and `opportunities`, you may: - omit the field to leave existing associations unchanged - send an empty array (`[]`) to clear all associations of that kind - send a non-empty array to replace the existing set with the supplied list. Reply notes (`user-reply`, `ai-notetaker-reply`) have no entity associations, so only `content` can be updated for replies. Updating `content` is subject to the same HTML restrictions as creation; submitting restricted HTML will cause the request to fail. See the request examples below. The content of notes that contain @mentions cannot be updated through this endpoint; attempting to do so returns `400 Bad Request`. Returns `204 No Content` on success, regardless of whether any properties actually changed. # Delete an Opportunity Source: https://developer.affinity.co/api-reference/2026-09-17/opportunities/delete-an-opportunity /schema/temp/publish.yml delete /v2/opportunities/{opportunityId} | This endpoint is currently in BETA | |--| Deletes an Opportunity. Requires manage access to the opportunity. # Get a single Opportunity Source: https://developer.affinity.co/api-reference/2026-09-17/opportunities/get-a-single-opportunity /schema/temp/publish.yml get /v2/opportunities/{opportunityId} Returns basic information but **not** field data on the requested Opportunity. To access field data on Opportunities, use the `/lists/{list_id}/list-entries` or the `/v2/lists/{list_id}/saved-views/{view_id}/list-entries` GET endpoint. # Get all Opportunities Source: https://developer.affinity.co/api-reference/2026-09-17/opportunities/get-all-opportunities /schema/temp/publish.yml get /v2/opportunities Paginate through Opportunities in Affinity. Returns basic information but **not** field data on each Opportunity. To access field data on Opportunities, use the `/lists/{list_id}/list-entries` or the `/v2/lists/{list_id}/saved-views/{view_id}/list-entries` GET endpoint. Requires the "Export data from Lists" [permission](/pages/external-api-v2/permissions). # Get Notes for an Opportunity Source: https://developer.affinity.co/api-reference/2026-09-17/opportunities/get-notes-for-an-opportunity /schema/temp/publish.yml get /v2/opportunities/{opportunityId}/notes Returns Notes for a given Opportunity which includes directly attached notes and those attached to persons on this Opportunity. You can filter notes 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` | # Update an Opportunity Source: https://developer.affinity.co/api-reference/2026-09-17/opportunities/update-an-opportunity /schema/temp/publish.yml post /v2/opportunities/{opportunityId} | This endpoint is currently in BETA | |--| Updates an Opportunity. Only provided properties are updated; properties omitted from the request keep their current value. Requires manage access to the opportunity. # Get All Person Duplicate Suggestions Source: https://developer.affinity.co/api-reference/2026-09-17/person-duplicate-suggestions/get-all-person-duplicate-suggestions /schema/temp/publish.yml get /v2/duplicates/person-suggestions | ⚠️ This endpoint is currently in BETA | |--| Retrieves person duplicate suggestions detected for your organization. Each suggestion contains a recommended `primaryProfile` and a `duplicateProfiles` array containing the single person profile Affinity has identified as a likely duplicate, along with the `matchCriteria` that produced the suggestion. The full person payload is returned for both sides so that an automated agent can evaluate the suggestion without additional lookups. Only actionable suggestions are returned: pairs that have no feedback recorded yet (not merged, not marked as not-duplicates, and not skipped) and whose underlying person profiles are still active and eligible to be merged. Suggestions that have already been acted on are omitted. You can narrow the results using the `filter` query parameter, which accepts the Affinity Filtering Language. The filterable properties are: | **Property Name** | **Type** | **Allowed Operators** | **Examples** | |---|---|---|---| | `matchCriteria` | `enum` | `=` | `matchCriteria=name`, `matchCriteria=intelligent` | To act on a suggestion, call `POST /v2/person-merges` with the `id` of the `primaryProfile` and the `id` of the entry in `duplicateProfiles`. Once the merge is applied, the suggestion stops being returned by this endpoint immediately. Marking the pair as not duplicates has the same permanent effect. There is currently no way to retrieve a suggestion after either action. Skipping a suggestion is not permanent and works differently. It hides a `name` match suggestion from the user who skipped it for two weeks, after which the suggestion is returned again. It does not change what other users see, and it does not apply to the other match criteria. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions), which is granted to organization admins. # Get All Person Merge Tasks Source: https://developer.affinity.co/api-reference/2026-09-17/person-merges/get-all-person-merge-tasks /schema/temp/publish.yml get /v2/tasks/person-merges Retrieve paginated person merge tasks for the organization. Returns all merge tasks initiated by users in your organization, including their current status, the persons involved, and task details. You can filter tasks 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** | |---|---|---|---| | `status` | `enum` | `=` | `status=in-progress`, `status=success`, `status=failed` | Tasks are returned in reverse chronological order (most recent first). Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get All Person Merges Source: https://developer.affinity.co/api-reference/2026-09-17/person-merges/get-all-person-merges /schema/temp/publish.yml get /v2/person-merges Retrieve paginated person merges for the organization. Returns all person merges initiated by users in your organization, including their current status, the persons involved, and merge details. You can filter person merges 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** | |---|---|---|---| | `status` | `enum` | `=` | `status=in-progress`, `status=success`, `status=failed` | | `taskId` | `text` | `=` | `taskId=789e0123-e45b-67c8-d901-234567890123` | Person merges are returned in reverse chronological order (most recent first). Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get Person Merge Source: https://developer.affinity.co/api-reference/2026-09-17/person-merges/get-person-merge /schema/temp/publish.yml get /v2/person-merges/{mergeId} Retrieve the status and details of a specific person merge. Returns information about the person merge including its current status, the persons involved, timestamps, and any error information if the merge failed. The `mergeId` can be obtained from the response of the [Get All Person Merges](/api-reference/person-merges/get-all-person-merges) endpoint, or by filtering person merges by task ID using `/v2/person-merges?filter=taskId={taskId}` after initiating a merge. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Get Person Merge Task Source: https://developer.affinity.co/api-reference/2026-09-17/person-merges/get-person-merge-task /schema/temp/publish.yml get /v2/tasks/person-merges/{taskId} Retrieve the status and details of a specific task for person merges. Returns information about the person merges for a specific task including its overall status, number of merges in-progress, completed, and failed. Detailed information about individual merges for this task can be found by querying: `/v2/person-merges?filter=taskId={taskId}` See [Person Merges](/api-reference/person-merges/get-all-person-merges) for more details. Task statuses: - `in-progress`: The merge task is currently being processed. - `success`: The merge task completed successfully. - `failed`: The merge task failed. Requires the "Manage duplicates" [permission](/pages/external-api-v2/permissions) and organization admin role. # Initiate Person Merge Source: https://developer.affinity.co/api-reference/2026-09-17/person-merges/initiate-person-merge /schema/temp/publish.yml post /v2/person-merges 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. # Create a Person Source: https://developer.affinity.co/api-reference/2026-09-17/persons/create-a-person /schema/temp/publish.yml post /v2/persons This endpoint is currently in BETA. Creates a new Person. Setting `fields` values requires the "Edit Global Field Values" permission and returns a 403 error if the caller lacks it. # Create a Person Field Source: https://developer.affinity.co/api-reference/2026-09-17/persons/create-a-person-field /schema/temp/publish.yml post /v2/persons/fields | ⚠️ This endpoint is currently in BETA | |--| Creates a Person Field. A Person Field is available on every person in the organization. Values for the new Field can be set on each person via `POST /v2/persons/{personId}/fields/{fieldId}`. Requires the Manage global fields permission. Fields of value type `dropdown`, `dropdown-multi`, and `ranked-dropdown` are created without any dropdown options. # Delete a Person Source: https://developer.affinity.co/api-reference/2026-09-17/persons/delete-a-person /schema/temp/publish.yml delete /v2/persons/{personId} This endpoint is currently in BETA. Deletes a Person. Returns a 403 error if the Person is internal or inferred internal, since those Persons cannot be deleted. # Delete a Person Field Source: https://developer.affinity.co/api-reference/2026-09-17/persons/delete-a-person-field /schema/temp/publish.yml delete /v2/persons/fields/{fieldId} | ⚠️ This endpoint is currently in BETA | |--| Deletes a Person Field. **Warning:** This permanently removes the field and clears every field value set on it across all persons. The cleared values cannot be recovered. Requires the Manage global fields permission. Accepts the Field ID of a custom field (`field-`), of an enriched field (for example, `affinity-data-current-job-title`), or of a native field (for example, `source-of-introduction`). An enriched or native field by its `field-` ID returns 404. Native and enriched fields cannot be deleted and return 400. Fields that are computed by Affinity, such as `first-email`, return 404. # Get a Person's List Entries Source: https://developer.affinity.co/api-reference/2026-09-17/persons/get-a-persons-list-entries /schema/temp/publish.yml get /v2/persons/{personId}/list-entries Paginate through the List Entries (AKA rows) for the given Person across all Lists. Each List Entry includes field data for the Person, including list-specific field data. Each List Entry also includes metadata about its creation, i.e., when it was added to the List and by whom. # Get a Person's Lists Source: https://developer.affinity.co/api-reference/2026-09-17/persons/get-a-persons-lists /schema/temp/publish.yml get /v2/persons/{personId}/lists Paginate through all Lists where the given Person appears as an entry and that you have access to view. Returns basic List information for each List that contains this Person. # Get a single field on a Person Source: https://developer.affinity.co/api-reference/2026-09-17/persons/get-a-single-field-on-a-person /schema/temp/publish.yml get /v2/persons/{personId}/fields/{fieldId} | ⚠️ This endpoint is currently in BETA | |--| Retrieve a single field on a person. Returns basic information and the field value. # Get a single Person Source: https://developer.affinity.co/api-reference/2026-09-17/persons/get-a-single-person /schema/temp/publish.yml get /v2/persons/{personId} Returns basic information and non-list-specific field data on the requested Person. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/persons/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, Persons will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. # Get all Persons Source: https://developer.affinity.co/api-reference/2026-09-17/persons/get-all-persons /schema/temp/publish.yml get /v2/persons Paginate through Persons in Affinity. Returns basic information and non-list-specific field data on each Person. To retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter to specify the Fields for which you want data returned. These Field IDs and Types can be found using the GET `/v2/persons/fields` endpoint. When no `fieldIds` or `fieldTypes` are provided, Persons will be returned without any field data attached. To supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this: `?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`. Requires the "Export All People directory" [permission](/pages/external-api-v2/permissions). # Get dropdown options for a Person Field Source: https://developer.affinity.co/api-reference/2026-09-17/persons/get-dropdown-options-for-a-person-field /schema/temp/publish.yml get /v2/persons/fields/{fieldId}/dropdown-options Returns the dropdown options for a specific dropdown or ranked-dropdown field on a Person. Use the returned dropdown option IDs when writing dropdown field values via the field update endpoints. # Get field values on a single Person Source: https://developer.affinity.co/api-reference/2026-09-17/persons/get-field-values-on-a-single-person /schema/temp/publish.yml get /v2/persons/{personId}/fields | ⚠️ This endpoint is currently in BETA | |--| Paginate through field values on a single person. Enriched, global, and relationship-intelligence fields will be included by default. The `ids` and `types` parameters can be used to filter the collection. These parameters are mutually exclusive. List fields are not returned by this endpoint. To retrieve or update list field values, use the [list entry fields](/api-reference/lists/get-field-values-on-a-single-list-entry) endpoints. # Get metadata on a Person Field Source: https://developer.affinity.co/api-reference/2026-09-17/persons/get-metadata-on-a-person-field /schema/temp/publish.yml get /v2/persons/fields/{fieldId} | ⚠️ This endpoint is currently in BETA | |--| Returns metadata on a single non-list-specific Person Field. Accepts any Field ID from GET `/v2/persons/fields`, including enriched and native fields. List-specific fields and fields of other entity types return 404. # Get metadata on Person Fields Source: https://developer.affinity.co/api-reference/2026-09-17/persons/get-metadata-on-person-fields /schema/temp/publish.yml get /v2/persons/fields Returns metadata on non-list-specific Person Fields. Use the returned Field IDs to request field data from the GET `/v2/persons` and GET `/v2/persons/{id}` endpoints. You can filter Fields 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** | |---|---|---|---| | `name` | `text` | `=`, `=~` | `name="Location"`, `name=~loc` | Use the `includes` query parameter to add optional metadata to each Field in the response. Pass `includes` more than once to request multiple values. | **Value** | **Adds to each Field** | |---|---| | `filterability` | How the field can be used in filter expressions on GET `/v2/persons` and POST `/v2/persons/search` | | `sortability` | How the field can be used in sort expressions on those endpoints | Example: `GET /v2/persons/fields?includes=filterability&includes=sortability` # Get Notes for a Person Source: https://developer.affinity.co/api-reference/2026-09-17/persons/get-notes-for-a-person /schema/temp/publish.yml get /v2/persons/{personId}/notes Returns notes for a given person id which includes directly attached notes, notes on meetings this person attended, and notes where this person is mentioned. You can filter notes 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 Relationships for a Person Source: https://developer.affinity.co/api-reference/2026-09-17/persons/get-relationships-for-a-person /schema/temp/publish.yml get /v2/persons/{personId}/relationships 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. ## Interaction score The `interactionScore` is a value between `0.0` and `1.0` that reflects how frequently the two persons interact across email, calendar events, and chat messages. The more interactions, the higher the score. Recent interactions are weighted slightly higher than older ones. As rough guidance, scores at or above `0.7` typically indicate two persons that communicate regularly, scores between `0.4` and `0.7` indicate occasional communication, and scores below `0.4` indicate only sporadic communication. ## LinkedIn connections The collection also includes relationships based on a LinkedIn connection between the given person and their internal team member counterpart. Whenever a LinkedIn connection exists between the two persons in a relationship, `linkedIn` is populated with the date the connection was made.`linkedIn` is `null` when no LinkedIn connection exists between the two persons. Note that LinkedIn-based relationships which do not have any interaction data will have an `interactionScore` of `0`. ## Filters You can filter relationships using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties. | **Property Name** | **Type** | **Description** | **Allowed Operators** | **Examples** | |---|---|---|---|---| | `interactionScore` | `double` | Strength of the relationship, between `0.0` and `1.0`. Higher means stronger. | `>`, `<`, `>=`, `<=` | `interactionScore>=0.5` | ## Sorting You can sort relationships using the `orderBy` query parameter. `interactionScore` is the only sortable property. # Get values for a single field on a Person Source: https://developer.affinity.co/api-reference/2026-09-17/persons/get-values-for-a-single-field-on-a-person /schema/temp/publish.yml get /v2/persons/{personId}/fields/{fieldId}/values | ⚠️ This endpoint is currently in BETA | |--| Paginate through all values for a field on a person. # Perform batch operations on a person's fields Source: https://developer.affinity.co/api-reference/2026-09-17/persons/perform-batch-operations-on-a-persons-fields /schema/temp/publish.yml patch /v2/persons/{personId}/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. # Search Persons Source: https://developer.affinity.co/api-reference/2026-09-17/persons/search-persons /schema/temp/publish.yml post /v2/persons/search | ⚠️ This endpoint is currently in BETA | |--| 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). ### Field IDs Field IDs used in `filters`, `sorts`, and `search.fieldIds` follow the formats described in [Working with Field Data](/pages/data-model/working-with-field-data). Use `GET /v2/persons/fields` to discover the available fields and their `valueType`. ### `attributeId` Some fields require an `attributeId` to specify which aspect to filter or sort on. The following relationship intelligence fields all use `attributeId: "date-of-activity"`: `last-email`, `first-email`, `last-contact`, `last-event`, `first-event`, `next-event`. Use `GET /v2/persons/fields` to confirm which fields require an `attributeId`. ### Search The `search.term` is always matched against the person's first name, last name, and primary email address. Providing `search.fieldIds` extends the search to those additional fields; it does not restrict matching to only those fields. Fields with a `valueType` of `datetime` are not searchable and are silently ignored if included in `search.fieldIds`. ### Limits - **Items per filter group** (filters or nested groups): 50 - **Values per filter** (e.g. options in `is-any-of`): 100 - **Sort criteria**: 5 - **Search term minimum length**: 3 characters - **Results per page**: 100 ### Pagination Uses cursor-based pagination. # Update a Person Source: https://developer.affinity.co/api-reference/2026-09-17/persons/update-a-person /schema/temp/publish.yml post /v2/persons/{personId} | ⚠️ This endpoint is currently in BETA | |--| Updates a Person. Only properties included in the request body are changed; any property omitted from the request body is left alone. Likewise, only field-value entries listed in `fields` are updated. Any field not included in `fields` keeps its current value. # Update a Person Field Source: https://developer.affinity.co/api-reference/2026-09-17/persons/update-a-person-field /schema/temp/publish.yml post /v2/persons/fields/{fieldId} | ⚠️ This endpoint is currently in BETA | |--| Updates a Person Field. Only the provided properties are updated. Requires the Manage global fields permission. Accepts the Field ID of a custom field (`field-`), of an enriched field (for example, `affinity-data-current-job-title`), or of a native field (for example, `source-of-introduction`). An enriched or native field by its `field-` ID returns 404. On native and enriched fields, only `isRequired` can be updated. Fields that are computed by Affinity, such as `first-email`, return 404. # Update a single field value on a Person Source: https://developer.affinity.co/api-reference/2026-09-17/persons/update-a-single-field-value-on-a-person /schema/temp/publish.yml post /v2/persons/{personId}/fields/{fieldId} Update a single field value on a person. To clear the value, send `null` as `data`; a required field cannot be cleared. For a multi-value field, `data` replaces all current values: to remove one value, send the values to keep. # Get rate limit usage Source: https://developer.affinity.co/api-reference/2026-09-17/rate-limit/get-rate-limit-usage /schema/temp/publish.yml get /v2/rate-limit | ⚠️ This endpoint is currently in BETA | |--| Returns the current rate limit usage for the authenticated caller. `orgPerMonth` is included only for callers that have a monthly quota; it is absent for callers that don't have one. # Create a Reminder Source: https://developer.affinity.co/api-reference/2026-09-17/reminders/create-a-reminder /schema/temp/publish.yml post /v2/reminders Creates a new Reminder. Exactly one of `company`, `person`, or `opportunity` must be provided. The `creator` of the new reminder is the user associated with the API key. # Delete a Reminder Source: https://developer.affinity.co/api-reference/2026-09-17/reminders/delete-a-reminder /schema/temp/publish.yml delete /v2/reminders/{reminderId} | ⚠️ This endpoint is currently in BETA | |--| Deletes a Reminder. Only the reminder's creator or owner may delete it. # Get a single Reminder Source: https://developer.affinity.co/api-reference/2026-09-17/reminders/get-a-single-reminder /schema/temp/publish.yml get /v2/reminders/{reminderId} | ⚠️ This endpoint is currently in BETA | |--| Returns a single Reminder. Responds with `404` when the reminder does not exist or is not visible to the caller. # Get all Reminders Source: https://developer.affinity.co/api-reference/2026-09-17/reminders/get-all-reminders /schema/temp/publish.yml get /v2/reminders Returns a page of Reminders visible to the caller. You can filter reminders 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** | |---|---|---|---| | `id` | `int64` | `=` | `id=1\|id=2\|id=3` | | `type` | `enum` | `=` | `type=one-time`, `type=recurring` | | `status` | `enum` | `=` | `status=active`, `status=overdue`, `status=completed` | | `resetTrigger` | `enum` | `=` | `resetTrigger=interaction`, `resetTrigger=email`, `resetTrigger=event` | | `dueDate` | `datetime` | `>`, `<`, `>=`, `<=` | `dueDate>=2026-01-01T00:00:00Z` | | `completedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `completedAt=2026-01-01T00:00:00Z` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt>=2026-01-01T00:00:00Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2026-01-01T00:00:00Z` | | `owner.id` | `int64` | `=`, `!=` | `owner.id=1\|owner.id=2`, `owner.id!=3` | | `creator.id` | `int64` | `=` | `creator.id=1` | | `completer.id` | `int64` | `=` | `completer.id=1` | | `company.id` | `int64` | `=` | `company.id=42` | | `person.id` | `int64` | `=` | `person.id=42` | | `opportunity.id` | `int64` | `=` | `opportunity.id=42` | Results are ordered by `dueDate` ascending (soonest-due first). # Update a Reminder Source: https://developer.affinity.co/api-reference/2026-09-17/reminders/update-a-reminder /schema/temp/publish.yml post /v2/reminders/{reminderId} | ⚠️ This endpoint is currently in BETA | |--| Updates a Reminder. Only provided fields are changed; omitted fields keep their current value. Setting `completedAt` marks the reminder complete (for `recurring` reminders, this advances `dueDate` by `recurrence.periodDays` and `completedAt` remains `null` on the resource). Setting `completedAt` to `null` marks the reminder incomplete and is rejected for `recurring` reminders. Only the reminder's creator or owner may update it (including completing or uncompleting it). # Semantic Search Source: https://developer.affinity.co/api-reference/2026-09-17/semantic-search/semantic-search /schema/temp/publish.yml post /v2/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. Supported query dimensions include: - Industry or sector - Example: `climate tech companies in our pipeline` - Descriptive technology or business concepts - Example: `biotech companies working on extracellular vesicles` - Funding information: investment stage, funding date, amount raised, and year founded - Example: `Series A companies that raised more than $10M` - Employee metrics: headcount, hiring rate, and departure rate - Example: `companies with more than 100 employees` - Interaction history - Example: `companies our firm emailed recently` - Relationship strength - Example: `companies where we have strong connections` - Relative time references - Example: `AI companies founded in the past 3 years` - Headquarters location: city, state, country, or region - Example: `fintech startups in San Francisco` - Investor name - Example: `companies backed by Sequoia Capital` These dimensions can be combined in a single prompt, for example `climate tech companies in San Francisco that raised a Series A in the past year`. Results can be sorted by including the desired sort in the prompt itself, for example `Series B companies with the most funding`. Only one sortable attribute is supported per request. Use the `listIds` field to scope results to companies on specific lists, and combine it with `prompt` to search semantically within those lists. Retrieve list IDs from `GET /v2/lists`. The phrases `I`, `we`, and `our firm` always refer to firm-wide data: interaction history and relationship strength cannot be filtered to a specific team member. The phrases `in our pipeline` and `in our network` match companies your firm has interacted with or added to Affinity in general. They do not search for membership in a list literally named "Pipeline" or similar. To search a specific named list, use `listIds`. The following are not supported: - Third-party enrichment data such as Crunchbase, PitchBook, or Dealroom. - Company valuation and revenue metrics. - Lookup by similarity to a named company, for example `companies like OpenAI`. - Notes, email body content, or file attachments. - Custom fields. - Computed or formula-based sorts, such as a ratio between two fields. # Generate suggested field updates Source: https://developer.affinity.co/api-reference/2026-09-17/suggested-field-updates/generate-suggested-field-updates /schema/temp/publish.yml post /v2/suggested-field-updates | ⚠️ This endpoint is currently in BETA | |--| The endpoint returns 404 when AI agents access is not enabled for the organization. Generate suggested field updates from a note or a meeting. Generation runs asynchronously: poll the returned `taskUrl` until the task finishes, then retrieve the set. The set can also be retrieved while generation runs, with `status` `pending`. Sets belong to the user who requested them. Sets generated automatically for a new note belong to the note's creator. You have at most one `pending` set per subject. While it is generating, repeated requests return its task. Otherwise each request generates a new set, and your `open` set for the subject becomes `done`. Its undecided suggestions can no longer be decided. Other users' sets for the subject are not affected. Returns `404` when the subject does not exist or is not accessible to you. # Get a suggested field update set Source: https://developer.affinity.co/api-reference/2026-09-17/suggested-field-updates/get-a-suggested-field-update-set /schema/temp/publish.yml get /v2/suggested-field-updates/{suggestedFieldUpdateId} | ⚠️ This endpoint is currently in BETA | |--| The endpoint returns 404 when AI agents access is not enabled for the organization. Retrieve a set of suggested field updates with all of its suggestions. `suggestions` is empty while `status` is `pending`. Returns `404` when the set is not yours or its subject is not accessible to you. # Get a suggested field update task Source: https://developer.affinity.co/api-reference/2026-09-17/suggested-field-updates/get-a-suggested-field-update-task /schema/temp/publish.yml get /v2/tasks/suggested-field-updates/create/{taskId} | ⚠️ This endpoint is currently in BETA | |--| The endpoint returns 404 when AI agents access is not enabled for the organization. Retrieve a suggested field update generation task. On `success`, retrieve the set named by `suggestedFieldUpdate`. # Get all suggested field update sets Source: https://developer.affinity.co/api-reference/2026-09-17/suggested-field-updates/get-all-suggested-field-update-sets /schema/temp/publish.yml get /v2/suggested-field-updates | ⚠️ This endpoint is currently in BETA | |--| The endpoint returns 404 when AI agents access is not enabled for the organization. Paginate through your suggested field update sets, newest first. Items omit `suggestions`; retrieve a set to get them. Sets generated automatically for a new note belong to the note's creator. Sets whose subject is not accessible to you are not returned. Sets where the agent found nothing to suggest are not listed. Retrieving such a set by id reports it as `done`. You can filter sets using the `filter` query parameter. Combine conditions with `&` (AND). | **Property Name** | **Type** | **Allowed Operators** | **Examples** | |---|---|---|---| | `status` | `enum` | `=` | `status=open`, `status=pending` | | `subject.type` | `enum` | `=` | `subject.type=note`, `subject.type=meeting` | | `subject.id` | `int64` | `=` | `subject.id=6789` | | `createdAt` | `datetime` | `>=` | `createdAt>=2026-10-01T00:00:00Z` | `createdAt` supports a lower bound only. # Get all suggested field update tasks Source: https://developer.affinity.co/api-reference/2026-09-17/suggested-field-updates/get-all-suggested-field-update-tasks /schema/temp/publish.yml get /v2/tasks/suggested-field-updates/create | ⚠️ This endpoint is currently in BETA | |--| The endpoint returns 404 when AI agents access is not enabled for the organization. Paginate through your suggested field update generation tasks, newest first. You can filter tasks using the `filter` query parameter. | **Property Name** | **Type** | **Allowed Operators** | **Examples** | |---|---|---|---| | `status` | `enum` | `=` | `status=in-progress`, `status=success`, `status=failed` | # Perform batch operations on suggestions in a set Source: https://developer.affinity.co/api-reference/2026-09-17/suggested-field-updates/perform-batch-operations-on-suggestions-in-a-set /schema/temp/publish.yml patch /v2/suggested-field-updates/{suggestedFieldUpdateId}/suggestions | ⚠️ This endpoint is currently in BETA | |--| 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. # Get all Lists a Team has access to Source: https://developer.affinity.co/api-reference/2026-09-17/teams/get-all-lists-a-team-has-access-to /schema/temp/publish.yml get /v2/teams/{teamId}/accessible-lists | ⚠️ This endpoint is currently in BETA | |--| Paginate through all Lists this Team has been granted access to. This endpoint backs the `accessibleListsPreview` returned by `GET /v2/teams/{teamId}?includes=accessibleListsPreview`. # Get all members of a Team Source: https://developer.affinity.co/api-reference/2026-09-17/teams/get-all-members-of-a-team /schema/temp/publish.yml get /v2/teams/{teamId}/members | ⚠️ This endpoint is currently in BETA | |--| Paginate through all members of a specific Team. This endpoint backs the `membersPreview` returned by `GET /v2/teams/{teamId}?includes=membersPreview`. # Get metadata on a single Team Source: https://developer.affinity.co/api-reference/2026-09-17/teams/get-metadata-on-a-single-team /schema/temp/publish.yml get /v2/teams/{teamId} | ⚠️ This endpoint is currently in BETA | |--| Retrieve detailed information about a specific Team. Optional opt-in properties can be requested via the `includes` query parameter. # Get metadata on all Teams Source: https://developer.affinity.co/api-reference/2026-09-17/teams/get-metadata-on-all-teams /schema/temp/publish.yml get /v2/teams | ⚠️ This endpoint is currently in BETA | |--| Paginate through all Teams in your organization that you have access to view. Use the `includes` query parameter to add `membersPreview` and `accessibleListsPreview` to each team. Each preview carries a `totalCount` and a short `data` sample; the full collections are available at `GET /v2/teams/{teamId}/members` and `GET /v2/teams/{teamId}/accessible-lists`. The team's `privacyType` is gated and only returned when the caller has the "Manage Teams" [permission](/pages/external-api-v2/permissions), the organization has team-based privacy controls enabled, and cross-team visibility is enabled for the organization; it is omitted from every team in the response otherwise. You can filter Teams using the `filter` query parameter: | **Property Name** | **Description** | **Type** | **Allowed Operators** | **Examples** | |-----------------------|---------------------------------------|-----------|-----------------------------------|-----------------------------| | `id` | Filter Teams by id | `int64` | `=` | `id=1\|id=2` | | `name` | Filter Teams by name | `text` | `=`, `=^`, `=$`, `=~` | `name=^Invest` | # Delete a single Transcript Source: https://developer.affinity.co/api-reference/2026-09-17/transcripts/delete-a-single-transcript /schema/temp/publish.yml delete /v2/transcripts/{transcriptId} | ⚠️ This endpoint is currently in BETA | |--| Delete a transcript. The AI Notetaker summary note the transcript belongs to is kept. You can only delete transcripts of notes you created. # Get a single Transcript Source: https://developer.affinity.co/api-reference/2026-09-17/transcripts/get-a-single-transcript /schema/temp/publish.yml get /v2/transcripts/{transcriptId} Get a transcript with a given id with the first 100 fragments of the transcript. Use the /fragments endpoint to fetch all fragments of the transcript. # Get all Transcripts Source: https://developer.affinity.co/api-reference/2026-09-17/transcripts/get-all-transcripts /schema/temp/publish.yml get /v2/transcripts Paginate through all transcripts and return basic metadata only. Use the single transcript endpoint to fetch the entire transcript data. Will only return transcripts that the current authenticated user has permission to see. You can filter transcripts 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** | |---|---|---|---| | `id` | `int32` | `=` | `id=1` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-02-04T10:48:24Z` | # Get fragments of a transcript Source: https://developer.affinity.co/api-reference/2026-09-17/transcripts/get-fragments-of-a-transcript /schema/temp/publish.yml get /v2/transcripts/{transcriptId}/fragments Get fragments of a transcript given a transcript id. # Get a single User Source: https://developer.affinity.co/api-reference/2026-09-17/users/get-a-single-user /schema/temp/publish.yml get /v2/users/{userId} | ⚠️ This endpoint is currently in BETA | |--| Returns information about a single internal User, including name, primary email address, all email addresses, photo URL, account status, and account role. The `userId` path parameter is the same identifier as the User's corresponding Person ID — every internal User has a matching Person record, and they share the same numeric ID. You can use a Person ID returned from any Persons endpoint here, and vice versa. The `emailAddresses` and `role` properties are only returned to callers with the "Manage Users" [permission](/pages/external-api-v2/permissions). # Get all Users Source: https://developer.affinity.co/api-reference/2026-09-17/users/get-all-users /schema/temp/publish.yml get /v2/users | ⚠️ This endpoint is currently in BETA | |--| Paginate through internal Users in your organization. Returns information about each User, including name, primary email address, all email addresses, photo URL, account status, and account role. The `emailAddresses` and `role` properties are only returned to callers with the "Manage Users" [permission](/pages/external-api-v2/permissions). Use the optional `term` parameter to filter by first name, last name, or primary email address. You can also filter users 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** | |---|---|---|---| | `id` | `int32` | `=` | `id=1\|id=2\|id=3` | | `status` | `enum` | `=` | `status=active` | # Create a Webhook Source: https://developer.affinity.co/api-reference/2026-09-17/webhooks/create-a-webhook /schema/temp/publish.yml post /v2/webhooks | ⚠️ This endpoint is currently in BETA | |--| Creates a new Webhook. The `creator` of the new webhook is the user associated with the API key. The URL is validated with a test delivery before the webhook is created. The request is rejected with a `validation` error on the `url` property when the URL is invalid or unreachable, contains embedded credentials, or already belongs to another webhook in the organization. The request is rejected with a `bad-request` error, which has no associated property, when the organization has reached its webhook limit. # Delete a Webhook Source: https://developer.affinity.co/api-reference/2026-09-17/webhooks/delete-a-webhook /schema/temp/publish.yml delete /v2/webhooks/{webhookId} | ⚠️ This endpoint is currently in BETA | |--| Deletes a Webhook. Only the webhook's creator, or a user allowed to manage all webhooks, may delete it. # Get a single Webhook Source: https://developer.affinity.co/api-reference/2026-09-17/webhooks/get-a-single-webhook /schema/temp/publish.yml get /v2/webhooks/{webhookId} | ⚠️ This endpoint is currently in BETA | |--| Returns a single Webhook created by the caller. Users allowed to manage all webhooks may retrieve any Webhook in the organization. Responds with `404` when the webhook does not exist or is not accessible. # Get all Webhooks Source: https://developer.affinity.co/api-reference/2026-09-17/webhooks/get-all-webhooks /schema/temp/publish.yml get /v2/webhooks | ⚠️ This endpoint is currently in BETA | |--| Returns a page of the Webhooks created by the caller. Users allowed to manage all webhooks receive every Webhook in the organization. You can filter webhooks 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** | |---|---|---|---| | `id` | `int64` | `=` | `id=1\|id=2` | | `createdAt` | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt>=2026-01-01T00:00:00Z` | | `updatedAt` | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2026-01-01T00:00:00Z` | Results are ordered by `id` ascending. # Update a Webhook Source: https://developer.affinity.co/api-reference/2026-09-17/webhooks/update-a-webhook /schema/temp/publish.yml post /v2/webhooks/{webhookId} | ⚠️ This endpoint is currently in BETA | |--| Updates a Webhook. Only provided fields are changed; omitted fields keep their current value. Changing `url` on an active webhook, or setting `status` to `active` on a disabled webhook, triggers a test delivery that validates the URL before the update is applied. URLs containing embedded credentials are rejected. Only the webhook's creator, or a user allowed to manage all webhooks, may update it. # Previous Changes Source: https://developer.affinity.co/pages/changelog/previous-changes ## November 12th, 2026 * Added the following endpoint in Beta: | Method | URL | Summary | | - | - | - | | POST | `/v2/persons/{personId}` | Update a Person | * Removed "Export data from Lists" permission from the following endpoints: | Method | URL | Summary | | - | - | - | | POST | `/v2/opportunities/{opportunityId}` | Update an Opportunity | | DELETE | `/v2/opportunities/{opportunityId}` | Delete an Opportunity | ## November 10th, 2026 * Added the following endpoints in Beta: | Method | URL | Summary | | - | - | - | | GET | `/v2/lists/{listId}/fields/{fieldId}` | Get metadata on a List Field | | POST | `/v2/lists/{listId}/fields` | Create a List Field | | POST | `/v2/lists/{listId}/fields/{fieldId}` | Update a List Field | | DELETE | `/v2/lists/{listId}/fields/{fieldId}` | Delete a List Field | * `GET /v2/field-value-changes` now accepts the `entity.id` and `field.entityType` filters. ## November 9th, 2026 * The following endpoint is no longer in BETA: | Method | URL | Summary | | - | - | - | | GET | `/v2/intro-paths` | Get Introduction Paths | ## November 4th, 2026 * `GET /v2/files` and `GET /v2/files/{fileId}` now return the `person`, `company` and `opportunity` that the File is attached to. * `GET /v2/files` now accepts the `person.id`, `company.id` and `opportunity.id` filters. ## November 3rd, 2026 * Added the following endpoints in Beta: | Method | URL | Summary | | - | - | - | | POST | `/v2/companies/fields` | Create a Company Field | | GET | `/v2/companies/fields/{fieldId}` | Get metadata on a Company Field | | POST | `/v2/companies/fields/{fieldId}` | Update a Company Field | | DELETE | `/v2/companies/fields/{fieldId}` | Delete a Company Field | | POST | `/v2/persons/fields` | Create a Person Field | | GET | `/v2/persons/fields/{fieldId}` | Get metadata on a Person Field | | POST | `/v2/persons/fields/{fieldId}` | Update a Person Field | | DELETE | `/v2/persons/fields/{fieldId}` | Delete a Person Field | ## November 2nd, 2026 * Added the following endpoints in Beta: | Method | URL | Summary | | - | - | - | | GET | `/v2/suggested-field-updates` | Get all suggested field update sets | | POST | `/v2/suggested-field-updates` | Generate suggested field updates | | GET | `/v2/suggested-field-updates/{suggestedFieldUpdateId}` | Get a suggested field update set | | PATCH | `/v2/suggested-field-updates/{suggestedFieldUpdateId}/suggestions` | Perform batch operations on suggestions in a set | | GET | `/v2/tasks/suggested-field-updates/create` | Get all suggested field update tasks | | GET | `/v2/tasks/suggested-field-updates/create/{taskId}` | Get a suggested field update task | ## October 28th, 2026 * `GET /v2/lists/{listId}/saved-views/{viewId}/list-entries` now returns List Entries in the sort order of the Saved View when the Saved View uses the new Lists experience in the web app. For a Saved View with its own new Lists configuration, the endpoint also uses the filters and columns of that configuration. ## October 26th, 2026 * Added the following endpoint in Beta: | Method | URL | Summary | | - | - | - | | GET | `/v2/intro-paths` | Get Introduction Paths | ## October 7th, 2026 * Added the following endpoints in Beta: | Method | URL | Summary | | - | - | - | | GET | `/v2/teams` | Get metadata on all Teams | | GET | `/v2/teams/{teamId}` | Get metadata on a single Team | | GET | `/v2/teams/{teamId}/members` | Get all members of a Team | | GET | `/v2/teams/{teamId}/accessible-lists` | Get all Lists a Team has access to | ## October 5th, 2026 * Added the following endpoints in Beta: | Method | URL | Summary | | - | - | - | | GET | `/v2/files` | Get all Files | | GET | `/v2/files/{fileId}` | Get a single File | ## October 2nd, 2026 * The following endpoints now return `400` for a malformed or non-dropdown `fieldId`. They return `404` only when the field does not exist: | Method | URL | Summary | | - | - | - | | GET | `/v2/companies/fields/{fieldId}/dropdown-options` | Get dropdown options for a Company Field | | GET | `/v2/persons/fields/{fieldId}/dropdown-options` | Get dropdown options for a Person Field | ## September 29th, 2026 * Added the following endpoint in Beta: | Method | URL | Summary | | - | - | - | | DELETE | `/v2/transcripts/{transcriptId}` | Delete a single Transcript | ## September 28th, 2026 * Added the following endpoints in Beta: | Method | URL | Summary | | - | - | - | | POST | `/v2/opportunities/{opportunityId}` | Update an Opportunity | | DELETE | `/v2/opportunities/{opportunityId}` | Delete an Opportunity | ## September 23rd, 2026 * Added the `internalPerson` property to interaction field values. It is the team member Affinity attributes the interaction to, matching the person shown in the CRM, and is `null` when no team member can be attributed: | Method | URL | Summary | | - | - | - | | GET | `/v2/companies/{companyId}/fields` | Get field values on a single Company | | GET | `/v2/companies/{companyId}/fields/{fieldId}` | Get a single field value on a Company | | GET | `/v2/persons/{personId}/fields` | Get field values on a single Person | | GET | `/v2/persons/{personId}/fields/{fieldId}` | Get a single field on a Person | | GET | `/v2/lists/{listId}/list-entries/{listEntryId}/fields` | Get field values on a single List Entry | | GET | `/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}` | Get a single field value on a List Entry | ## September 22nd, 2026 * Added the following endpoint in Beta: | Method | URL | Summary | | - | - | - | | POST | `/v2/lists/{listId}/list-entries` | Add a List Entry to a List | ## September 18th, 2026 * Added the following endpoint in Beta: | Method | URL | Summary | | - | - | - | | POST | `/v2/reminders/{reminderId}` | Update a Reminder | ## September 17th, 2026 — Version 2026-09-17 A new API version `2026-09-17` has been released. All future additions to the API will be made against this version. The `2026-07-15` version is now locked and will not receive further changes. To use this version, set the `X-Affinity-Api-Version: 2026-09-17` header on your requests, or update the Default API Version on your API key in **Settings > Manage Apps**. You can also update existing keys to use the new version when you're ready to switch. [Learn more about Versioning](/pages/external-api-v2/versioning) ### Breaking changes **`is-between-relative` date filter now uses a range value** The `is-between-relative` operator's `value` is now a range object (`{ amount: [start, end], unit }` with exactly two amounts) instead of the shape used by other relative-date operators. For the `is-within-the-last`, `is-not-within-the-last`, `is-within-the-next`, `is-not-within-the-next`, and `is-between-relative` operators, relative date filter `amount` values must now be at least `1`; a value of `0` is no longer accepted. Other relative-date operators (for example `is-exactly-relative` on Time in Current Status) are unaffected and continue to accept `0`. **`is-between` and `is-between-relative` filters reject inverted bounds** Search filters using the `is-between` operator now return a validation error when the first value is greater than the second; for most date fields, equal bounds are rejected too (the `notes.created-date` field is an exception and continues to accept equal bounds). The `is-between-relative` operator returns a validation error when the first amount is greater than the second amount. | Method | URL | Summary | | - | - | - | | POST | `/v2/companies/search` | Search Companies | | POST | `/v2/persons/search` | Search Persons | | POST | `/v2/lists/{listId}/list-entries/search` | Search List Entries | **New field value types: `note`, `reminder`, `list-multi`** Field metadata responses (`FieldMetadata.valueType`) and field-value responses (`value.type`) across Companies, Persons, and Lists may now include `note`, `reminder`, or `list-multi`. **`transcriptId` may be `null` on AI Notetaker notes** `transcriptId` on AI Notetaker notes can now be `null` when the org does not retain transcripts, instead of always being an integer. | Method | URL | | - | - | | GET | `/v2/notes` | | GET | `/v2/notes/{noteId}` | | GET | `/v2/notes/{noteId}/replies` | | GET | `/v2/companies/{companyId}/notes` | | GET | `/v2/persons/{personId}/notes` | | GET | `/v2/opportunities/{opportunityId}/notes` | ### New features **New fields for Companies, Persons, and List Entries** New fields are now returned in the API for Companies, Persons, and List Entries: * Notes and Reminders, filterable and sortable * Lists, filterable **New field-value endpoints for Companies, Persons, and List Entries** Added the following endpoints in Beta, for paginating through all values of a multi-value field: | Method | URL | Summary | | - | - | - | | GET | `/v2/companies/{companyId}/fields/{fieldId}/values` | Get values for a single field on a Company | | GET | `/v2/persons/{personId}/fields/{fieldId}/values` | Get values for a single field on a Person | | GET | `/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}/values` | Get values for a single field on a List Entry | ## September 15th, 2026 * Added the following endpoints in Beta: | Method | URL | Summary | | - | - | - | | GET | `/v2/duplicates/company-suggestions` | Get All Company Duplicate Suggestions | | GET | `/v2/duplicates/person-suggestions` | Get All Person Duplicate Suggestions | | POST | `/v2/persons` | Create a Person | | DELETE | `/v2/persons/{personId}` | Delete a Person | ## September 14th, 2026 * Added the following endpoint in Beta: | Method | URL | Summary | | - | - | - | | GET | `/v2/rate-limit` | Get rate limit usage | ## September 11th, 2026 * Time in Current Status and Date Added are now included in `GET /v2/lists/{listId}/fields` with filterability/sortability metadata for List Entries. ## September 8th, 2026 * Added the following endpoints in Beta: | Method | URL | Summary | | - | - | - | | GET | `/v2/reminders/{reminderId}` | Get a single Reminder | | DELETE | `/v2/reminders/{reminderId}` | Delete a Reminder | | GET | `/v2/webhooks` | Get all Webhooks | | POST | `/v2/webhooks` | Create a Webhook | | GET | `/v2/webhooks/{webhookId}` | Get a single Webhook | | POST | `/v2/webhooks/{webhookId}` | Update a Webhook | | DELETE | `/v2/webhooks/{webhookId}` | Delete a Webhook | ## September 1st, 2026 * Added the following endpoint in Beta: | Method | URL | Summary | | - | - | - | | GET | `/v2/meetings/{meetingId}` | Get a single Meeting | ## August 5th, 2026 * Added the following endpoints in Beta: | Method | URL | Summary | | - | - | - | | GET | `/v2/inferred-connections/coworkers` | Get Coworker Inferred Connections | | GET | `/v2/inferred-connections/investor-executive-connections` | Get Investor-Executive Inferred Connections | ## July 15th, 2026 — Version 2026-07-15 A new API version `2026-07-15` has been released. All future additions to the API will be made against this version. The `2024-01-01` version is now locked and will not receive further changes. To use this version, set the `X-Affinity-Api-Version: 2026-07-15` header on your requests, or update the Default API Version on your API key in **Settings > Manage Apps**. You can also update existing keys to use the new version when you're ready to switch. [Learn more about Versioning](/pages/external-api-v2/versioning) ### Breaking changes **Restricted opportunity field access in list-entry fields** Field values for opportunities that the caller does not have permission to manage are now redacted in list-entry field responses: `type` is returned as `"hidden"` and `value.data` as `null`. Write requests (PATCH/POST) targeting fields on a restricted opportunity return `403 Forbidden`. | Method | URL | Summary | | - | - | - | | GET | `/v2/lists/{listId}/list-entries/{listEntryId}/fields` | Get field values on a single List Entry | | GET | `/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}` | Get a single field value | | PATCH | `/v2/lists/{listId}/list-entries/{listEntryId}/fields` | Perform batch operations on a list entry's fields | | POST | `/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}` | Update a single field value on a List Entry | **`quarter` added to relative date unit enum** `quarter` is now a valid value for the `unit` property in relative date filter requests, and is included in the `relativeDateUnits` field of filterability responses. ### New features **`win_rate` on status dropdown option updates** The dropdown option update endpoint now accepts a `win_rate` property when the option's status category is `Open`. Providing `win_rate` when the effective status is not `Open` returns a validation error. | Method | URL | Summary | | - | - | - | | POST | `/v2/lists/{listId}/fields/{fieldId}/dropdown-options/{dropdownOptionId}` | Update a dropdown option for a List Field | ## June 19th, 2026 * Added the following endpoints in Beta: | Method | URL | Summary | | - | - | - | | POST | `/v2/companies/search` | Search Companies | | POST | `/v2/persons/search` | Search Persons | | POST | `/v2/lists/{listId}/list-entries/search` | Search List Entries | These endpoints support filtering, sorting, and keyword search across Companies, Persons, and List Entries. Use `GET /v2/companies/fields`, `GET /v2/persons/fields`, or `GET /v2/lists/{listId}/fields?includes=filterability` (for list searches) to discover the fields available for filtering and sorting. * Added the optional `createdAt` property to the `POST /v2/notes` request body. A note can now be backfilled with a past creation time: | Method | URL | Summary | | - | - | - | | POST | `/v2/notes` | Create a Note | ## June 18th, 2026 * Added the `createdAt` property (the date and time the list was created) to the responses of the following endpoints: | Method | URL | Summary | | - | - | - | | GET | `/v2/lists` | Get all Lists | | GET | `/v2/lists/{listId}` | Get a single List | | POST | `/v2/lists` | Create a List | * Added the `createdAt` property to each field in the responses of the following field metadata endpoints. It is the date and time the field was created, and is `null` for system-defined fields (identity, association, and relationship intelligence fields), which are not created by a user: | Method | URL | Summary | | - | - | - | | GET | `/v2/persons/fields` | Get metadata on Person Fields | | GET | `/v2/companies/fields` | Get metadata on Company Fields | | GET | `/v2/lists/{listId}/fields` | Get metadata on a single List's Fields | * Added the optional `creator` property to the `POST /v2/notes` request body. A note can now be attributed to a specific internal person instead of the calling user: | Method | URL | Summary | | - | - | - | | POST | `/v2/notes` | Create a Note | ## June 3rd, 2026 * Added the following endpoints in Beta: | Method | URL | Summary | | - | - | - | | GET | `/v2/lists/{listId}/list-entries/{listEntryId}/field-value-changes` | Get all field value changes for a list entry | | POST | `/v2/notes` | Create a Note | | POST | `/v2/notes/{noteId}` | Update a single Note | | DELETE | `/v2/notes/{noteId}` | Delete a single Note | | POST | `/v2/notes/search` | Search Notes by keyword | | POST | `/v2/files/search` | Search Files by keyword | ## May 26th, 2026 * Added the following endpoints in Beta: | Method | URL | Summary | | - | - | - | | GET | `/v2/companies/fields/{fieldId}/dropdown-options` | Get dropdown options for a Company Field | | POST | `/v2/lists/{listId}/fields/{fieldId}/dropdown-options` | Create a dropdown option for a List Field | | GET | `/v2/lists/{listId}/fields/{fieldId}/dropdown-options/{dropdownOptionId}` | Get a dropdown option for a List Field | | POST | `/v2/lists/{listId}/fields/{fieldId}/dropdown-options/{dropdownOptionId}` | Update a dropdown option for a List Field | | DELETE | `/v2/lists/{listId}/fields/{fieldId}/dropdown-options/{dropdownOptionId}` | Delete a dropdown option for a List Field | | POST | `/v2/lists` | Create a List | | GET | `/v2/persons/fields/{fieldId}/dropdown-options` | Get dropdown options for a Person Field | | GET | `/v2/reminders` | Get all Reminders | | POST | `/v2/reminders` | Create a Reminder | | GET | `/v2/users` | Get a collection of users | | GET | `/v2/users/{userId}` | Get a single user | | GET | `/v2/field-value-changes` | Get all field value changes | ## May 22nd, 2026 * Added the `filter` query parameter to the following endpoints. The `name` property supports `=` (exact match) and `=~` (case-insensitive substring): | Method | URL | Summary | | - | - | - | | GET | `/v2/companies/fields` | Get metadata on Company Fields | | GET | `/v2/persons/fields` | Get metadata on Person Fields | | GET | `/v2/lists/{listId}/fields` | Get metadata on a single List's Fields | ## April 28th, 2026 * Added the following endpoints in BETA: | Method | URL | Summary | | - | - | - | | GET | `/v2/companies/{companyId}/fields` | Get field values on a single Company | | PATCH | `/v2/companies/{companyId}/fields` | Perform batch operations on a company's fields | | GET | `/v2/companies/{companyId}/fields/{fieldId}` | Get a single field value on a Company | | POST | `/v2/companies/{companyId}/fields/{fieldId}` | Update a single field value on a Company | | GET | `/v2/persons/{personId}/fields` | Get field values on a single Person | | PATCH | `/v2/persons/{personId}/fields` | Perform batch operations on a person's fields | | GET | `/v2/persons/{personId}/fields/{fieldId}` | Get a single field on a Person | | POST | `/v2/persons/{personId}/fields/{fieldId}` | Update a single field value on a Person | ## March 2nd, 2026 * Removed "Export All People directory" permission from the following endpoint: | Method | URL | Summary | | - | - | - | | GET | `/v2/persons/{personId}` | Get a single Person | * Removed "Export All Organizations directory" permission from the following endpoint: | Method | URL | Summary | | - | - | - | | GET | `/v2/companies/{companyId}` | Get a single Company | * Removed "Export data from Lists" permission from the following endpoints: | Method | URL | Summary | | - | - | - | | GET | `/v2/companies/{companyId}/list-entries` | Get a Company's List Entries | | GET | `/v2/persons/{personId}/list-entries` | Get a Person's List Entries | | GET | `/v2/lists/{listId}/list-entries/{listEntryId}` | Get a single List Entry on a List | | GET | `/v2/lists/{listId}/list-entries/{listEntryId}/fields` | Get field values on a single List Entry | | GET | `/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}` | Get a single field value | | GET | `/v2/opportunities/{opportunityId}` | Get a single Opportunity | ## February 26th, 2026 * Added the following endpoint: | Method | URL | Summary | | - | - | - | | POST | `/v2/semantic-search` | Perform an AI-powered semantic search | ## February 5th, 2026 * Added the following endpoint: | Method | URL | Summary | | - | - | - | | POST | `/v2/feedback` | Send feedback to Affinity | ## January 30th, 2026 * The following endpoints are no longer in BETA: | Method | URL | Summary | | - | - | - | | GET | `/v2/notes` | Get all Notes | | GET | `/v2/notes/{noteId}` | Get a Note with a given id | | GET | `/v2/notes/{noteId}/attached-companies` | Get directly attached companies for a Note | | GET | `/v2/notes/{noteId}/attached-opportunities` | Get directly attached opportunities for a Note | | GET | `/v2/notes/{noteId}/attached-persons` | Get directly attached persons for a Note | | GET | `/v2/notes/{noteId}/replies` | Get reply notes for a given Note | ## January 26th, 2026 * Added the following endpoints in BETA: | Method | URL | Summary | | - | - | - | | GET | `/v2/transcripts` | Get All Transcripts | | GET | `/v2/transcripts/{transcriptId}` | Get Transcript | | GET | `/v2/transcripts/{transcriptId}/fragments` | Get Fragments on a single Transcript | ## January 14th, 2026 * Rate limit response headers have been updated to use lowercase formatting. This change affects all API endpoints. The new lowercase headers are: | Header | Description | | - | - | | x-ratelimit-limit-user | Number of requests allowed per minute for the user | | x-ratelimit-limit-user-remaining | Number of requests remaining for the user | | x-ratelimit-limit-user-reset | Time in seconds before the limit resets for the user | | x-ratelimit-limit-org | Number of requests allowed per month for the account | | x-ratelimit-limit-org-remaining | Number of requests remaining for the account | | x-ratelimit-limit-org-reset | Time in seconds before the limit resets for the account | ## January 1st, 2026 * Handling timestamps for date fields. Affinity is standardizing how dates are represented across the platform to ensure consistency between the application and the API. Starting January 1st, 2026, the API will change how it handles timestamps for date fields. Today, timestamps sent to date fields over the API are not visible to users in any CRM interface. After this change, the API will ignore any time information included in requests, storing and returning values at midnight Pacific Time (PT) on the submitted date. **Example:** * API request includes: `2024-04-01T15:30:00Z` * Affinity will store and return: `2024-04-01T07:00:00.000Z` (equivalent to midnight PT) Any existing date field values that currently include timestamps will also be updated to reflect midnight PT on their stored date. No action is required unless your integration depends on time data within date fields. ## September 25th, 2025 * Added the following endpoints in BETA: | Method | URL | Summary | | - | - | - | | GET | `/v2/company-merges` | Get All Company Merge status | | POST | `/v2/company-merges` | Initiate Company Merge | | GET | `/v2/company-merges/{mergeId}` | Get Company Merge status | | GET | `/v2/tasks/company-merges` | Get All Company Merge Tasks | | GET | `/v2/tasks/company-merges/{taskId}` | Get Company Merge Task | ## July 30th, 2025 * Added the following endpoints in BETA: | Method | URL | Summary | | - | - | - | | GET | `/v2/person-merges` | Get All Person Merge status | | POST | `/v2/person-merges` | Initiate Person Merge | | GET | `/v2/person-merges/{mergeId}` | Get Person Merge status | | GET | `/v2/tasks/person-merges` | Get All Person Merge Tasks | | GET | `/v2/tasks/person-merges/{taskId}` | Get Person Merge Task | | GET | `/v2/notes` | Get all Notes | | GET | `/v2/notes/{noteId}` | Get a Note with a given id | | GET | `/v2/notes/{noteId}/attached-companies` | Get directly attached companies for a Note | | GET | `/v2/notes/{noteId}/attached-opportunities` | Get directly attached opportunities for a Note | | GET | `/v2/notes/{noteId}/attached-persons` | Get directly attached persons for a Note | | GET | `/v2/notes/{noteId}/replies` | Get reply notes for a given Note | ## May 14th, 2025 * Renamed all path parameters named simply "id" to a more descriptive name (eg. "personId"). This will not have any effect on the API at runtime, but may impact code relying on the OpenAPI spec doing type generation. ## April 9th, 2025 * The following endpoints are no longer in BETA: | Method | URL | Summary | | - | - | - | | GET | `/v2/lists/{listId}/list-entries/{listEntryId}` | Get a single List Entry on a List | | GET | `/v2/lists/{listId}/list-entries/{listEntryId}/fields` | Get field values on a single List Entry | | PATCH | `/v2/lists/{listId}/list-entries/{listEntryId}/fields` | Perform batch operations on a list entry's fields | | GET | `/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}` | Get a single field value | | POST | `/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}` | Update a single field value on a List Entry | ## March 31st, 2025 * The following beta endpoints now support updating association fields. | Method | URL | Summary | | - | - | - | | PATCH | `/v2/lists/{listId}/list-entries/{listEntryId}/fields` | Perform batch operations on a list entry's fields | | POST | `/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}` | Update a single field value on a List Entry | ## February 28th, 2025 * Added the following endpoints in BETA: | Method | URL | Summary | | - | - | - | | GET | `/v2/lists/{listId}/list-entries/{listEntryId}` | Get a single List Entry on a List | | GET | `/v2/lists/{listId}/list-entries/{listEntryId}/fields` | Get field values on a single List Entry | | PATCH | `/v2/lists/{listId}/list-entries/{listEntryId}/fields` | Perform batch operations on a list entry's fields | | GET | `/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}` | Get a single field value | | POST | `/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}` | Update a single field value on a List Entry | ## January 17th, 2025 * Document `X-Ratelimit` headers in the schema for all endpoints. ## January 15th, 2025 * Add default responses to all endpoints to document all possible error codes that can be returned by the API. * Updated 400 error responses to correctly include the `bad-request` error code as a possible error. ## December 3rd, 2024 * Properly document `listId` property on `CompanyListEntry`, `PersonListEntry`, and `OpportunityListEntry` schemas. ## September 25th, 2024 * Upgrade schema to OpenAPI 3.1 ## August 5, 2024 * Correct `opp` to `opportunity` to match documentation for the `List` `type` property. ## July 24, 2024 * More accurate documentation for response properties that are enums — Enums with `null` as a possible value will have it listed as one. ## March 25, 2024 * Added the ability to retrieve the date and other details of your firm's "First Email", "Last Email", "First Event", "Last Event", "Next Event", "First Chat Message", "Last Chat Message", and "Last Contact" with a given entity. Use these timestamps to add relationship context to your applications, and to identify founders and companies that need investors' attention. * Endpoints that previously required a `fieldIds` parameter to return field data, now accept either `fieldIds` or `fieldTypes`, and will return field data accordingly. See the [Specifying Desired Fields (Field Selection)](/pages/data-model/working-with-field-data) section of these docs for more information. The new `fieldTypes` parameter should make field data retrieval easier for users looking to pull data from many similar Fields at a time. ## January 4, 2023 * Most endpoints that return field data now require the user to use the `fieldIds` parameter to specify which Fields they want data for. Without `fieldIds` specified, these endpoints will return basic entity data but not field data. ## December 12, 2023 * Added the ability to retrieve metadata (e.g. ID, name, type, enrichment source, and data type) on Fields. See the [Retrieving Field Metadata](/pages/data-model/working-with-field-data) section of these docs for more information. # Version Migration Source: https://developer.affinity.co/pages/changelog/version-migration Affinity API v2 uses date-based versioning: breaking changes are introduced only in new versions, so your existing integrations remain stable on the version they were created against. Beta endpoints are an exception — see [Beta Endpoints](/pages/external-api-v2/beta-endpoints), where breaking changes may occur without notice or versioning. For how an app's default version is set and overridden per request, see [Versioning](/pages/external-api-v2/versioning). This page lists the migration steps, if any, required to adopt each version. For additive, non-breaking changes (new endpoints, new response properties, and other improvements within a version), see [Previous Changes](/pages/changelog/previous-changes). ## 2024-01-01 **2024-01-01** is the initial stable release of Affinity API v2. No migration steps are required to adopt this version. ## 2026-07-15 ### Restricted opportunity field access in list-entry fields If your integration reads list-entry fields via any of the endpoints below, field values for opportunities that your app does not have permission to manage will now be returned with `type: "hidden"` and `value.data: null` instead of the real value. **Action required:** * Update your code to handle `type: "hidden"` responses gracefully. Do not assume all field values in a list-entry response will have a known type and non-null data. * If your integration writes to list-entry fields (PATCH/POST), calls targeting a field on a restricted opportunity will now return `403 Forbidden`. Check the response status and handle accordingly. Affected endpoints: | Method | URL | | - | - | | GET | `/v2/lists/{listId}/list-entries/{listEntryId}/fields` | | GET | `/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}` | | PATCH | `/v2/lists/{listId}/list-entries/{listEntryId}/fields` | | POST | `/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}` | ### `quarter` added to relative date unit enum The `unit` property in relative date filter requests now accepts `quarter` as a valid value, and `relativeDateUnits` in filterability responses now includes `quarter`. **Action required:** * If your integration validates or switches on the `relativeDateUnits` values returned by filterability endpoints, add `quarter` as a handled case. * No action is required if you only use relative date filters with existing unit values. ## 2026-09-17 ### `is-between-relative` date filter now uses a range value The `is-between-relative` operator's `value` is now a range object (`{ amount: [start, end], unit }` with exactly two amounts) instead of the shape used by other relative-date operators. For the `is-within-the-last`, `is-not-within-the-last`, `is-within-the-next`, `is-not-within-the-next`, and `is-between-relative` operators, relative date filter `amount` values must now be at least `1`; a value of `0` is no longer accepted. Other relative-date operators (for example `is-exactly-relative` on Time in Current Status) are unaffected and continue to accept `0`. **Action required:** * If your integration sends `is-between-relative` filters, update the request to send the new range value shape. * If your integration sends `is-within-the-last`, `is-not-within-the-last`, `is-within-the-next`, `is-not-within-the-next`, or `is-between-relative` filters with an `amount` of `0`, update it to send `1` or greater. ### `is-between` and `is-between-relative` filters reject inverted bounds Search filters using the `is-between` operator now return a validation error when the first value is greater than the second; for most date fields, equal bounds are rejected too (the `notes.created-date` field is an exception and continues to accept equal bounds). The `is-between-relative` operator returns a validation error when the first amount is greater than the second amount. **Action required:** * Update your integration to send correctly ordered bounds for `is-between`/`is-between-relative` filters. Requests with inverted or (for dates) equal bounds now return `400 Bad Request` instead of being silently accepted. Affected endpoints: | Method | URL | | - | - | | POST | `/v2/companies/search` | | POST | `/v2/persons/search` | | POST | `/v2/lists/{listId}/list-entries/search` | ### New field value types: `note`, `reminder`, `list-multi` Field metadata responses (`FieldMetadata.valueType`) and field-value responses (`value.type`) across Companies, Persons, and Lists may now include `note`, `reminder`, or `list-multi`. **Action required:** * If your integration enumerates or switches on `valueType` (field metadata) or `value.type` (field values), add handling for `note`, `reminder`, and `list-multi`. * No action is required if your integration already handles unrecognized field value types gracefully. ### `transcriptId` may be `null` on AI Notetaker notes `transcriptId` on AI Notetaker notes can now be `null` when the org does not retain transcripts, instead of always being an integer. **Action required:** * Update your integration to handle `transcriptId: null` on AI Notetaker notes. Affected endpoints: | Method | URL | | - | - | | GET | `/v2/notes` | | GET | `/v2/notes/{noteId}` | | GET | `/v2/notes/{noteId}/replies` | | GET | `/v2/companies/{companyId}/notes` | | GET | `/v2/persons/{personId}/notes` | | GET | `/v2/opportunities/{opportunityId}/notes` | *** # Nested Associations Source: https://developer.affinity.co/pages/data-model/nested-associations Some GET endpoints return "association" data under `fields`. For example, the Persons GET endpoints return data about which Companies a Person is associated with in Affinity. The Opportunities GET endpoints return similar data about associated Companies and Persons. The List Entries GET endpoints also return this data for Person and Opportunity List Entries. The API truncates these nested arrays of Persons or Companies **at 100 entries**. For example, if an Opportunity is associated with 200 Persons in Affinity, only 100 of those Persons will be returned by the GET `/opportunities` or `/opportunities/{id}` endpoint. # The Basics Source: https://developer.affinity.co/pages/data-model/the-basics The three top-level objects in Affinity are **Persons, Companies, and Opportunities**. (Note: Companies are called Organizations in the Affinity web app.) These have profiles in the Affinity web app and can be added to Lists. A **List** is a spreadsheet-like collection of rows tied to Persons, Companies, or Opportunities. * Each row on a List is a **List Entry**. A List Entry contains data and metadata about a given Person, Company, or Opportunity in the context of a List. This includes list-specific field data, and information about who added the row to the List and when. * A given entity can be added to a List more than once. These List Entries can have different List-specific field data and List Entry-level metadata. Each column on a List maps to a **Field**. Fields show up within Affinity profile pages, extensions, and integrations. There are two categories of fields: * **List-specific fields** are scoped to a single List. In the API, their data can only be accessed through the List Entry resource. * **Global fields** belong to entities directly. These can include default fields, fields created by you, enrichment fields, or relationship intelligence fields. They can be accessed through the Person/Company/Opportunity resources and the List Entry resource. # Working with Field Data Source: https://developer.affinity.co/pages/data-model/working-with-field-data ### Field Types and IDs Here is a deeper look at the types of Fields in Affinity, differentiated by the scope and source of their data: | Field Type | Description | Example Fields | Field ID Pattern | | - | - | - | - | | `enriched` | Firmographic, funding, and people Fields populated by Affinity. These can be "Affinity Data" Fields or come from distinct data partners. | "Affinity Data: Description", "Dealroom: Number of Employees", "Organizations", "People", "Date Added", "Time in Current Status" | A string representing the enrichment source, followed by the field name, e.g. `affinity-data-description` or `dealroom-number-of-employees`. A handful of system-populated enriched Fields use a fixed ID instead: `persons`, `companies`, `created-at`, `time-in-current-status`. | | `list` | Fields that are specific to the context of a given list. These can only be accessed through `*/list-entries` endpoints in this version of the API. | Default "Status" and "Amount" columns, custom columns that pertain to a given List of deals or founders | `field-`, followed by a unique integer, e.g. `field-1234` | | `global` | Fields that persist across an Affinity account and are not list-specific. | "My Firm's Founder Scoring Column", "Notes", "Lists", "Reminders" | `field-`, followed by a unique integer, e.g. `field-1234`. A few system-populated global Fields use a fixed ID instead: `notes`, `lists`, `reminders`. | | `relationship-intelligence` | Fields populated by Affinity from users' email and calendar data that provide insight into your firm's relationship with a given Person/Company/Opportunity. | "Source of Introduction", "First Email", "Last Email", "First Event", "Last Event", "Next Event", "First Chat Message", "Last Chat Message", "Last Contact" | A string similar to the field's name in-product, e.g. `source-of-introduction` | ### Field Value Types Field data can take a variety of shapes. Some of these value types are described in the Affinity Help Center [creating columns in lists](https://support.affinity.co/hc/en-us/articles/115001608232-How-to-create-a-new-column-in-a-list) and can be selected by users when creating a column; others are system-populated and cannot be chosen when creating a column. Notice how array types end with `-multi`: | Single Type | Array Type | User-Creatable Column? | | - | - | - | | `text` | Not supported in Affinity | Yes | | `number` | `number-multi` | Yes | | `datetime` | Not supported in Affinity | Yes | | `location` | `location-multi` | Yes | | `dropdown` | `dropdown-multi` | Yes | | `ranked-dropdown` | Not supported in Affinity | Yes | | `person` | `person-multi` | Yes | | `company` | `company-multi` | Yes | | `filterable-text`\* | `filterable-text-multi`\* | No | | `note` | Not supported in Affinity | No | | `reminder` | Not supported in Affinity | No | | Not supported in Affinity | `list-multi` | No | \*Note that `filterable-text` and `filterable-text-multi` are special types that operate similarly to `dropdown` and `dropdown-multi`. They are reserved for Affinity-populated Fields, and users cannot create Fields with these types. When an array-typed value has no data in it, the API will return `null` (rather than an empty array). ### Retrieving Field Data To retrieve field data on companies, persons, or opportunities, call GET `/v2/companies`, GET `/v2/persons`, or one of our GET `*/list-entries` endpoints. (Note that Opportunities only have list-specific Fields, so all their field data will live on the `*/list-entries` endpoints.) For most of these endpoints, you will need to specify the Fields for which you want data returned via the `fieldIds` or `fieldTypes` parameter — Otherwise, entities will be returned without any field data attached. The GET `/v2/companies` and `/v2/persons` endpoints can return entities with enriched, global, and relationship intelligence field data attached, but do not support list-specific field data. **To get comprehensive field data including list-specific field data on Companies and Persons, use the GET `*/list-entries` endpoints.** ### Specifying Desired Fields (Field Selection) As mentioned above, you will need to specify the Fields (either by ID or by Type) for which you want data returned when using the following endpoints: * GET `/v2/companies` * GET `/v2/companies/{id}` * GET `/v2/persons` * GET `/v2/persons/{id}` * GET `/v2/lists/{listId}/list-entries` Each of these endpoints has a `fieldIds` parameter that accepts an array of Field IDs, and a `fieldTypes` parameter that accepts an array of Field Types. Use the GET `*/fields` endpoints to get Field IDs, Field Types, and other Field-level metadata: * Call GET `/v2/companies/fields` and `/v2/persons/fields` to get a list of the enriched, global, and relationship intelligence (AKA non-list-specific) Fields that exist on Companies and Persons, respectively. These are the Fields whose values are available to pull via GET `/v2/companies`, GET `/v2/companies/{id}`, GET `/v2/persons`, and `/v2/persons/{id}`. * Call GET `/v2/lists/{listId}/fields` to get a list of the enriched, global, relationship intelligence, **and list-specific** Fields for a given List. These are the Fields whose values are available to pull via GET `/v2/lists/{listId}/list-entries`. The following endpoints don't require field selection: * GET `/v2/lists/{listId}/saved-views/{viewId}/list-entries` — See below. This endpoint returns just the field data that has been pulled into the given Saved View via UI. * GET `/v2/companies/{id}/list-entries` and GET `/v2/persons/{id}/list-entries` — These endpoints return comprehensive field data for the given person or company in the context of each List Entry. ### Saved Views A Saved View allows a user to configure the Fields they want to see in the UI for a given List, and set filters and sorts on the rows on that List. A List can have multiple Saved Views. In the context of this API, Saved Views can be useful for specifying the exact Fields for which data is needed. The `*/saved-views/{viewId}/list-entries` endpoint also respects the filters that have been set on the given Saved View in the Affinity web app. (It does not, however, respect sorts just yet.) ### Partner Data Restrictions This API supports pulling data from [Affinity Data](https://support.affinity.co/hc/en-us/articles/360058255052-Affinity-Data) fields and select [Dealroom fields](https://support.affinity.co/hc/en-us/articles/6106558518797-Dealroom-co-data-in-Affinity#h_01G2N22SVH7TJR3DJV3NQDE9HQ). Due to the agreements we have with some of our data partners, the API does not expose data from the following sources: * Crunchbase, including Crunchbase UUID * Pitchbook * [Dealroom "exclusive" fields](https://support.affinity.co/hc/en-us/articles/6106558518797-Dealroom-co-data-in-Affinity#h_01G2N22YEAZJ5TC1X9ENKZFWF5) ### Field Value Changes > [!NOTE] > > The field value change endpoints are currently in **beta**. Field value changes let you see the history of how a Field's value evolved over time, including who made each change and when it occurred. This is useful for tracking an entity's progress through a pipeline (for example, a "Status" Field moving from `Lead` to `Closed Won`) or for keeping an external system in sync with Affinity. #### Which Fields support change tracking Not every Field records its history. Enriched and system-populated Fields (such as Affinity Data and Dealroom Fields, and relationship intelligence Fields) do not track changes. Change tracking applies to user-managed `global` and `list` Fields. When you query changes for a Field that does not support tracking, the endpoint returns no changes for that Field rather than an error. #### The Field Value Change resource Each change record describes a single mutation to a single Field value: | Property | Type | Description | | - | - | - | | `id` | integer | The unique identifier of the change record. | | `field` | object | The Field whose value changed, including its `id` and `name`. | | `entity` | object | The Company, Person, or Opportunity the change occurred on. | | `listEntry` | object | The List Entry the change occurred on, or `null` for changes that are not scoped to a List Entry. | | `changer` | object | The user who made the change, or `null` for system-generated changes such as enrichment updates. | | `changedAt` | datetime | When the change occurred, in RFC 3339 format. | | `actionType` | string | The kind of change: `add`, `update`, or `delete`. See below. | | `type` | string | The value type of the Field (for example, `dropdown`, `number`, `person-multi`). Determines the shape of `value`. | | `value` | various | The value associated with the change. Its shape depends on `type`. See [Field Value Types](#field-value-types). | #### Action types The `actionType` property describes what happened to the value: | Action Type | Meaning | | - | - | | `add` | A value was set for the first time, or a value was added to a multi-value Field. | | `update` | An existing single-value Field changed from one value to another. | | `delete` | A value was cleared, or a value was removed from a multi-value Field. | Multi-value Field types (`person-multi`, `company-multi`, `dropdown-multi`, `number-multi`, `location-multi`, `filterable-text-multi`) only ever produce `add` and `delete` actions, never `update`. To update a multi-value Field, Affinity records a `delete` for the removed value and an `add` for the new one. When a referenced entity (such as a dropdown option) is deleted from Affinity after the change was recorded, the `value` contains a snapshot of the value as it was at the time of the change rather than a live reference. #### Retrieving changes There are two ways to read field value changes: * **Workspace-wide:** `GET /v2/field-value-changes` returns changes across every entity and Field in your workspace. Results are returned in ascending order of `changedAt`. This endpoint is built for delta-sync: within a single sync, follow `pagination.nextUrl` to page through results until it becomes `null`, which means you have reached the most recent change. To run the next incremental sync, record the `changedAt` of the last change you processed and, on your next sync, filter for changes newer than that timestamp (for example, `filter=changedAt>2024-06-01T12:00:00Z`). Do not persist `nextUrl` between syncs, since it is `null` once you are caught up. * **Per List Entry:** `GET /v2/lists/{listId}/list-entries/{listEntryId}/field-value-changes` returns the change history for the Fields of a single List Entry. Both endpoints accept a `filter` query parameter so you can narrow results by `field.id`, `changer.id`, `changedAt`, `actionType`, and (on the workspace-wide endpoint) `listEntry.id`, `entity.id` and `field.entityType`. See [Filtering](/pages/external-api-v2/filtering) for the filter syntax, and the endpoint reference for the exact properties and operators each one supports. # Calls Companies Source: https://developer.affinity.co/pages/data-share/calls_companies_v1_0 Association table linking calls to companies **Name:** `v1_0.calls_companies` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | Synthetic hash of call_id and company_id, not a source record ID. Signed 32-bit, so values may be negative, and collisions can repeat an id across rows. The unique key for this table is call_id + company_id. | | `call_id` | The ID of the call | | `company_id` | The ID of the company | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # Calls Persons Source: https://developer.affinity.co/pages/data-share/calls_persons_v1_0 Association table linking calls to persons **Name:** `v1_0.calls_persons` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | Synthetic hash of call_id and person_id, not a source record ID. Signed 32-bit, so values may be negative, and collisions can repeat an id across rows. The unique key for this table is call_id + person_id. | | `call_id` | The ID of the call | | `person_id` | The ID of the person | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # Calls Source: https://developer.affinity.co/pages/data-share/calls_v1_0 Includes all calls logged in Affinity with timing, participants, and metadata. **Name:** `v1_0.calls` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The call's unique identifier | | `logging_type` | Indicates how the interaction was added to Affinity: either manually by a user ('manual') or automatically through Affinity's capture process ('automated'). Currently, calls can only be logged as 'manual'. | | `title` | The call's title | | `all_day` | Whether the call spans an entire day | | `start_time` | The timestamp of when the call starts | | `end_time` | The timestamp of when the call ends | | `creator_id` | The ID of the person who created the call | | `created_at` | The timestamp of when the call was created in Affinity | | `attendees` | Array of attendee email addresses | | `is_deleted` | Whether the call record has been deleted | | `last_updated_at` | Timestamp when this record was last updated | # Changelog Source: https://developer.affinity.co/pages/data-share/changelog Schema changes to the Affinity Data Share ## October 15th, 2026 * Added the `subject` column to the `emails` table (`v1_0` schema). The column is NULL by default. To fill it, an Affinity admin opens the Snowflake or Databricks configuration under **Settings** → **Integrations** and selects **Include email subject lines**. The setting applies to every data share the organization has. Subjects appear on the next refresh after the change is saved, and every email in the organization gets a new `last_updated_at` so incremental pulls pick them up. Affinity encrypts email subject lines at the application level. Choosing to include them removes that layer for the share, though the data stays encrypted at rest and in transit. A subject is also NULL when a participant's privacy settings withhold it, even for an organization that opted in. See [Data Access](/pages/data-share/data_access) for details. ## September 22nd, 2026 * Values inside a `custom_fields` array are now in a defined order. A field that holds more than one value stores them as a JSON array, and that array now matches the order Affinity shows, oldest value first. Before this change the order was arbitrary and could change on each refresh, so the position of a value carried no meaning. The values themselves did not change. This applies to the `custom_fields` column on the `persons`, `companies`, and `list_entries` tables (`v1_0` schema). To find which fields hold more than one value, read `value_type` on `fields_metadata` - a type that ends in `-multi` holds an array. ## September 11th, 2026 * Added Affinity's smart activity fields as columns on the `persons`, `companies`, and `opportunities` tables (`v1_0` schema): `first_email_date`, `last_email_date`, `first_event_date`, `last_event_date`, `next_event_date`, `first_chat_message_date`, `last_chat_message_date`, and `last_contact_date`. These match the First Email, Last Email, First Event, Last Event, Next Event, First Chat Message, Last Chat Message, and Last Contact fields shown in Affinity, so there is no need to derive them from the `emails`, `meetings`, `calls`, and `chat_messages` tables. An event is a meeting or a logged call — the underlying field does not distinguish the two — and `next_event_date` is the only column that looks forward. `last_contact_date` is the most recent of `last_email_date`, `last_event_date`, and `last_chat_message_date`. An entity with no recorded activity has NULL in every column. These are current values, not a history of changes. Opportunity values are the combined activity of the people associated with the opportunity. Because these columns now live on the entity itself, new activity updates the entity's `last_updated_at`, so a person, company, or opportunity appears in an incremental pull when only its activity changed. ## September 1st, 2026 * Added the `persons_value_changes`, `companies_value_changes`, `opportunities_value_changes`, and `list_entries_value_changes` tables (`v1_0` schema). Each row is one tracked change to a field value: `field_id` identifies the field (join to `fields_metadata.id`), and `value` carries the new value for an add or update, or the removed value for a delete. Changes to global fields appear in the table for the entity they were made on. Changes to list-specific fields appear in `list_entries_value_changes`, scoped to the list entry, and reach their entity through `list_entries_persons`, `list_entries_companies`, and `list_entries_opportunities` — so the full history for one entity is the union of both. Only fields with change tracking enabled record changes. ## July 22nd, 2026 * Added the `is_restricted` column to the `opportunities` table (`v1_0` schema). This boolean indicates whether the opportunity is marked as restricted in Affinity. ## June 22nd, 2026 * Added the `is_current` column to the `companies_persons` table (`v1_0` schema). This boolean indicates whether the person–company association represents the person's current company. # Chat Messages Companies Source: https://developer.affinity.co/pages/data-share/chat_messages_companies_v1_0 Association table linking chat messages to companies **Name:** `v1_0.chat_messages_companies` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | Synthetic hash of chat_message_id and company_id, not a source record ID. Signed 32-bit, so values may be negative, and collisions can repeat an id across rows. The unique key for this table is chat_message_id + company_id. | | `chat_message_id` | The ID of the chat message | | `company_id` | The ID of the company | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # Chat Messages Persons Source: https://developer.affinity.co/pages/data-share/chat_messages_persons_v1_0 Association table linking chat messages to persons **Name:** `v1_0.chat_messages_persons` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | Synthetic hash of chat_message_id and person_id, not a source record ID. Signed 32-bit, so values may be negative, and collisions can repeat an id across rows. The unique key for this table is chat_message_id + person_id. | | `chat_message_id` | The ID of the chat message | | `person_id` | The ID of the person | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # Chat Messages Source: https://developer.affinity.co/pages/data-share/chat_messages_v1_0 Includes all chat messages tracked in Affinity with sender, direction, and metadata. **Name:** `v1_0.chat_messages` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | Unique identifier for the chat message | | `logging_type` | Indicates how the interaction was added to Affinity: either manually by a user or automatically through Affinity's capture process. Currently, chat messages can only be logged as 'manual'. | | `direction` | The direction of the chat message | | `sent_at` | Timestamp indicating when the chat message was sent | | `creator_id` | The ID of the creator of the chat message | | `created_at` | Timestamp indicating when the chat message was created in Affinity | | `is_deleted` | Whether the chat message record has been deleted | | `last_updated_at` | Timestamp when this record was last updated | # Companies Persons Source: https://developer.affinity.co/pages/data-share/companies_persons_v1_0 Association table linking companies to persons **Name:** `v1_0.companies_persons` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The association's unique identifier | | `company_id` | The ID of the company | | `person_id` | The ID of the person | | `is_current` | Whether this is the person's current company | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # Companies Source: https://developer.affinity.co/pages/data-share/companies_v1_0 Includes data on all companies in your Affinity instance with basic metadata, Affinity Enrichment Data, Dealroom data (if enabled), and a json object that includes your global custom fields. Multi-line text values in custom_fields are truncated to the first 40,000 characters. **Name:** `v1_0.companies` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The company's unique identifier | | `name` | The company's name | | `domain` | The company's primary domain | | `domains` | All of the company's domains | | `is_global` | Whether or not the company is tenant specific | | `custom_fields` | Custom field values associated with the company | | `first_email_date` | When the first email with anyone at this company was sent or received (First Email) | | `last_email_date` | When the most recent email with anyone at this company was sent or received (Last Email) | | `first_event_date` | When the first meeting or call with anyone at this company took place (First Event) | | `last_event_date` | When the most recent past meeting or call with anyone at this company took place (Last Event) | | `next_event_date` | When the next upcoming meeting or call with anyone at this company takes place (Next Event) | | `first_chat_message_date` | When the first chat message with anyone at this company was sent or received | | `last_chat_message_date` | When the most recent chat message with anyone at this company was sent or received | | `last_contact_date` | The most recent contact of any kind — the latest of last_email_date, last_event_date and last_chat_message_date (Last Contact) | | `is_deleted` | Whether the company has been deleted | | `last_updated_at` | Timestamp when this record was last updated | ## Enrichment Fields These columns contain data from Affinity Enrichment, third-party integrations, and other dynamic data sources. | Column | Description | | - | - | | `source_of_introduction` | How this company was introduced/sourced | | `slack_channel` | Associated Slack channel | | `ms_teams_channel` | Associated Microsoft Teams channel | | `affinity_data_description` | Company description from Affinity Data | | `affinity_data_number_of_employees` | Number of employees | | `affinity_data_industry` | Industry classification | | `affinity_data_investment_stage` | Investment/funding stage | | `affinity_data_investors` | List of investors | | `affinity_data_last_funding_amount` | Most recent funding round amount (USD) | | `affinity_data_last_funding_date` | Date of last funding round | | `affinity_data_location` | Company location (structured: city, state, country) | | `affinity_data_total_funding_amount` | Total funding raised (USD) | | `affinity_data_year_founded` | Year company was founded | | `affinity_data_keywords` | Company keywords | | `affinity_data_linkedin_url` | LinkedIn company page URL | | `affinity_data_linkedin_headcount` | Employee count from LinkedIn | | `dealroom_url` | Dealroom profile URL | | `dealroom_corporate_industries` | Corporate industry tags | | `dealroom_service_industries` | Service industry tags | | `dealroom_technologies` | Technology stack tags | | `dealroom_income_streams` | Revenue/income stream types | | `dealroom_business_models` | Business model classification | | `dealroom_ownership_types` | Ownership structure type | | `dealroom_alexa_rank` | Alexa rank (Deprecated) | | `dealroom_employee_count_range` | Employee count range | | `dealroom_super_founder` | Super founder indicator | | `dealroom_similarweb_visits_last_month` | SimilarWeb visits last month (Deprecated) | | `dealroom_current_job_openings` | Current job openings | | `dealroom_total_tweets` | Total Twitter/X posts | | `dealroom_twitter_followers_change_last_month` | Follower growth (last 30 days) | | `dealroom_twitter_favorites_last_month` | Tweet likes received (last 30 days) | | `dealroom_sustainable_development` | Sustainable development indicator | | `dealroom_latest_revenue` | Latest revenue | | `dealroom_latest_ebitda` | Latest EBITDA | | `dealroom_similarweb_total_ios_downloads` | SimilarWeb total iOS downloads (Deprecated) | | `dealroom_similarweb_total_android_downloads` | SimilarWeb total Android downloads (Deprecated) | | `dealroom_number_of_employees` | Employee count from Dealroom | | `dealroom_location` | Location from Dealroom | | `dealroom_client_focus` | B2B/B2C/B2G client focus | | `dealroom_has_exceptional_founder` | Has exceptional founder indicator | | `dealroom_has_strong_founder` | Has strong founder indicator | | `dealroom_company_status` | Company status | | `dealroom_last_updated` | Last updated timestamp | | `dealroom_team_members` | Team members | | `dealroom_investors` | Investors | | `dealroom_last_funding_valuation_eur` | Last funding valuation (EUR) | | `dealroom_last_funding_date` | Last funding date | | `dealroom_last_funding_investors` | Last funding investors | | `dealroom_latest_revenue_update_date` | Latest revenue update date | | `dealroom_core_side_value` | Core side value | | `dealroom_similarweb_ios_incremental_downloads` | SimilarWeb iOS incremental downloads (Deprecated) | | `dealroom_similarweb_android_incremental_downloads` | SimilarWeb Android incremental downloads (Deprecated) | | `dealroom_tech_stack` | Technology stack | | `dealroom_description` | Company description | | `dealroom_industry` | Primary industry | | `dealroom_year_founded` | Year founded | | `dealroom_total_funding_amount` | Total funding (EUR) | | `dealroom_last_funding_amount` | Last funding round (EUR) | | `dealroom_founders` | Founders | | `dealroom_twitter_followers_last_month` | Twitter follower count | | `affinity_data_employee_departures_last_3_months` | Employee departures in last 3 months | | `affinity_data_employee_departures_last_3_months_number` | Number of employee departures in last 3 months | | `affinity_data_employee_departures_last_3_months_percentage` | Percentage of employee departures in last 3 months | | `affinity_data_employee_departures_last_3_months_leadership` | Leadership departures in last 3 months | | `affinity_data_employee_hires_last_3_months` | Employee hires in last 3 months | | `affinity_data_employee_hires_last_3_months_number` | Number of employee hires in last 3 months | | `affinity_data_employee_hires_last_3_months_percentage` | Percentage of employee hires in last 3 months | | `affinity_data_employee_hires_last_3_months_leadership` | Leadership hires in last 3 months | | `affinity_data_employees_current` | Current employee count | | `affinity_data_employees_1_month_ago` | Employee count 1 month ago | | `affinity_data_employees_3_months_ago` | Employee count 3 months ago | | `affinity_data_employees_6_months_ago` | Employee count 6 months ago | | `affinity_data_employees_12_months_ago` | Employee count 12 months ago | | `affinity_data_employees_24_months_ago` | Employee count 24 months ago | | `affinity_data_employees_growth_mom_percentage` | Employee growth month-over-month percentage | | `affinity_data_employees_growth_qoq_percentage` | Employee growth quarter-over-quarter percentage | | `affinity_data_employees_growth_yoy_percentage` | Employee growth year-over-year percentage | | `affinity_data_founders_ceos` | Founders and CEOs | | `affinity_data_linkedin_profile_founders_ceos` | LinkedIn profiles of founders and CEOs | # Companies Value Changes Source: https://developer.affinity.co/pages/data-share/companies_value_changes_v1_0 Includes the history of changes to global field values on companies. Only fields with change tracking enabled record changes. Changes to list-specific fields are not in this table: they are in list_entries_value_changes, which reaches a company through list_entries_companies. Field metadata is in the fields_metadata table (join field_id to fields_metadata.id). **Name:** `v1_0.companies_value_changes` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The field value change's unique identifier | | `field_id` | The ID of the field whose value changed (join to fields_metadata.id) | | `company_id` | The ID of the company the change is on | | `changer_id` | The person ID of the user that made the change (null for system-generated changes or when the user has been deleted) | | `changed_at` | The date that the change was recorded | | `action_type` | The type of change (add, update, or delete) | | `value` | New value for add/update changes, or the removed value for delete changes, as a one-entry JSON object keyed by field_id, like a custom_fields entry. Person, company, and dropdown values are the referenced ID. Interpret with fields_metadata.value_type | | `value_display` | Display text snapshot captured at change time for person, company, and dropdown values (person name, company name, or dropdown option text): null for other value types | | `is_deleted` | Whether the field value change has been deleted | | `last_updated_at` | Timestamp when this record was last updated | # Data Access Source: https://developer.affinity.co/pages/data-share/data_access How data visibility works in the Data Share ## Org-Wide Visibility The Data Share provides **org-wide visibility** into your Affinity data. Unlike the Affinity API, which enforces per-user access controls and permissions, the Data Share bypasses application-level ACLs entirely. This means that **all organization data is visible** to anyone with access to the share — regardless of role-based access restrictions configured within Affinity. > [!WARNING] > > Grant access to the share only to users who are authorized to view all organization data. > There are no per-user or per-role visibility filters applied at the share level. ## What This Means in Practice * **All records are included**: Persons, companies, opportunities, list entries, and associations are all visible in the share regardless of Affinity-level permissions. * **Custom field values are included**: The `custom_fields` JSON column on entity tables contains all custom field values, including fields that may be restricted in the Affinity UI. * **No row-level security**: Data Share views expose the full dataset. If you need to restrict access, apply platform-native access controls — Snowflake row access policies or Unity Catalog table ACLs on Databricks — or control share access at the account/role level. ## Email Subject Lines The `subject` column on the `emails` table is NULL by default. Affinity encrypts email subject lines at the application level, so the share does not include them unless an admin opts in. To include them, an Affinity admin opens the Snowflake or Databricks configuration under **Settings** → **Integrations** and selects **Include email subject lines**. The setting applies to every data share the organization has. Turning it on for one Snowflake or Databricks configuration includes subjects in all of them. Subjects appear on the next refresh after the change is saved. Every email in the organization gets a new `last_updated_at` at that point, so an incremental pull that filters on `last_updated_at` picks up the subjects of older emails too. Selecting **Do not include email subject lines** returns the column to NULL on the next refresh. > [!NOTE] > > Including subject lines removes the application-level encryption for this share. The data > stays encrypted at rest and in transit. A subject stays NULL when a participant's privacy settings withhold it, even for an organization that opted in. If a participant hides their emails after a subject was shared, the subject returns to NULL on the next refresh and the email gets a new `last_updated_at`. If they show their emails again, the subject comes back the same way. # Deletes & Merges Source: https://developer.affinity.co/pages/data-share/deletes How record deletions and merges are handled in the Data Share ## Soft Delete Model The Data Share pipeline uses a **soft-delete model** internally. When a record is deleted in Affinity, it is marked as deleted in the pipeline rather than being physically removed. **Note: Soft deletes are cleaned after 7 days, deleted records will only be visible in the share for 7 days after deletion.** ## Merges When two persons or two companies are merged in Affinity, one record survives and the other is removed. The share reflects a merge as a delete of the removed record plus updates to the surviving record and its associations. There is no separate merge event or merge flag in the share. ### Persons * The surviving person keeps its `id`. Its row in `persons` is updated and `last_updated_at` advances. * The removed person's row in `persons` is marked `is_deleted = TRUE`, then removed from the share after 7 days like any other delete. * Associations that referenced the removed person (`companies_persons`, `list_entries_persons`, `notes_persons`, `opportunities_persons`, `chat_messages_persons`) are re-pointed to the surviving `id`. Each association row keeps its own `id`. Where the surviving person already had an equivalent association, the duplicate row from the removed person is marked `is_deleted = TRUE` instead. * Email associations are not re-pointed. Rows in `emails_persons` for the removed person are marked `is_deleted = TRUE`, and new rows with new `id` values are created for the surviving person once its email addresses are matched to the same emails. This matching runs shortly after the merge, so there can be a short window where an email has no association to the surviving person. `emails_companies` is derived from `emails_persons` and refreshes after those rows update. * Meeting and call associations (`meetings_persons`, `calls_persons`) are re-pointed like other associations when the surviving person is external. When an external person is merged into an internal person, only manually logged meetings and calls are re-pointed. Synced calendar events are re-matched to the surviving person the same way emails are, so those rows are re-created with new `id` values. * Custom field values from the removed person are carried over to the surviving person where the surviving person has no value for that field, and appear in its `custom_fields`. ### Companies Company merges behave the same way as person merges, with one addition: some merges produce a **new** company `id`. * **Merging two tenant-specific companies** (`is_global = FALSE`): the surviving company keeps its `id`, and the removed company is marked `is_deleted = TRUE`. * **Merging a global company into a tenant-specific company**: the tenant-specific company keeps its `id`. If the global company was in your `companies` table, its row is marked `is_deleted = TRUE`. * **Merging a tenant-specific company into a global company** where the tenant-specific company has no extra domains: the global company keeps its `id`, and the tenant-specific company is marked `is_deleted = TRUE`. If the global company was not previously in your `companies` table, it appears as a new row. * **Merging two global companies**, or merging a tenant-specific company **with extra domains** into a global company: Affinity creates a **new tenant-specific company** with a new `id`, and **both** original companies are marked `is_deleted = TRUE`. In every case, associations (`companies_persons`, `list_entries_companies`, `notes_companies`, `opportunities_companies`) are re-pointed to the surviving or newly created company `id`, and custom field values are carried over where the surviving company has no value for the field. `emails_companies`, `meetings_companies`, `calls_companies`, and `chat_messages_companies` are derived from the person and email-address associations rather than stored against the company, so they are not re-pointed directly and refresh once those underlying associations update. > [!WARNING] > > The share does not expose a mapping from a removed `id` to the surviving `id`. If you keep > references to Affinity IDs in your own systems, watch for rows that flip to > `is_deleted = TRUE` and match them to the surviving record while the removed row is still > present in the share. Persons can be matched on `primary_email_address` or `email_addresses`; > companies can be matched on `domain` or `domains`. # Emails Companies Source: https://developer.affinity.co/pages/data-share/emails_companies_v1_0 Association table linking emails to companies **Name:** `v1_0.emails_companies` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | Synthetic hash of email_id and company_id, not a source record ID. Signed 32-bit, so values may be negative, and collisions can repeat an id across rows. The unique key for this table is email_id + company_id. | | `email_id` | The ID of the email | | `company_id` | The ID of the company | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # Emails Persons Source: https://developer.affinity.co/pages/data-share/emails_persons_v1_0 Association table linking emails to persons **Name:** `v1_0.emails_persons` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | Synthetic hash of email_id and person_id, not a source record ID. Signed 32-bit, so values may be negative, and collisions can repeat an id across rows. The unique key for this table is email_id + person_id. | | `email_id` | The ID of the email | | `person_id` | The ID of the person | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # Emails Source: https://developer.affinity.co/pages/data-share/emails_v1_0 Includes all emails tracked in Affinity with sender, recipients, subject, and direction information. **Name:** `v1_0.emails` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The email's unique identifier | | `logging_type` | Indicates how the interaction was added to Affinity: either manually by a user ('manual') or automatically through Affinity's capture process ('automated'). Currently, emails can only be logged as 'automated'. | | `subject` | The email's subject line. NULL unless an Affinity admin chose 'Include email subject lines' for this share under Settings > Integrations. Also NULL when a participant's privacy settings withhold it. | | `direction` | The direction of the email: 'sent' if the email was sent by an internal user and 'received' if the email was sent to an internal user | | `sent_at` | The timestamp of when the email was sent | | `created_at` | The timestamp of when the email was created in Affinity | | `from` | The email address of the participant who sent the email | | `to_participants` | Array of email addresses in the To field | | `cc_participants` | Array of email addresses in the CC field | | `is_deleted` | Whether the email record has been deleted | | `last_updated_at` | Timestamp when this record was last updated | # Example Queries Source: https://developer.affinity.co/pages/data-share/example_queries Common SQL patterns for working with Data Share tables ## All Persons on a List View all persons on a list called "Distribution List": ```sql theme={null} SELECT * FROM list_entries le JOIN lists l ON l.id = le.list_id JOIN list_entries_persons lep ON le.id = lep.list_entry_id JOIN persons p ON p.id = lep.person_id WHERE l.name = 'Distribution List' LIMIT 10; ``` ## All Persons Working at a Company Across Affinity Accounts Find all persons associated with a given company across all subdomains: ```sql theme={null} SELECT c.subdomain, c.name, c.domain, p.first_name, p.last_name FROM companies c JOIN companies_persons cp ON c.id = cp.company_id JOIN persons p ON p.id = cp.person_id WHERE c.name = 'Coralogix'; ``` ## Flattening Custom Fields into Native Columns Pivot a company's custom fields JSON so each field becomes its own column: A field that holds more than one value stores them as a JSON array under one key, so the query below flattens that array as well. The array is in the same order as Affinity shows the values, oldest first. ```sql theme={null} WITH base AS ( SELECT id AS company_id, name, TRY_PARSE_JSON(custom_fields) AS cf FROM companies WHERE name = 'Klarna' ), kv AS ( SELECT b.company_id, b.name, k.value::STRING AS field_id, COALESCE( TRY_PARSE_JSON(GET(b.cf, k.value::STRING)::STRING), GET(b.cf, k.value::STRING) ) AS v_norm FROM base b, LATERAL FLATTEN(input => OBJECT_KEYS(b.cf)) k ), exploded AS ( SELECT company_id, name, field_id, v.value::STRING AS value_id FROM kv, LATERAL FLATTEN(input => IFF(IS_ARRAY(v_norm), v_norm, ARRAY_CONSTRUCT(v_norm))) v ), res AS ( SELECT e.company_id, e.name, m.name AS field_name, e.value_id, m.value_type, m.dropdown_options FROM exploded e JOIN fields_metadata m ON m.id = e.field_id ) SELECT * FROM res PIVOT(MAX(value_id) FOR field_name IN (ANY ORDER BY field_name)) ORDER BY 1; ``` See [Fields Metadata](/pages/data-share/fields_metadata_v1_0) for details on the `fields_metadata` table. # Fields Metadata Source: https://developer.affinity.co/pages/data-share/fields_metadata_v1_0 Includes data on all fields across entities and their metadata. Includes things like field types, available dropdown options, and formula definitions. **Name:** `v1_0.fields_metadata` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The field's identifier | | `name` | The field's name | | `list_id` | The ID of the list this field belongs to (null for non-list fields) | | `field_type` | The field's type (enriched, global, list, relationship-intelligence) | | `value_type` | The underlying value type (text, number, date, etc.) | | `enrichment_source` | The source of the data in this field (if it is enriched) | | `dropdown_options` | Dropdown options for dropdown/status fields | | `formula` | Formula definition for formula fields | | `is_deleted` | Whether the field has been deleted | | `last_updated_at` | Timestamp when this record was last updated | # List Entries Companies Source: https://developer.affinity.co/pages/data-share/list_entries_companies_v1_0 Association table linking list entries to companies **Name:** `v1_0.list_entries_companies` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The association's unique identifier | | `list_entry_id` | The ID of the list entry | | `company_id` | The ID of the company | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # List Entries Opportunities Source: https://developer.affinity.co/pages/data-share/list_entries_opportunities_v1_0 Association table linking list entries to opportunities **Name:** `v1_0.list_entries_opportunities` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The association's unique identifier | | `list_entry_id` | The ID of the list entry | | `opportunity_id` | The ID of the opportunity | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # List Entries Persons Source: https://developer.affinity.co/pages/data-share/list_entries_persons_v1_0 Association table linking list entries to persons **Name:** `v1_0.list_entries_persons` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The association's unique identifier | | `list_entry_id` | The ID of the list entry | | `person_id` | The ID of the person | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # List Entries Source: https://developer.affinity.co/pages/data-share/list_entries_v1_0 Includes data on all list entries across all your Affinity Lists with a json object that includes your custom list-specific fields. Multi-line text values in custom_fields are truncated to the first 40,000 characters. **Name:** `v1_0.list_entries` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The list entry's unique identifier | | `list_id` | The ID of the list that this list entry belongs to | | `creator_id` | The ID of the user that created this list entry | | `created_at` | The date that the list entry was created | | `custom_fields` | Custom field values on the list entry | | `is_deleted` | Whether the list entry has been deleted | | `last_updated_at` | Timestamp when this record was last updated | # List Entries Value Changes Source: https://developer.affinity.co/pages/data-share/list_entries_value_changes_v1_0 Includes the history of changes to list-specific field values, scoped to the list entry the change was made on. Only fields with change tracking enabled record changes. Changes to global fields are in persons_value_changes, companies_value_changes, and opportunities_value_changes. The entity a change is on is reached through list_entries_persons, list_entries_companies, and list_entries_opportunities. Field metadata is in the fields_metadata table (join field_id to fields_metadata.id). **Name:** `v1_0.list_entries_value_changes` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The field value change's unique identifier | | `field_id` | The ID of the field whose value changed (join to fields_metadata.id) | | `list_entry_id` | The ID of the list entry the change is scoped to | | `changer_id` | The person ID of the user that made the change (null for system-generated changes or when the user has been deleted) | | `changed_at` | The date that the change was recorded | | `action_type` | The type of change (add, update, or delete) | | `value` | New value for add/update changes, or the removed value for delete changes, as a one-entry JSON object keyed by field_id, like a custom_fields entry. Person, company, and dropdown values are the referenced ID. Interpret with fields_metadata.value_type | | `value_display` | Display text snapshot captured at change time for person, company, and dropdown values (person name, company name, or dropdown option text): null for other value types | | `is_deleted` | Whether the field value change has been deleted | | `last_updated_at` | Timestamp when this record was last updated | # Lists Source: https://developer.affinity.co/pages/data-share/lists_v1_0 Includes metadata on all Affinity Lists including name, owner, creator, type, and public/private status. **Name:** `v1_0.lists` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The list's unique identifier | | `name` | The name of the list | | `is_public` | Whether or not the list is public | | `owner_id` | The ID of the user that owns this list | | `creator_id` | The ID of the user that created this list | | `type` | The entity type for this list (person, company, or opportunity) | | `is_deleted` | Whether the list has been deleted | | `last_updated_at` | Timestamp when this record was last updated | # Meetings Companies Source: https://developer.affinity.co/pages/data-share/meetings_companies_v1_0 Association table linking meetings to companies **Name:** `v1_0.meetings_companies` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | Synthetic hash of meeting_id and company_id, not a source record ID. Signed 32-bit, so values may be negative, and collisions can repeat an id across rows. The unique key for this table is meeting_id + company_id. | | `meeting_id` | The ID of the meeting | | `company_id` | The ID of the company | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # Meetings Persons Source: https://developer.affinity.co/pages/data-share/meetings_persons_v1_0 Association table linking meetings to persons **Name:** `v1_0.meetings_persons` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | Synthetic hash of meeting_id and person_id, not a source record ID. Signed 32-bit, so values may be negative, and collisions can repeat an id across rows. The unique key for this table is meeting_id + person_id. | | `meeting_id` | The ID of the meeting | | `person_id` | The ID of the person | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # Meetings Source: https://developer.affinity.co/pages/data-share/meetings_v1_0 Includes all meetings logged in Affinity with timing, participants, organizer, and metadata. **Name:** `v1_0.meetings` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The meeting's unique identifier | | `logging_type` | Indicates how the interaction was added to Affinity: either manually by a user ('manual') or automatically through Affinity's capture process ('automated') | | `title` | The meeting's title | | `all_day` | Whether the meeting spans the entire day | | `start_time` | The timestamp of when the meeting starts | | `end_time` | The timestamp of when the meeting ends | | `creator_id` | The ID of the person who created the meeting | | `organizer_id` | The ID of the person who organized the meeting | | `created_at` | The timestamp of when the meeting was created in Affinity | | `attendees` | Array of attendee email addresses | | `is_deleted` | Whether the meeting record has been deleted | | `last_updated_at` | Timestamp when this record was last updated | # Notes Chat Messages Source: https://developer.affinity.co/pages/data-share/notes_chat_messages_v1_0 Association table linking notes to chat messages **Name:** `v1_0.notes_chat_messages` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The association's unique identifier | | `note_id` | The ID of the note | | `chat_message_id` | The ID of the chat message | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # Notes Companies Source: https://developer.affinity.co/pages/data-share/notes_companies_v1_0 Association table linking notes to companies **Name:** `v1_0.notes_companies` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The association's unique identifier | | `note_id` | The ID of the note | | `company_id` | The ID of the company | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # Notes Emails Source: https://developer.affinity.co/pages/data-share/notes_emails_v1_0 Association table linking notes to emails **Name:** `v1_0.notes_emails` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The association's unique identifier | | `note_id` | The ID of the note | | `email_id` | The ID of the email | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # Notes Meetings Source: https://developer.affinity.co/pages/data-share/notes_meetings_v1_0 Association table linking notes to meetings **Name:** `v1_0.notes_meetings` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The association's unique identifier | | `note_id` | The ID of the note | | `meeting_id` | The ID of the meeting (from events_orgs) | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # Notes Opportunities Source: https://developer.affinity.co/pages/data-share/notes_opportunities_v1_0 Association table linking notes to opportunities **Name:** `v1_0.notes_opportunities` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The association's unique identifier | | `note_id` | The ID of the note | | `opportunity_id` | The ID of the opportunity | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # Notes Persons Source: https://developer.affinity.co/pages/data-share/notes_persons_v1_0 Association table linking notes to persons **Name:** `v1_0.notes_persons` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The association's unique identifier | | `note_id` | The ID of the note | | `person_id` | The ID of the person | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # Notes Source: https://developer.affinity.co/pages/data-share/notes_v1_0 Includes all notes created in Affinity with content, metadata, and mentions. Note transcripts are stored separately in the transcripts table. **Name:** `v1_0.notes` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The note's unique identifier | | `content` | The note's content in html | | `creator_id` | The ID of the person who created the note | | `created_at` | The timestamp of when the note was created | | `type` | The categorized type of note: ai-notetaker (AI summary root), ai-notetaker-reply (reply to AI summary), user-reply (reply to any note), interaction (email/meeting/call/chat), or entities (standard note) | | `mentions` | Array of person IDs mentioned in the note | | `parent_id` | The ID of the parent note if this is a reply or comment | | `is_deleted` | Whether the note has been deleted | | `last_updated_at` | Timestamp when this record was last updated | # Opportunities Companies Source: https://developer.affinity.co/pages/data-share/opportunities_companies_v1_0 Association table linking opportunities to companies **Name:** `v1_0.opportunities_companies` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The association's unique identifier | | `opportunity_id` | The ID of the opportunity | | `company_id` | The ID of the company | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # Opportunities Persons Source: https://developer.affinity.co/pages/data-share/opportunities_persons_v1_0 Association table linking opportunities to persons **Name:** `v1_0.opportunities_persons` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The association's unique identifier | | `opportunity_id` | The ID of the opportunity | | `person_id` | The ID of the person | | `last_updated_at` | Timestamp when this record was last updated | | `is_deleted` | Whether the association has been deleted | # Opportunities Source: https://developer.affinity.co/pages/data-share/opportunities_v1_0 Includes data on all opportunities in your Affinity instance with basic metadata and a json object that includes your custom opportunity list fields **Name:** `v1_0.opportunities` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The opportunity's unique identifier | | `name` | The name of the opportunity | | `is_restricted` | Whether the opportunity is restricted. `false` for customers without the Restricted Opportunities feature enabled. | | `first_email_date` | When the first email with anyone on this opportunity was sent or received (First Email) | | `last_email_date` | When the most recent email with anyone on this opportunity was sent or received (Last Email) | | `first_event_date` | When the first meeting or call with anyone on this opportunity took place (First Event) | | `last_event_date` | When the most recent past meeting or call with anyone on this opportunity took place (Last Event) | | `next_event_date` | When the next upcoming meeting or call with anyone on this opportunity takes place (Next Event) | | `first_chat_message_date` | When the first chat message with anyone on this opportunity was sent or received | | `last_chat_message_date` | When the most recent chat message with anyone on this opportunity was sent or received | | `last_contact_date` | The most recent contact of any kind — the latest of last_email_date, last_event_date and last_chat_message_date (Last Contact) | | `is_deleted` | Whether the opportunity has been deleted | | `last_updated_at` | Timestamp when this record was last updated | # Opportunities Value Changes Source: https://developer.affinity.co/pages/data-share/opportunities_value_changes_v1_0 Includes the history of changes to global field values on opportunities. Only fields with change tracking enabled record changes. Changes to list-specific fields are not in this table: they are in list_entries_value_changes, which reaches an opportunity through list_entries_opportunities. Field metadata is in the fields_metadata table (join field_id to fields_metadata.id). **Name:** `v1_0.opportunities_value_changes` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The field value change's unique identifier | | `field_id` | The ID of the field whose value changed (join to fields_metadata.id) | | `opportunity_id` | The ID of the opportunity the change is on | | `changer_id` | The person ID of the user that made the change (null for system-generated changes or when the user has been deleted) | | `changed_at` | The date that the change was recorded | | `action_type` | The type of change (add, update, or delete) | | `value` | New value for add/update changes, or the removed value for delete changes, as a one-entry JSON object keyed by field_id, like a custom_fields entry. Person, company, and dropdown values are the referenced ID. Interpret with fields_metadata.value_type | | `value_display` | Display text snapshot captured at change time for person, company, and dropdown values (person name, company name, or dropdown option text): null for other value types | | `is_deleted` | Whether the field value change has been deleted | | `last_updated_at` | Timestamp when this record was last updated | # Overview Source: https://developer.affinity.co/pages/data-share/overview Affinity Data Share — available tables and schema reference > [!NOTE] > > Data Share is available on **Snowflake** and **Databricks** for Advanced and Enterprise tiers. The Affinity Data Share provides access to your Affinity data through Snowflake secure views and Databricks Delta Sharing. This documentation describes the tables available in the share and their schemas. # Persons Source: https://developer.affinity.co/pages/data-share/persons_v1_0 Includes data on all people in your Affinity instance with basic metadata, Affinity Enrichment Data, and a json object that includes your global custom fields. Multi-line text values in custom_fields are truncated to the first 40,000 characters. **Name:** `v1_0.persons` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The person's unique identifier | | `first_name` | The person's first name | | `last_name` | The person's last name | | `primary_email_address` | The person's primary email address | | `email_addresses` | All of the person's email addresses | | `type` | The person's type (internal/external) | | `custom_fields` | Custom field values associated with the person | | `first_email_date` | When the first email with this person was sent or received (First Email) | | `last_email_date` | When the most recent email with this person was sent or received (Last Email) | | `first_event_date` | When the first meeting or call with this person took place (First Event) | | `last_event_date` | When the most recent past meeting or call with this person took place (Last Event) | | `next_event_date` | When the next upcoming meeting or call with this person takes place (Next Event) | | `first_chat_message_date` | When the first chat message with this person was sent or received | | `last_chat_message_date` | When the most recent chat message with this person was sent or received | | `last_contact_date` | The most recent contact of any kind — the latest of last_email_date, last_event_date and last_chat_message_date (Last Contact) | | `is_deleted` | Whether the person has been deleted | | `last_updated_at` | Timestamp when this record was last updated | ## Enrichment Fields These columns contain data from Affinity Enrichment, third-party integrations, and other dynamic data sources. | Column | Description | | - | - | | `affinity_data_job_titles` | Current and past job titles | | `affinity_data_industry` | Industry classification | | `affinity_data_location` | Person's location (structured) | | `source_of_introduction` | How this person was introduced/sourced | | `affinity_data_phone_number` | Phone number | | `affinity_data_linkedin_url` | LinkedIn profile URL | | `affinity_data_birthday` | Birthday | | `eventbrite_rsvp` | Eventbrite RSVP status | | `eventbrite_attended` | Eventbrite attendance status | | `mailchimp_opened` | Mailchimp email opened | | `mailchimp_clicked` | Mailchimp email clicked | | `mailchimp_bounced` | Mailchimp email bounced | | `affinity_data_current_job_title` | Current job title | | `affinity_data_linkedin_profile_headline` | LinkedIn profile headline | | `affinity_data_keywords` | Keywords | | `affinity_data_current_organization_headcount` | Current organization headcount | | `affinity_data_education` | Education | | `affinity_data_years_of_experience` | Years of experience | | `affinity_data_current_job_functions` | Current job functions | | `affinity_data_current_job_seniorities` | Current job seniorities | | `affinity_data_current_job_start_date` | Current job start date | | `affinity_data_normalized_job_titles` | Normalized job titles | # Persons Value Changes Source: https://developer.affinity.co/pages/data-share/persons_value_changes_v1_0 Includes the history of changes to global field values on persons. Only fields with change tracking enabled record changes. Changes to list-specific fields are not in this table: they are in list_entries_value_changes, which reaches a person through list_entries_persons. Field metadata is in the fields_metadata table (join field_id to fields_metadata.id). **Name:** `v1_0.persons_value_changes` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The field value change's unique identifier | | `field_id` | The ID of the field whose value changed (join to fields_metadata.id) | | `person_id` | The ID of the person the change is on | | `changer_id` | The person ID of the user that made the change (null for system-generated changes or when the user has been deleted) | | `changed_at` | The date that the change was recorded | | `action_type` | The type of change (add, update, or delete) | | `value` | New value for add/update changes, or the removed value for delete changes, as a one-entry JSON object keyed by field_id, like a custom_fields entry. Person, company, and dropdown values are the referenced ID. Interpret with fields_metadata.value_type | | `value_display` | Display text snapshot captured at change time for person, company, and dropdown values (person name, company name, or dropdown option text): null for other value types | | `is_deleted` | Whether the field value change has been deleted | | `last_updated_at` | Timestamp when this record was last updated | # Refresh Cadence Source: https://developer.affinity.co/pages/data-share/refresh_cadence How often Data Share tables are updated ## Refresh Schedule Data Share tables are refreshed **every 2 hours** using an incremental pipeline. Each refresh cycle processes only new and changed records since the last run, keeping your data current without full-table reloads. ## Understanding `last_updated_at` Every table includes a `last_updated_at` timestamp column. This value represents when the ETL pipeline last wrote or refreshed the record — it does **not** correspond to when the underlying data was changed in the Affinity application. Use `last_updated_at` to identify records that were recently refreshed by the pipeline: ```sql theme={null} SELECT * FROM persons WHERE last_updated_at >= DATEADD('hour', -2, CURRENT_TIMESTAMP()) ORDER BY last_updated_at DESC; ``` > [!NOTE] > > Because refreshes are incremental, a record's `last_updated_at` is only updated when the > pipeline detects a change. Unchanged records retain their previous `last_updated_at` value. # Relationship Strengths Source: https://developer.affinity.co/pages/data-share/relationship_strengths_v1_0 Tracks relationship strength scores between people in your organization. Shows the strength of connections from internal persons to external persons based on interaction history. **Name:** `v1_0.relationship_strengths` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `internal_person_id` | The unique identifier of the internal person | | `external_person_id` | The unique identifier of the external person | | `strength` | The calculated relationship strength score between the two people | | `id` | The relationship strength record's unique identifier | | `is_deleted` | Whether the relationship strength record has been deleted | | `last_updated_at` | Timestamp when this record was last updated | # Connect Your Account Source: https://developer.affinity.co/pages/data-share/setup Connect your Snowflake or Databricks account to Affinity Data Share ## Prerequisites Before you begin, make sure you have: * **Admin access** in your Affinity organization (required to manage integrations) * A **Snowflake** or **Databricks** account * Your platform **account identifier** (covered in the steps below) > [tab] Snowflake > > ## Connect Your Snowflake Account > > **1. Open the Snowflake integration** > > In Affinity, go to **Settings** → **Integrations** → **Snowflake** → **Affinity Data to Snowflake**. > > Click **Add New Configuration**. > > ![Affinity Data to Snowflake page showing the Add New Configuration button](https://mintcdn.com/affinityco/ff3lpKlq-jOgcqdr/images/data-share/setup-step1-add-config.png?fit=max\&auto=format\&n=ff3lpKlq-jOgcqdr\&q=85\&s=d4d7324de049536770cedb0b36c2524b) > > **2. Find your Snowflake Account Identifier** > > In Snowflake, locate your account identifier by: > > 1. Clicking your **user profile** at the bottom-left of the Snowflake UI > 2. Selecting **Account** → **View account details** > 3. Copying the **data sharing account identifier** > > The identifier follows the format `ORG_NAME.ACCOUNT_NAME`. > > **3. Enter and verify your identifier** > > Paste your account identifier into the **Snowflake Account Identifier** field. > > The form will automatically parse it and display your **Organization Name** and **Account Name** > in the verification panel. Confirm these match your Snowflake instance before continuing. > > ![Configuration form showing the account identifier field and verification panel](https://mintcdn.com/affinityco/9omzOzhd7vGm5o9V/images/data-share/setup-step2-config-form.png?fit=max\&auto=format\&n=9omzOzhd7vGm5o9V\&q=85\&s=9f4134c7ed434f899ef277b6fe725a0f) > > **4. Choose whether to include email subject lines** > > The `subject` column on the `emails` table is NULL by default. To fill it, select **Include > email subject lines in my data shares**. > > Affinity encrypts email subject lines at the application level. Including them removes that > layer for the share, but the data stays encrypted at rest and in transit. The setting applies > to every data share in your organization. See > [Data Access](/pages/data-share/data_access#email-subject-lines) for details. > > **5. Confirm and connect** > > Check the confirmation box to acknowledge that the integration will grant access to all data > in your Affinity workspace. > > Click **Connect to Snowflake** to save the configuration. > > ## What Happens Next > > Once connected, Affinity will initiate the data share to your Snowflake account. This process > typically completes within a few minutes. Account admins on your Snowflake account will receive an > email notifying them that a private listing has been shared. You can also access listings directly > in your Snowflake account — see Snowflake's [consumer listing access documentation](https://docs.snowflake.com/en/collaboration/consumer-listings-access#accessing-listings-on-the-sf-marketplace) for details. > > > [!NOTE] > > > > See [Data Access](/pages/data-share/data_access) for important information about visibility > > and access controls within the share. > [tab] Databricks > > ## Connect Your Databricks Account > > **1. Find your Databricks Sharing Identifier** > > In Databricks, locate your sharing identifier (Unity Catalog metastore ID) by: > > 1. Opening your Databricks workspace > 2. Clicking the **Catalog** icon in the left sidebar > 3. Clicking the **gear icon** at the top of the Catalog page to open metastore settings > 4. Copying the identifier shown in metastore settings > > The identifier follows the format `::`, for example > `aws:us-west-2:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`. > > > [!NOTE] > > > > You must have access to a Databricks workspace that is enabled for Unity Catalog. Contact > > your Databricks workspace administrator if you are unsure. > > **2. Open the Databricks integration** > > In Affinity, go to **Settings** → **Integrations** → **Databricks** → **Affinity Data to Databricks**. > > Click **Add New Configuration**. > > > [!NOTE] > > > > If you do not see the Databricks tile on the **Integrations** page or the integration is > > not available to you, reach out to your Affinity Customer Success Manager. > > ![Affinity Data to Databricks page showing the empty state and the Add New Configuration button](https://mintcdn.com/affinityco/W7WaCF16P8emw2XI/images/data-share/setup-databricks-step1-add-config.png?fit=max\&auto=format\&n=W7WaCF16P8emw2XI\&q=85\&s=316ca8d9e05e76988d9b85ec8de8069b) > > **3. Enter your Sharing Identifier** > > Paste your sharing identifier into the **Databricks Sharing Identifier** field. > > Confirm the identifier matches your Databricks sharing identifier before continuing. > > ![Affinity Data to Databricks configuration form with the Databricks Sharing Identifier field and the Cloud, Region, and Sharing ID verification panel](https://mintcdn.com/affinityco/9omzOzhd7vGm5o9V/images/data-share/setup-databricks-config-form.png?fit=max\&auto=format\&n=9omzOzhd7vGm5o9V\&q=85\&s=168c4a3102b284fe72f10617fbaf5e24) > > **4. Choose whether to include email subject lines** > > The `subject` column on the `emails` table is NULL by default. To fill it, select **Include > email subject lines in my data shares**. > > Affinity encrypts email subject lines at the application level. Including them removes that > layer for the share, but the data stays encrypted at rest and in transit. The setting applies > to every data share in your organization. See > [Data Access](/pages/data-share/data_access#email-subject-lines) for details. > > **5. Confirm and connect** > > Check the confirmation box to acknowledge that the integration will grant access to all data > in your Affinity workspace. > > Click **Connect to Databricks** to save the configuration. > > ## What Happens Next > > Once connected, Affinity will initiate the Delta Share to your Databricks metastore. A > privileged user in your Databricks workspace (metastore admin, or someone with `CREATE CATALOG` > and `USE PROVIDER` privileges) will then need to mount the share as a catalog: > > 1. In Databricks, open **Catalog** → click the **gear icon** → select **Delta Sharing** > 2. On the **Shared with me** tab, locate the Affinity provider > 3. Find the share and click **Mount to catalog** > 4. Enter a catalog name and click **Create** > > Once mounted, grant your team members access to the catalog following standard Unity Catalog > privilege hierarchy. See Databricks' read shared data documentation for > [AWS](https://docs.databricks.com/aws/en/opensharing/read-data-databricks), > [Azure](https://learn.microsoft.com/en-us/azure/databricks/opensharing/read-data-databricks), > and [GCP](https://docs.databricks.com/gcp/en/opensharing/read-data-databricks) for full > details. > > > [!NOTE] > > > > See [Data Access](/pages/data-share/data_access) for important information about visibility > > and access controls within the share. # Subdomain Source: https://developer.affinity.co/pages/data-share/subdomain How subdomain identifies your Affinity instance Every table in the Data Share includes a `subdomain` column as its first column, identifying which Affinity organization instance a record belongs to. ## Multiple instances If your share includes data from multiple Affinity instances, use it to filter or group by organization: ```sql theme={null} -- Filter to a specific instance SELECT * FROM persons WHERE subdomain = 'your-org'; -- Aggregate across instances SELECT subdomain, COUNT(*) AS person_count FROM persons GROUP BY subdomain; ``` ## Single instance If your share contains data from a single Affinity instance, the column will have a constant value across all rows. You can safely ignore it in queries, but it is always present for consistency. > [!NOTE] > > Contact your Affinity administrator if you are unsure which value maps to your organization. # Transcripts Source: https://developer.affinity.co/pages/data-share/transcripts_v1_0 Includes all transcripts from recorded meetings or calls associated with AI Notetaker notes in Affinity. **Name:** `v1_0.transcripts` Deleted and merged records are covered in [Deletes & Merges](/pages/data-share/deletes). > [!WARNING] > > Grant access to the share only to users who are authorized to view all > organization data. There are no per-user or per-role visibility filters applied at the > share level. ## Columns | Column | Description | | - | - | | `id` | The transcript's unique identifier | | `note_id` | The ID of the AI Notetaker note associated with this transcript | | `transcript` | Preview of dialogue fragments on a transcript: array of objects with content (the fragment text), speaker (the speaker name as "FirstName LastName"), startTimestamp and endTimestamp (fragment bounds in HH:MM:SS format) | | `language_code` | The language code of the transcript | | `created_at` | The date and time the transcript was created | | `is_deleted` | Whether the transcript has been deleted | | `last_updated_at` | Timestamp when this record was last updated | # Versioning & Deprecation Source: https://developer.affinity.co/pages/data-share/versioning How Data Share schemas are versioned and what to expect when things change ## Schema Versions Data Share tables are organized into **versioned schemas** (e.g. `v1_0`). Each version defines a stable contract — the set of tables, columns, and their data types. Your queries reference a specific schema version, allowing you to gradually adopt the new version. ## What Changes Without a New Version The following changes can happen within an existing schema version and **will not break your queries**: * **New columns added** to existing tables * **New tables added** to the schema * **Bug fixes** to column values (e.g. correcting a calculation) ## What Triggers a New Version A new schema version is released when a change would break existing queries: * **Removing a column** from a table * **Renaming a column** * **Changing a column's data type** * **Changing row granularity** (e.g. a table starts returning more rows per entity) * **Changing the meaning of a column's values** (e.g. a score changing from 0–100 to 0.0–1.0) When this happens, a new schema version is created and the previous version continues to work during a deprecation period. ## Schema changes announcements Schema changes will be published as a change log in the documentation website, along with email comminication. ## Deprecation Policy When a schema version is deprecated: | Step | What Happens | Timeline | | - | - | - | | Announcement | Deprecation notice communicated with migration guidance | Day 0 | | Overlap period | Both old and new versions are available and kept up to date | 30 days | | Frozen period | Deprecated version is retained but no longer refreshed with new data | 30 days | | Removal | Deprecated version is removed | After 60 days | > [!WARNING] > > Once the frozen period begins, the deprecated schema version will stop receiving data > updates. Migrate your queries to the new version before the frozen period starts to avoid > working with stale data. ## Column Deprecation Individual columns may also be deprecated within a version. When a column is deprecated: 1. The column continues to return data during the deprecation period. 2. A notice is published in the documentation change log. 3. After 30 days, the column may return `NULL` or be removed in the next schema version. # Authentication Source: https://developer.affinity.co/pages/external-api-v2/authentication Affinity API v2 uses API keys and **bearer authentication**. To generate an API key, navigate to the Manage Apps Page in your Affinity Settings. You will need the "Generate an API key" role-based permission controlled by your Affinity admin. See [this Help Center article](https://support.affinity.co/s/article/How-to-Create-and-Manage-API-Keys) for full instructions on API key generation, and [this article](https://support.affinity.co/hc/en-us/articles/360015976732-Account-Level-Permissions) for more information on role-based permissions in Affinity. Provide your API key as your bearer authentication token to start making calls to Affinity API v2. You can create multiple API keys and provide a name and description for each. Your API key is able to read data and perform actions in Affinity on your behalf, so keep it safe as you would a password. To further secure an API key, you can define an IP Allowlist to limit which IP addresses or ranges can make API calls using that key. # Beta Endpoints Source: https://developer.affinity.co/pages/external-api-v2/beta-endpoints You’ll notice in our documentation that some endpoints will be marked as BETA. These endpoints are newly released and will eventually progress to General Availability (GA). While an endpoint is in BETA there are some important things to consider: * The development of this endpoint may still be in progress. This means new capabilities, request parameters, response data, and performance improvements may be adjusted over time. Because of this, breaking changes may occur to the endpoint WITHOUT notice or versioning. * As this is an early release, bug fixes may still be ongoing as well, and we encourage you to report bugs to [support@affinity.co](mailto:support@affinity.co). * In addition, your feedback around the capabilities of the endpoint are highly valuable, please reach out to your CSM to provide feedback to our product team. # Error Codes Source: https://developer.affinity.co/pages/external-api-v2/error-codes Here is a list of the error codes the API will return if something goes wrong (see endpoint documentation for endpoint-specific errors): | Error Code | Meaning | | - | - | | 400 | Bad Request — See endpoint documentation for more information. | | 401 | Unauthorized — Your API key is invalid. | | 403 | Forbidden — Insufficient rights to a resource. | | 404 | Not Found — Requested resource does not exist. See endpoint documentation for more information. | | 405 | Method Not Allowed — The method being used is not supported for this resource. | | 422 | Unprocessable Entity — Malformed parameters supplied. This can also happen in cases the parameters supplied logically cannot complete the request. In this case, an appropriate error message is delivered. | | 429 | Too Many Requests — You have exceeded the rate limit. | | 500 | Internal Server Error — We had a problem with our server. Try again later. | | 503 | Service Unavailable — This shouldn't generally happen. Contact us if you encounter this error. | # Filtering Source: https://developer.affinity.co/pages/external-api-v2/filtering Some endpoints support a filtering language for flexible and powerful queries. This allows for the creation of complex filter expressions using different operators and boolean logic in a single filter string. The description of each endpoint will contain information on which filter properties and operators are supported. ### Rules * Spaces are insignificant by default. For example, `field = hello` and `field=hello` are both valid. * If spaces are significant, they need to be inside double quotes, for example, `field = "hello world"` * Special characters need to be escaped with a backslash: `field="hello\" world"`. \ Full list of special characters: `\ * ~ ! & = > < $ ^ | " ' ( ) ] [ /` * Use `&` and `|` for boolean operations: `foo = 1 | baz = 2 & bar = 3`. Boolean Algebra Logic is assumed: `&` takes precedence over `|`. When evaluating the condition above, `baz = 2 & bar = 3` will be computed first, and then the result will be `or`'ed with `foo=1` * Parentheses can be used to specify the order of operations. In the example above, to make sure that `foo = 1 | baz = 2` is evaluated first, parentheses must be placed `(foo = 1 | baz = 2) & bar = 3` ### Grammar #### Simple Types | Definition | Property Types | Operator | Examples | | - | - | - | - | | exact match | all | `=` | `content = "hello world"` `content=hello` | | starts with | text | `=^` | `content =^ he` | | ends with | text | `=$` | `content =$ llo` | | contains | text | `=~` | `content =~ lo` | | greater than | int32, int64, float, double, decimal, date, datetime | `>` | `count > 1` | | greater than or equal to | int32, int64, float, double, decimal, date, datetime | `>=` | `content >= 1` | | less than | int32, int64, float, double, decimal, date, datetime | `<` | `count < 1` | | less than or equal to | int32, int64, float, double, decimal, date, datetime | `<=` | `content <= 1` | | is NULL | all | `!=*` | `content != *` | | is not NULL | all | `=*` | `content = *` | | is empty | text | `=""` | `content = ""` | | negation | all | `!` | `content != ”hello world”` `!(content = ”hello world”)` `!(content =^ “hello world”)` | #### Collections (all types) | Definition | Operator | Example | | - | - | - | | exact match with ordering | `=` | `industries = [Healthcare,Fintech]` | | contains all | `=~` | `industries =~ [Healthcare,Fintech]` | | empty | `=[]` | `industries =[]` | | negation | `!` | `!(industries = [Healthcare,Fintech])` | # Getting Started Source: https://developer.affinity.co/pages/external-api-v2/getting-started All Affinity API endpoints use the base URL `https://api.affinity.co`. All v2 endpoint paths start with `/v2`. Requests must be sent over HTTPS. The first few sections of these docs cover general information on the API. Each subsequent section covers a set of API endpoints. Each endpoint is documented with its accepted request parameters, expected response shapes, and a sample request and response. The shape of a given response can vary depending on what "type" of object or data is being returned. When this is the case, the response documentation will include a dropdown that can be used to select the "type" for which to display the response shape. # Introduction Source: https://developer.affinity.co/pages/external-api-v2/introduction Welcome to our new documentation site for API v2! This API provides a RESTful interface for building internal apps, automated workflows, 3rd party integrations, and for connecting Affinity to the rest of your tech stack. To view documentation on specific endpoints, visit the API Reference tab. The legacy Affinity v1 API can be found at [api-docs.affinity.co](https://api-docs.affinity.co/). The v2 API is not at feature parity with v1 - we are continuing to develop new v2 APIs to support all v1 functionality over time. **The Affinity APIs are only available on select license types.** See [this Help Center article](https://support.affinity.co/hc/en-us/articles/5563700459533-Getting-started-with-the-Affinity-API-FAQs) or contact your Customer Success Manager for more information. # OAuth Apps and MCP Clients (CIMD) Source: https://developer.affinity.co/pages/external-api-v2/oauth-apps An OAuth app lets your users connect a tool to Affinity without sharing an API key. You create the app in your own organization, and only your users can authorize it. Affinity calls this a second-party app. Use an OAuth app when a tool acts on behalf of a person and each person should sign in as themselves. If a script acts as a single service account, an [API key](/pages/external-api-v2/authentication) is simpler. MCP clients that publish a Client ID Metadata Document (CIMD) don't need an app. You add them by their URL instead. See [MCP clients with a metadata URL (CIMD)](#mcp-clients-with-a-metadata-url-cimd). ## Prerequisites * **Plan**: Scale, Advanced, or Enterprise. * **Permission**: `Manage all OAuth apps`. By default, only Administrators have it. * **IP allowlist**: to set one, you may also need the `Manage IP allowlist` permission. ## Create the app 1. In Affinity, go to **Settings** → **Manage Apps**. 2. Click **New App**, then **OAuth App**. If you can't create API keys, the button is called **New OAuth App** instead. 3. Enter a **Name** and a **Description**. Your users see the name on the consent screen. 4. Choose the **Client type** (the default is **Public**): * **Public** is for apps whose code runs on the user's device, such as mobile, desktop or single-page apps, or anywhere else the code ships to the user. A public client has no secret and must use PKCE. * **Confidential** is for a server you control, where a secret can stay private. You get a client secret, shown once. 5. Enter one **Redirect URI** per line, as a full URL such as `https://example.com/callback`. 6. Choose the **Allowed scopes**, which decide what the app can do for your users. Pick at least one. 7. Optionally, set an **API version**, an **IP allowlist**, an icon and a website URL. 8. Click **Add App**. ![The Manage Apps settings page with the New App button](https://mintcdn.com/affinityco/C6ojaYDjJToaJjCs/images/oauth-apps-01-manage-apps-list.png?fit=max\&auto=format\&n=C6ojaYDjJToaJjCs\&q=85\&s=343a7425f0844476228476c016e2702d) Manage Apps lists your API keys and your OAuth apps in one table. ![The New OAuth App form showing the name, description and client type fields](https://mintcdn.com/affinityco/C6ojaYDjJToaJjCs/images/oauth-apps-02-create-form.png?fit=max\&auto=format\&n=C6ojaYDjJToaJjCs\&q=85\&s=259fd712368b7cfc22d42096a15ed597) The app creation form: name and client type. ![The New OAuth App form showing redirect URIs, allowed scopes and the IP allowlist](https://mintcdn.com/affinityco/C6ojaYDjJToaJjCs/images/oauth-apps-03-scopes-and-allowlist.png?fit=max\&auto=format\&n=C6ojaYDjJToaJjCs\&q=85\&s=928b6bfe6cb5495edc5560924e33d626) Redirect URIs, allowed scopes and the IP allowlist, further down the same form. After you click **Add App**, Affinity opens the app's detail page, where you'll find the **Client ID**. For a confidential app, this happens after you close the client secret dialog. A client ID looks like `1f0c2b7a-3d4e-4a1b-9c8d-5e6f70819aa2`. > [!NOTE] > > **A confidential app shows its client secret only once.** Copy it and store it like a password. > Affinity keeps only a hash, so you can't view it again or rotate it. If you lose it, you'll need > to delete the app and create a new one, which disconnects every user. ![The Client Secret Created dialog with a copy button](https://mintcdn.com/affinityco/C6ojaYDjJToaJjCs/images/oauth-apps-04-client-secret.png?fit=max\&auto=format\&n=C6ojaYDjJToaJjCs\&q=85\&s=717a7a1d387e2a047fc31780cf53f78b) Affinity shows the client secret once. ## MCP clients with a metadata URL (CIMD) Some MCP clients don't need you to create an app. Instead, their `client_id` is a URL that points to a JSON file about the client, called a Client ID Metadata Document (CIMD). For example, Claude uses `https://claude.ai/oauth/mcp-oauth-client-metadata`. ### Built-in MCP clients Clients such as Claude, ChatGPT and Notion are already set up. You can turn each one on or off in **Settings** → **Affinity MCP**. For setup steps, see [Supported clients](/pages/mcp/supported-clients). ### Add an MCP client by its Client URL (CIMD) To use another MCP client with a metadata URL, add it in Manage Apps. 1. Go to **Settings** → **Manage Apps**, click **New App**, then **Client URL (CIMD)**. If you can't create API keys, click **Add by Client URL (CIMD)** instead. 2. Paste the client's metadata URL, such as `https://acme.example.com/oauth/client.json`, and click **Preview**. 3. Review the preview. Check the hostname: the name and logo come from the vendor, so anyone can set them. You'll also see a warning if every redirect URI is on localhost. 4. Optionally, narrow the **Allowed Scopes** or add an **IP Allowlist**. 5. Click **Add App**. Your users can now sign in with the client. Nothing is saved until you click **Add App**. If Affinity can't read the URL, the form tells you why. Affinity saves a copy of the document when you add the client. If the vendor updates it, open the client and click **Refresh Metadata**. To change the allowed scopes or the IP allowlist, click **Edit Details**. The name, website and redirect URIs always come from the document. To remove the client, open it and click **Revoke App**. This disconnects everyone in your organization who uses it. To bring it back, add it again with the same URL. Your users will need to connect again. ### CIMD metadata document requirements If you build an MCP client, your metadata document must: * Be served over `https` at the exact URL you use as `client_id`, with no redirects, and respond within 5 seconds. * Set `client_id` to that same URL. * Include `client_name` and at least one `redirect_uris` entry. * Use redirect URIs on the same registrable domain as the `client_id`, or on localhost. For example, a `client_id` on `app.acme.example.com` can redirect to `https://auth.acme.example.com/callback` or `http://127.0.0.1/callback`. * Include `code` in `response_types`, if you set it. * Set `token_endpoint_auth_method` to `none` or `private_key_jwt`. Either way, Affinity treats the client as public: it uses PKCE and has no client secret. ## Scopes | Scope | What it grants | | - | - | | `api` | Read and write through the Affinity APIs, as the user. | | `api.read` | Read-only access through the Affinity APIs. | | `mcp` | Read and write through the Affinity MCP server. It also satisfies `api`. | | `mcp.read` | Read-only access through the MCP server. It also satisfies `api.read`. | | `offline_access` | Keeps the token working after the user signs out of Affinity. Use it if your app runs in the background. | `api` doesn't grant `mcp`, so ask for `mcp` if your app talks to the MCP server. If you leave out the `scope` parameter when authorizing, Affinity grants every scope the app is approved for. Ask only for the scopes you need. ## Authorize a user Send the user to the authorize endpoint. A public client must include the PKCE parameters, and a confidential client can leave them out. ```http Public client theme={null} GET https://login.affinity.co/auth/oauth2/authorize ?client_id= &redirect_uri=https://example.com/callback &response_type=code &scope=api%20offline_access &state= &code_challenge= &code_challenge_method=S256 ``` ```http Confidential client theme={null} GET https://login.affinity.co/auth/oauth2/authorize ?client_id= &redirect_uri=https://example.com/callback &response_type=code &scope=api%20offline_access &state= ``` The user signs in, reviews the scopes and clicks **Allow Access**. Affinity then redirects to your redirect URI with `code` and `state`. Users can uncheck scopes before allowing, so check the `scope` field in the token response instead of assuming you got everything you asked for. ![The Affinity OAuth consent screen listing the requested scopes](https://mintcdn.com/affinityco/C6ojaYDjJToaJjCs/images/oauth-apps-07-consent-screen.png?fit=max\&auto=format\&n=C6ojaYDjJToaJjCs\&q=85\&s=f1a7cf5ca6586e6926f1c602365d92b0) The consent screen. Your users can uncheck a scope before allowing access. * `response_type` must be `code`, since it's the only supported flow. * `redirect_uri` must exactly match a registered URI. Only `localhost`, `127.0.0.1` and `[::1]` can use a different port. * PKCE supports `S256` only, not `plain`. * **A public app must send PKCE.** A confidential app can send it too, but then it must also send the verifier in the next step. * The code expires after **5 minutes** and can only be used once. ## Exchange the code for tokens A public client sends `client_id` and `code_verifier` in the request body. A confidential client uses HTTP Basic authentication, with the client ID as the username and the client secret as the password. ```bash Public client theme={null} curl -X POST https://login.affinity.co/auth/oauth2/token \ -H "Content-Type: application/x-www-form-urlencoded" \ -d grant_type=authorization_code \ -d "code=" \ -d redirect_uri=https://example.com/callback \ -d "client_id=" \ -d "code_verifier=" ``` ```bash Confidential client theme={null} curl -X POST https://login.affinity.co/auth/oauth2/token \ -u ":" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d grant_type=authorization_code \ -d "code=" \ -d redirect_uri=https://example.com/callback ``` A confidential client can also send `client_id` and `client_secret` as form fields, but if the Basic header is present, Affinity ignores them. If the client sent a PKCE challenge when authorizing, it must also send `code_verifier` here. The response looks like this: ```json theme={null} { "access_token": "...", "refresh_token": "...", "token_type": "bearer", "expires_in": 86400, "refresh_token_expires_in": 7776000, "scope": "api offline_access" } ``` Access tokens last **1 day** and refresh tokens last **90 days**. ## Refresh a token ```bash Public client theme={null} curl -X POST https://login.affinity.co/auth/oauth2/token \ -H "Content-Type: application/x-www-form-urlencoded" \ -d grant_type=refresh_token \ -d "refresh_token=" \ -d "client_id=" ``` ```bash Confidential client theme={null} curl -X POST https://login.affinity.co/auth/oauth2/token \ -u ":" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d grant_type=refresh_token \ -d "refresh_token=" ``` A public client gets a new refresh token each time and the old one stops working, so always store the new one. A confidential client can keep using the same refresh token until it expires, even though the response includes a new one. ## Call the API ```bash theme={null} curl https://api.affinity.co/v2/persons \ -H "Authorization: Bearer " \ -H "X-Affinity-Api-Version: 2026-09-17" ``` Read-only endpoints need `api.read`, and endpoints that change data need `api`. Some read-only endpoints use `POST`, such as `POST /v2/notes/search`. ## API version For each request, Affinity picks the API version in this order: 1. The `X-Affinity-Api-Version` header. 2. The app's pinned version. 3. `2024-01-01`, the oldest published version. New apps are pinned to the current version when you create them. To be sure which version you get, send the header. An unsupported version returns `400` with a validation error on the header. See [Versioning](/pages/external-api-v2/versioning) for the published versions. ## Discovery Affinity publishes its OAuth metadata at `https://login.affinity.co/.well-known/oauth-authorization-server`, and its signing keys at `https://login.affinity.co/.well-known/jwks.json`. Clients that read RFC 8414 metadata don't need any endpoint configuration. ## Connect the app to the Affinity MCP server Your OAuth app can also call the hosted Affinity MCP server at `https://mcp.affinity.co/mcp`. 1. Give the app the `mcp` scope, or `mcp.read` for read-only access. Add `offline_access` if the client runs in the background. 2. Point your MCP client at `https://mcp.affinity.co/mcp`. 3. The client reads `https://mcp.affinity.co/.well-known/oauth-protected-resource/mcp`, finds `https://login.affinity.co` and runs the flow above. The MCP server passes your token to the Affinity API unchanged, so the same scope rules and rate limits apply as for a direct API call. ## Restrict the app to known IP addresses With an IP allowlist, the app accepts calls only from the addresses you list. * Add up to 100 entries, each an IPv4 address, IPv6 address or CIDR range. * Leave the list empty to allow any address. * Calls from other addresses return `403` with `Access denied`. * The allowlist applies only to Affinity API v2, not to the older v1 API. ## Rate limits OAuth apps share the same per-user, per-organization and concurrent limits as API keys, and get the same rate limit headers. When you go over a limit, the API returns `429`. See [Rate limits](/pages/external-api-v2/rate-limits) for the current values. ## Errors | What happened | Where | Response | | - | - | - | | Unknown client, or a redirect URI that is not registered | Authorize | An error page. Affinity does not redirect, because the URI is not trusted. | | The user pressed Cancel | Authorize | Redirect with `error=access_denied` | | Scope asked for is not approved for the app | Authorize | Redirect with `error=invalid_scope` | | A public app sent no PKCE challenge | Authorize | Redirect with `error=invalid_request` | | Wrong or missing client secret | Token | `400` with `error=invalid_client` | | Code expired, or already used | Token | `400` with `error=invalid_grant` | | `redirect_uri` differs from the authorize call | Token | `400` with `error=invalid_request` | | Token lacks the scope the endpoint needs | API | `403` with `Insufficient scope` | | Caller IP is not on the allowlist | API | `403` with `Access denied` | | Access token expired | API | `401`. Use the refresh token to get a new access token. | | The app was revoked | API | `401`. Revoking deletes the app, so create a new one and ask your users to authorize it. | | Too many requests | API | `429` with `Rate limit exceeded` | ## Manage the app Go to **Settings** → **Manage Apps** and click the app. The detail page shows the client ID, redirect URIs, scopes, allowed IPs, authentication method, creator and pinned version. ![The OAuth app detail page](https://mintcdn.com/affinityco/C6ojaYDjJToaJjCs/images/oauth-apps-05-app-detail.png?fit=max\&auto=format\&n=C6ojaYDjJToaJjCs\&q=85\&s=dfccbbd7fcea8aef7ad241667ecaa33c) The app detail page: client ID, redirect URIs, scopes, allowed IPs and the pinned API version. From there, you can edit the name, description, redirect URIs, scopes, IP allowlist and version. > [!WARNING] > > **Revoking an app you created deletes it, and you can't undo it.** The app loses API access, every user in > your organization who connected it is disconnected, and its client ID stops working, so it can't > be authorized again. To restore access, create a new app and ask your users to authorize it. ![The revoke confirmation dialog](https://mintcdn.com/affinityco/C6ojaYDjJToaJjCs/images/oauth-apps-06-revoke-confirmation.png?fit=max\&auto=format\&n=C6ojaYDjJToaJjCs\&q=85\&s=402a9fb9ca5555ba18564293be262729) Revoking disconnects every user. ## Current limits * There's no token revocation endpoint. A token stops working when it expires, the user disconnects the app, or the app is revoked. Without `offline_access`, it also stops when the user signs out of Affinity. # Pagination Source: https://developer.affinity.co/pages/external-api-v2/pagination When an endpoint is expected to return multiple results, we break the results into pages to make them easier to handle. To cycle forward through multiple pages of data, look for the `nextUrl` property in the `pagination` portion of an API response, and use it for your next request. See endpoint documentation for more information. # Permissions Source: https://developer.affinity.co/pages/external-api-v2/permissions ### Overall Requirements You must have the "Generate an API key" permission to be able to work with the Affinity API. Most users in Affinity have this by default — Contact your Affinity admin if you are not able to generate an API key, and see [this article](https://support.affinity.co/hc/en-us/articles/360015976732-Account-Level-Permissions) for more information on role-based permissions in Affinity. ### Resource-Level Permissions The Affinity API respects sharing permissions that are set in-product. For example, if a given user does not have access to a list, note, or interaction in-product, they will not be able to see or modify it via API. ### Endpoint-Level Permissions Many API endpoints require endpoint-specific permissions in-product. These permissions, along with the "Generate an API key" permission, are managed by your Affinity admin in the Settings page. In the description of each endpoint you will see the required permissions needed. # Rate Limits Source: https://developer.affinity.co/pages/external-api-v2/rate-limits The Affinity API sets a limit on the number of calls that a user can make per minute, and that all the users on an account can make per month. It also sets a reasonable limit on the number of concurrent requests it will support from an account at one time. Requests to **both** Affinity API versions will count toward the one pool of requests allowed for a user or account. Once a per-minute, monthly, or concurrent rate limit is hit, subsequent requests will return an error code of 429. **We highly recommend designing your application to handle 429 errors.** ### Per-Minute Limits (User-Level) To help protect our systems, API requests will be halted at **900 per user, per minute.** We may also lower this limit on a temporary basis to manage API availability. ### Concurrent Request Limits (Account-Level) To protect our systems and manage availability across customers, we set a reasonable limit on concurrent requests at the account level. Customers should not expect to hit this limit unless they are hitting the API with heavy operations from many concurrent threads at once. ### Monthly Plan Tier Limits (Account-Level) The overall number of requests you can make per month will depend on your account's plan tier. **This monthly account-level limit resets at the end of each calendar month.** Current rate limits by plan tier are: | Plan Tier | Calls Per Month | | - | - | | Essentials | None | | Scale | 100k | | Advanced | 100k | | Enterprise | Unlimited\* | \*Per-Minute and Concurrent Request Limits still apply. ### Rate Limit Headers All API calls will return the following response headers with information about per-minute and monthly limits: | Header | Description | | - | - | | x-ratelimit-limit-user | Number of requests allowed per minute for the user | | x-ratelimit-limit-user-remaining | Number of requests remaining for the user | | x-ratelimit-limit-user-reset | Time in seconds before the limit resets for the user | | x-ratelimit-limit-org | Number of requests allowed per month for the account | | x-ratelimit-limit-org-remaining | Number of requests remaining for the account | | x-ratelimit-limit-org-reset | Time in seconds before the limit resets for the account | # Versioning Source: https://developer.affinity.co/pages/external-api-v2/versioning Versioning in Affinity's API ensures that your integrations remain stable as updates are introduced. Within API v2, minor versions identify releases that include breaking or behavior-changing modifications, and they allow you to target the exact API behavior your integration depends on. The current available versions are: * **2026-09-17** - The new current stable version of the v2 API. Introduces breaking changes around relative date filters, `is-between` bounds validation, new field types, and AI Notetaker transcript IDs. See the [changelog](/pages/changelog/version-migration) for full details. * **2026-07-15** - A previous stable version of the v2 API. This version is now locked and will not receive further changes. * **2024-01-01** - A previous stable version of the v2 API. This version is now locked and will not receive further changes. As new minor versions of Affinity API v2 are introduced, they will appear in this list. You'll be able to create new apps using those versions, update an existing app's default version, or override the version on a per-request basis with a header. ### Setting an app's default version Every app has a **Default API Version**, which is used for any request made with that app that does not specify a version header. * **When creating an app:** open the Manage Apps page in your Affinity Settings and select a **Default API Version** in the app creation form. * **For an existing app:** open the app from the Manage Apps table and edit its **Default API Version**. ### Overriding the version per request To target a specific version on an individual request, send the `X-Affinity-Api-Version` header with the desired version. This overrides the app's default version for that request only: ```bash theme={null} curl https://api.affinity.co/v2/persons \ -H "Authorization: Bearer " \ -H "X-Affinity-Api-Version: 2026-09-17" ``` If the header is omitted, the request is handled using the app's Default API Version. If the header specifies a version that is not supported, the request returns a validation error. Every response includes an `X-Affinity-Api-Version` header indicating the version that was used to handle the request. You can also use `current` as the version value to always receive the latest version, though this will make your integration vulnerable to breaking changes when new versions are released. # Authentication Source: https://developer.affinity.co/pages/mcp/authentication Learn how to authenticate with the Affinity MCP Server The Affinity MCP Server supports two authentication methods: **OAuth** (recommended for supported clients) and **API key**. ## OAuth (Recommended) > [!NOTE] > > OAuth authentication is only supported with the **hosted MCP server** (`https://mcp.affinity.co/mcp`). If you are running a self-hosted MCP server, use API key authentication instead. OAuth is the preferred way to connect to the Affinity MCP Server. It provides a secure, token-based connection without requiring you to manage API keys manually, and is supported by Claude (Desktop, Web, and CLI), Notion, ChatGPT, and Copilot Studio. ### Authorizing Access When you connect a supported client for the first time, you'll be redirected to Affinity to authorize access. The OAuth consent screen shows the permissions being requested: ![OAuth consent screen](https://mintcdn.com/affinityco/QImW73lMg0WStXPS/images/claude-oauth-consent.png?fit=max\&auto=format\&n=QImW73lMg0WStXPS\&q=85\&s=b171fedc536e5d9c09ecf660a6d219b2) The Affinity OAuth consent screen showing requested permissions. By default, the MCP server requests both read and write access. If you want to grant **read-only access** so the MCP server can look up data but not modify anything, uncheck the first scope before clicking **Allow**. ### Managing OAuth Clients Any admin can view and disable OAuth access for each client by navigating to **Settings** → **Affinity MCP**. These settings apply organization-wide for all users. On Enterprise plans, admins can scope this capability to specific roles via **Settings** → **Users and Permissions** → **Roles** → **Manage MCP Agents**. ![MCP Settings page showing connected OAuth clients](https://mintcdn.com/affinityco/QImW73lMg0WStXPS/images/mcp-settings.png?fit=max\&auto=format\&n=QImW73lMg0WStXPS\&q=85\&s=391344ed576398234371dde6b247c8b0) The MCP Settings page in Affinity, where admins can manage connected OAuth clients. ## API Key For clients that don't support OAuth, or if you prefer to authenticate with a key directly, generate an Affinity API key and pass it as a Bearer token in your client configuration. ### Obtaining Your API Key 1. Log in to your Affinity account 2. Navigate to **Settings** → **Manage Apps** 3. Click **New App** and enter a name (e.g. *John's MCP*) and a description (e.g. *API key for my MCP server connected to Claude*). API version and IP Allowlist can be left blank. 4. Copy the generated API key ![Add New App dialog in Affinity Settings](https://mintcdn.com/affinityco/8XghKQ1f6yEW1Y8-/images/add-new-app.png?fit=max\&auto=format\&n=8XghKQ1f6yEW1Y8-\&q=85\&s=19cb432c1610e9d434ff6b8847fe1cf8) The Add New App dialog in Affinity Settings: name and description are required. # Available Tools Source: https://developer.affinity.co/pages/mcp/available-tools Explore the tools and capabilities provided by the Affinity MCP Server Below are example prompts showing what you can ask your AI assistant for each tool. ## People **`search_persons`**: Search people across your org using structured filters, sorts, and/or a keyword. * *Search for "Jane Smith".* * *Show me all contacts we first emailed after January 2024.* * *Who are the people we haven't interacted with in over 6 months?* * *Find all contacts with "Engineer" in their job title.* * *Show me people with no LinkedIn URL on record.* **`get_person_info`**: Get detailed profile and field data for a specific person. * *What's the current job title and organization for John Smith?* * *Pull up the enriched profile for Jane Smith.* **`get_persons_info`**: Get profile and field data for several people in one call. * *Get the job titles and emails for everyone on our team who knows Jane Doe.* * *Pull the profiles of these five contacts.* **`get_person_list_entries`**: See which lists a person appears on. * *Which of our pipeline lists is Jane Doe currently on?* * *What lists is this contact a member of?* **`create_person`**: Add a new person record to your team's address book. * *Add Jane Doe at Acme to my contacts with the email [jane@acme.com](mailto:jane@acme.com).* * *Create a person record for John Smith.* **`update_person`**: Update an existing person's name, email addresses, or company associations. * *Update Jane Doe's email to [jane@newco.com](mailto:jane@newco.com).* * *Associate John Smith with Acme.* New **`delete_person`**: Permanently delete one or more people. > [!NOTE] > > Your AI assistant first shows you what will be deleted and waits for your confirmation. This > cannot be undone. The person's list entries, field values, reminders, and the notes written by > that person are deleted with them. Other notes, files, emails, and meetings are kept but are no > longer linked to the person. Internal people can't be deleted. * *Delete John Smith from Affinity.* * *Remove these three test contacts from our CRM.* New **`merge_persons`**: Merge two records of the same person into one. The duplicate's data (notes, list entries, relationships, and more) moves to the person you keep, and the duplicate is deleted. > [!NOTE] > > Requires an organization admin with the Manage Duplicates permission. Your AI assistant first > shows you which record is kept and waits for your confirmation, one merge at a time. The record > that is merged away can't be an internal person or a collaborator. An admin can undo > the merge later in **Settings > Duplicate Management > Merged**. * *Merge the two Jane Doe records and keep the one with [jane@acme.com](mailto:jane@acme.com).* * *Combine the duplicate contacts for John Smith.* *** ## Companies **`search_companies_top_matches`**: Search for companies using natural language, structured filters, or both. The default tool for all company lookups: name searches, domain lookups, structured field filters, and semantic discovery. * *Find fintech companies in our CRM.* * *Search for companies with "health" in the name.* * *Which biotech companies have we met with in the past 6 months?* * *Show me companies working on AI infrastructure.* **`search_all_companies`**: Exhaustively list or filter companies with cursor-based pagination. Use when you need every match, a total count, or inline field data on results. * *Export all companies in our CRM.* * *Give me a full list of every Series B company we're tracking.* * *How many companies do we have in our CRM?* * *Show me all portfolio companies with their funding stage field.* **`get_company_info`**: Get detailed profile and field data for a specific company. * *What's the description and location for Acme?* * *Pull the enriched data for Acme.* **`get_company_list_entries`**: See which lists a company appears on. * *Which deal lists is Acme currently tracked on?* **`render_market_map`**: Companion app to the market map skill. Renders the companies that match an investment thesis as an interactive scatter plot (funding stage and engagement) with coverage tables inside your AI client. * *Build a market map for AI infrastructure startups.* * *Show me our coverage of climate tech as a market map.* **`create_company`**: Create a new company record. * *Add Acme to our address book with the domain acme.com.* * *Create a company record for Acme and associate Jane Doe with it.* **`update_company`**: Update an existing company's name, domain, or associated people. > [!NOTE] > > Global companies enriched from Affinity's dataset can't have their name or domain changed. Only > manually created companies accept name and domain edits. * *Change Acme's domain to acme.io.* * *Associate Jane Doe with Acme.* New **`delete_company`**: Permanently delete one or more companies. > [!NOTE] > > Your AI assistant first shows you what will be deleted and waits for your confirmation. This > cannot be undone. The company's list entries on all lists, field values, and reminders are > deleted with it. Notes, files, people, and opportunities are kept. Global companies enriched from > Affinity's dataset can't be deleted. * *Delete Acme from Affinity.* * *What would be affected if I delete Acme?* New **`merge_companies`**: Merge two records of the same company into one. The duplicate's data moves to the company you keep. > [!NOTE] > > Requires an organization admin with the Manage Duplicates permission. Your AI assistant first > shows you which record is kept and waits for your confirmation, one merge at a time. When a global > company is involved, Affinity may hide the duplicate instead of deleting it, or replace both > records with one new company. An admin can undo a merge of two manually created companies later > in **Settings > Duplicate Management > Merged**. A merge involving a global company can't be > undone, also not in Duplicate Management. * *Merge "Acme Inc" into "Acme" and keep Acme.* * *We have two records for Acme. Combine them into one.* **`get_merge_task`**: Check whether a person or company merge has finished. Merges run in the background and can take a few minutes. * *Did the Acme merge finish?* *** ## Opportunities **`search_opportunities`**: Search for opportunities by keyword or list them all. * *Find all opportunities related to "enterprise".* * *List all open opportunities in our pipeline.* * *Search for opportunities mentioning "Series B".* **`create_opportunity`**: Create a new opportunity and attach it to a list. * *Create an opportunity for the Acme Series B on our VC Pipeline list.* * *Add a new opportunity called "Acme Renewal" to the Customer Success list.* **`update_opportunity`**: Rename an opportunity or change its company and person associations. * *Rename the "Acme Renewal" opportunity to "Acme Expansion".* * *Associate the Acme Series B opportunity with Jane Doe.* New **`delete_opportunity`**: Permanently delete one or more opportunities. > [!NOTE] > > Your AI assistant first shows you what will be deleted and waits for your confirmation. This > cannot be undone. The opportunity's list entries, list field values and their history, and > reminders are deleted with it. Notes and files are kept but are no longer linked to the > opportunity. * *Delete the "Acme Renewal" opportunity.* * *Delete the test opportunities I created today.* *** ## Notes **`create_note`**: Create a note and attach it to a person, company, opportunity, or meeting. * *Create a note on Acme summarizing our call today: we discussed pricing and they're evaluating until end of quarter.* * *Add a note on Jane Smith capturing what we just discussed about her background and execution style.* * *Attach a note to my meeting with Acme last Tuesday recapping the action items.* **`query_notes`**: Find notes by creator or date range. * *Show me all notes created this week.* * *Find notes I wrote in January.* * *Pull up all notes created by John Smith.* **`search_notes`**: Search notes by keyword, across all notes or scoped to a company. > [!NOTE] > > Access to this tool requires your organization to have Deal Assist enabled. Contact your CSM if > you receive no results unexpectedly. * *Search our notes for any mention of "data residency".* * *Find notes on Acme that talk about their renewal terms.* * *What have we written down about pricing concerns across our deals?* **`get_notes_for_entity`**: Get the notes attached to a specific record, optionally filtered by date or creator. * *Show me all notes on Acme.* * *What notes do we have on John Smith?* * *Find notes I created for the Acme deal.* * *What have we noted about Acme since April 10?* **`get_entities_attached_to_note`**: Find what records are linked to a specific note. * *What companies and people are attached to this note?* New **`update_note`**: Edit a note you created: change its text, or change the people, companies, and opportunities it is attached to. > [!NOTE] > > Only the note's creator can edit it. The text of a note with @mentions can't be changed. A new > set of people, companies, or opportunities replaces the old one, and a note must stay attached > to at least one record. * *Fix the typo in my last note on Acme: "Q3" should be "Q4".* * *Also attach my note about the Acme call to Jane Doe.* New **`delete_note`**: Permanently delete one or more notes you created. > [!NOTE] > > Your AI assistant first shows you what will be deleted and waits for your confirmation. This > cannot be undone. Deleting a note also deletes its replies and attached files. The people, > companies, and opportunities it is attached to are kept. * *Delete the duplicate note I added on Acme today.* *** ## Files **`search_files`**: Search files by keyword, across all files or scoped to a company. > [!NOTE] > > Access to this tool requires your organization to have Deal Assist enabled. Contact your CSM if > you receive no results unexpectedly. * *Search our files for the latest Acme pitch deck.* * *Find any documents that mention "term sheet" for Acme.* * *Which files reference the 2025 revenue projections?* **`get_entity_files`**: List the files attached to a person, company, or opportunity, or every file in your organization. * *What files do we have on Acme?* * *List the documents attached to the Acme Series B opportunity.* **`get_entity_file_metadata`**: Get the details of one file, such as its name, size, and upload date. * *When was the Acme pitch deck uploaded, and by whom?* **`upload_entity_file`**: Upload a file, up to 100 MB, and attach it to a person, company, or opportunity. > [!NOTE] > > On a local server, this tool reads the file from your computer. With a hosted connection (for > example, Claude or ChatGPT), attach the file in your chat and ask your AI assistant to upload it. * *Upload this pitch deck to Acme.* * *Attach the signed term sheet to the Acme Series B opportunity.* **`download_entity_file`**: Download a file attached to a person, company, or opportunity. * *Download the latest Acme pitch deck.* * *Get the financials file from the Acme record.* *** ## Lists **`get_lists`**: See all lists you have access to, optionally filtered by name. * *What lists do we have in Affinity?* * *Show me all the pipeline lists available.* * *Find the list with "portfolio" in its name.* **`get_list_info`**: Get metadata and a direct link for a specific list. * *What type of list is the "Series A Pipeline"?* * *Give me the details and URL for the Series A Pipeline list.* **`search_list_entries`**: Search, filter, and sort entries on a specific list, with cursor-based pagination. * *Find all entries on the VC Pipeline list with a status of "Active".* * *Show me deals added to the pipeline in the last 30 days, sorted by date.* * *Filter the portfolio list to companies in the healthcare sector.* **`get_single_list_entry`**: Get a specific entry on a list. * *Pull up the list entry for Acme on the Series A Pipeline.* **`create_list`**: Create a new list for organizing companies, people, or opportunities. * *Create a new opportunity list called "Q2 Outbound".* * *Set up a person list called "Investors I Met at Demo Day".* **`create_list_entry`**: Add an existing person or company as a list entry to a list. * *Add Acme to the Series A Pipeline list.* New **`delete_list_entries`**: Remove one or more entries from a list. > [!NOTE] > > Your AI assistant first shows you what will be deleted and waits for your confirmation. This > cannot be undone. On a company or person list, only the entry is removed: the company or person > stays in Affinity. On an opportunity list, deleting an entry permanently deletes the opportunity > itself. * *Remove Acme from the Series A Pipeline list.* * *Take Jane Doe and John Smith off the "Investors I Met at Demo Day" list.* *** ## Saved Views **`get_saved_views`**: See the saved views configured on a list. * *What saved views are set up on the VC Pipeline list?* * *Show me the saved views for our Customer Success list.* **`get_saved_view_list_entries`**: Pull the list entries that match a saved view's filters. * *Show me the entries in the "Active Deals" saved view on the VC Pipeline list.* * *List the companies in the "Recently Contacted" saved view.* *** ## Fields **`get_entity_fields`**: See what fields are available for people or companies. * *What custom fields do we have defined for companies?* * *List all the person fields available in Affinity.* **`get_list_fields`**: See what fields are available on a specific list. * *What fields are tracked on the VC Pipeline list?* * *Show me all the columns on the VC Pipeline list.* **`get_list_field_dropdown_options`**: See what dropdown options are available on a list field. * *What options do we have for the Status field?* **`get_entity_field_dropdown_options`**: See what dropdown options are available on a person or company field. * *What options are configured on the Industry field for companies?* * *List the dropdown values on the Source field for people.* **`create_field`**: Define a new field on a list, on companies, on people, or on opportunities. * *Add a "Lead Source" text field on companies.* * *Create a "Last Round Size" number field on opportunities.* * *Add a "Renewal Date" date field on the Customer Success list.* **`create_list_field_dropdown_option`**: Add a new selectable option to a dropdown field on a list. * *Add a "Not Relevant" option to the Communication Status field on our VC Pipeline list.* * *Create a "Closed Won" option on the Deal Stage field.* **`update_list_field_dropdown_option`**: Rename or restyle an existing dropdown option on a list field. * *Rename the "Pass" option to "Passed" on the Status field.* * *Change the color of the "Hot" priority option to red.* **`delete_list_field_dropdown_option`**: Remove a dropdown option from a list field. > [!NOTE] > > Deleting an option removes it from every list entry that had it selected. This cannot be undone. * *Remove the outdated "Associate" option from the Seniority field.* *** ## Field Values **`upsert_entity_field_values`**: Create or update field values on a person or company. * *Add 'Healthcare' as a new industry tag to Acme.* **`upsert_list_entry_field_values`**: Create or update field values in bulk for a specific list entry. * *For Acme's list entry on the Pipeline list, set the Stage field to 'Due Diligence' and the Deal Lead field to Jane Smith.* **`get_field_value_changes`**: See the history of changes to a field's values over time. * *Show me how the Stage field on Acme's pipeline entry has changed.* * *What edits were made to the Deal Lead field over the past month?* *** ## Meetings **`get_meetings`**: Get past and upcoming meeting interactions and attendees. > [!NOTE] > > Access to this tool requires your organization to be onboarded to Affinity's unified events > feature. Contact your CSM if you receive an access error. * *List all our meetings from last week.* * *Who are the attendees of meetings scheduled with Acme next week?* * *Show me all meetings that happened in Q1 2025.* **`get_meetings_for_entity`**: Get meetings for a specific person, company, or opportunity. * *Show me all meetings with Acme in the last 6 months.* * *What meetings has Jane Smith had this year?* * *List all meetings related to the Series A deal.* *** ## Interactions **`create_interaction`**: Log a meeting, call, or chat message with one or more people. * *Log a call I had with Jane Doe this morning about pricing.* * *Record a meeting with the Acme team on January 15th.* * *Log a text message I sent to John Smith confirming our call time.* *** ## Relationship Strengths **`get_person_relationships`**: View which of your teammates know a specific person and how strong each relationship is. * *Who is our warmest connection to Jane Doe?* * *Show me everyone on our team who knows Jane Doe and how well.* **`get_company_relationships`**: View which of your teammates have relationships at a company and how strong they are. * *Who on our team has the strongest connections at Acme?* * *Rank our team by total relationship strength with Acme.* **`get_coworker_connections`**: Find intro paths to a company through former coworkers: people at your organization who worked with people who are now at the company. * *Who on our team used to work with someone at Acme?* * *Find former coworkers who could introduce us to Acme.* **`get_investor_executive_connections`**: Find intro paths to a company through shared portfolio companies: investors at your firm who are connected to the company's executives. * *Which of our investors know Acme's executives through a portfolio company?* **`render_warm_intro_graph`**: Companion app to the warm intro skill. Renders the ranked intro paths as an interactive network graph inside your AI client. * *Show me a visual map of our warmest paths to Jane Doe.* * *Visualize our team's connections at Acme.* *** ## Reminders **`get_reminders`**: See all of your team's reminders. * *Show me all reminders assigned to me.* * *What reminders are due next week?* **`create_reminder`**: Set up a new reminder. * *Set a one-time reminder for Acme on January 1st to request year end financials.* * *Set a recurring reminder to follow up with Jane Smith and assign it to me.* **`update_reminder`**: Update an existing reminder's details. * *Change the due date on my Acme reminder to next Friday.* * *Reassign the follow-up reminder for Jane Smith to John.* **`delete_reminder`**: Delete an existing reminder. * *Delete the reminder I set for Acme.* * *Remove the follow-up reminder for Jane Smith.* *** ## Transcripts **`get_transcript_fragments`**: Retrieve dialogue fragments of your team's meeting transcripts. * *Show me the transcript for the meeting we had with Acme last week.* * *Extract financial data from the transcript to update the various fields we have on our pipeline list.* *** ## Skills Skills are guided workflows for longer tasks. Your AI assistant follows the skill's steps and uses many of the tools above to complete the task. Some AI clients also let you start a skill directly, for example as a slash command. **`market_map_generator`**: Build an investment thesis market map: find the companies in Affinity that match a thesis, score each one for fit, and show the result with the `render_market_map` app. * *Build a market map for vertical SaaS in healthcare.* * *What does our pipeline look like for AI infrastructure?* **`warm_intro`**: Find the warmest intro paths to a person or company from your team's relationship data, and draft the intro request. * *Who can introduce me to Jane Doe?* * *Find me a warm intro to someone at Acme.* **`affinity_meeting_prep`**: Prepare a brief before a meeting about the people and companies you will meet: your team's relationships with them, recent notes and transcripts, and where they are in your pipeline. It only reads data. * *Prep me for my meeting with Acme tomorrow.* * *Brief me on Jane Doe before our call.* **`affinity_data_migration`**: Import or move companies, people, or opportunities into Affinity from another CRM, a CSV file, or a spreadsheet, and prepare the file for Affinity's importer. * *Help me move our deals from our old CRM into Affinity.* * *Clean up this CSV so I can import it into Affinity.* **`affinity_event_setup`**: Set up event tracking in Affinity: attendance fields, attendee lists, sourcing attendees from your relationships, and follow-up after the event. * *Set up tracking for our annual LP summit.* * *Update the attendance status for last week's conference from this list.* *** ## Other **`get_current_user`**: Check who you're authenticated as and verify your connection. * *Who am I authenticated as in Affinity?* * *Verify my MCP connection is working.* **`get_users`**: List the members of your Affinity team. * *Who is on our Affinity team?* * *Find the user account for Jane Smith on our team.* **`send_feedback`**: Submit feedback about a missing capability or limitation directly to Affinity. * *I can't do what I need. Can you report this to Affinity?* * *Submit feedback that there's no way to filter companies by location.* # ChatGPT Source: https://developer.affinity.co/pages/mcp/chatgpt Connect ChatGPT to the Affinity MCP Server via the published Affinity app ## Supported ChatGPT surfaces This guide covers ChatGPT on **web** (chat.openai.com), the **desktop apps** (macOS / Windows), and the **iOS / Android** apps. All use the same underlying account configuration. The Affinity app is **not supported** in the [OpenAI API](https://platform.openai.com/) or via custom GPTs. Those are different products. This guide is for the ChatGPT consumer / team / enterprise product specifically. For more information on how apps work in ChatGPT, see OpenAI's [Apps in ChatGPT](https://help.openai.com/en/articles/11487775-apps-in-chatgpt) help article. ## Prerequisites **Affinity** * **Plan**: Scale, Advanced, or Enterprise (required for API and MCP access). * **Admin setup**: None required by default. If an Affinity admin has disabled ChatGPT under **Settings → Affinity MCP**, ask them to re-enable it. **ChatGPT** * **Plan**: Any plan, Free and up. * **Admin setup**: None. The Affinity app is published in the ChatGPT app directory, so developer mode is not required. ## Connect the Affinity app 1. In ChatGPT, open **Apps** from the left nav. 2. Search for **Affinity** and select the matching result. 3. On the app page, click **Connect**. Optionally enable **Reference memories and chats**, then click **Sign in with Affinity** to start the OAuth flow. 4. Once connected, click **Start chat** to open a new chat with the Affinity app attached. For details on what permissions Affinity requests and how to manage authorized clients, see [Authentication](/pages/mcp/authentication#oauth-recommended). ## Using the Affinity app in future chats In any new chat, you can invoke Affinity in two ways: * **Implicitly**: reference *"in Affinity"* in your prompt and ChatGPT will pick the appropriate tools. * **Explicitly**: click the **+** button, choose **More**, and select the **Affinity** app. ## Reconnecting If you need to re-authenticate: 1. Go to **Apps** and search for **Affinity**. 2. Click the matching result, then click the **gear icon** → **Disconnect**. 3. Click **Connect** to start a fresh OAuth flow. ## Test your connection Once connected, try one of these prompts in ChatGPT: * *Find 3 companies I emailed in the last 30 days in Affinity.* * *Show me my upcoming meetings in Affinity.* * *Summarize recent activity on Acme Corp in Affinity.* If you see Affinity data in the response, you're set. If not, see [Troubleshooting](/pages/mcp/troubleshooting). # Claude Source: https://developer.affinity.co/pages/mcp/claude Connect Claude Desktop, Claude Web, or Claude Code to the Affinity MCP Server ## Supported Claude surfaces | Surface | Best for | Auth | Setup | | - | - | - | - | | **Claude Desktop** | Daily research and analysis on your laptop | OAuth | App settings → Connectors | | **Claude Web** (claude.ai) | Shared chats from any browser; mirrors Desktop config | OAuth | Same as Desktop | | **Claude Code** (CLI) | Developers wanting CRM access from the terminal | OAuth or API key | `claude mcp add` | Claude on iOS and Android picks up connectors configured on Claude Web for the same account. ## Prerequisites **Affinity** * **Plan**: Scale, Advanced, or Enterprise (required for API and MCP access). * **Admin setup**: None required by default. If an Affinity admin has disabled Claude under **Settings → Affinity MCP**, ask them to re-enable it. **Claude** * **Plan**: The Affinity connector (remote MCP) is available on **Free**, **Pro**, **Max**, **Team**, and **Enterprise**. * **Admin setup**: * On **Team** and **Enterprise**, only **workspace Owners** can enable the Affinity connector for the organization. Once enabled, every user authenticates themselves. * On **Free**, **Pro**, and **Max**, each user adds the connector themselves (no admin step). ## Claude Desktop & Web Affinity is listed in [Claude's connector directory](https://claude.ai/directory/connectors/affinity). ### Admin: Enable the Connector (Team & Enterprise) A workspace Owner only needs to do this once for the entire org. > [!NOTE] > > **Not an admin?** Send this to your workspace Owner: "We want to use Affinity inside Claude. Can you add the Affinity connector to our team under Organization settings → Connectors? It's listed in Claude's connector directory. Once you add it, every user authenticates themselves once." 1. In **Organization settings** → **Connectors**, click **Browse connectors** and search for **Affinity**, or open the [Affinity connector](https://claude.ai/directory/connectors/affinity) directly. 2. Select the Affinity connector and click **Add to your team**. The connector is now available to all users on the plan. Adding the connector makes it available to your team, but it doesn't grant anyone access on its own: each user still authenticates individually (see [Connect and Authorize](#user-connect-and-authorize) below). #### Limit Affinity to read-only (optional) Owners can cap what the connector is allowed to do for the whole organization. Open the Affinity connector, go to the **Configuration** tab, and use **Tool permission restrictions**. Each tool can be set to **Always allow**, **Ask**, or **Block**, and the tools are grouped into **Read-only tools** and **Write/delete tools**. > [!NOTE] > > Tool permission restrictions apply to Affinity in **Claude.ai**, **Claude Desktop**, and **Claude Code on the web**. They do **not** apply to **Claude Code CLI**, Desktop Extensions, or the Claude API, which are controlled separately. ### User: Add the Connector (Free, Pro, Max) On individual plans there is no admin step: each user adds the connector themselves. 1. In **Settings** → **Connectors**, browse the connector directory and search for **Affinity**, or open the [Affinity connector](https://claude.ai/directory/connectors/affinity) directly. 2. Select the Affinity connector and click **Add**. ### User: Connect and Authorize Every user authenticates Affinity themselves, regardless of plan. 1. In the left nav bar, click **Customize** → **Connectors**. 2. Find the Affinity connector and click **Connect** to initiate the OAuth flow. 3. Once authenticated, Affinity data is accessible from your Claude conversations. > [!NOTE] > > **Re-authorizing?** Follow the same flow, but first open the Affinity connector and click **Disconnect** in the top right before reconnecting. *** ## Claude Code Each developer registers the server in their own Claude Code install. 1. Run the following command to register the hosted MCP server: ```bash theme={null} claude mcp add --transport http affinity-mcp https://mcp.affinity.co/mcp ``` 2. Open Claude Code and run `/mcp`. 3. Press **Enter** on the `affinity-mcp` server entry. 4. Select **Re-authenticate** to initiate the OAuth flow and authorize Affinity in your browser. 5. Once authenticated, you can use the `affinity-mcp` server in your Claude Code conversations. *** ## Claude Code - API Key Setup Use this if you can't complete a browser OAuth flow (e.g. headless environments, CI). Generate an API key first. See [Authentication](/pages/mcp/authentication#api-key) for steps. ```bash theme={null} claude mcp add --transport http affinity-mcp https://mcp.affinity.co/mcp \ --header "Authorization: Bearer your_api_key_here" ``` *** ## Test your connection Once authenticated, try one of these in Claude to confirm it's working: * *Find 3 companies I emailed in the last 30 days.* * *Show me my upcoming meetings.* * *Summarize recent activity on Acme Corp.* If you get an answer with Affinity data, you're set. If not, see [Troubleshooting](/pages/mcp/troubleshooting). # Copilot Source: https://developer.affinity.co/pages/mcp/copilot Connect Copilot Studio, Copilot CLI, or Copilot in VS Code to the Affinity MCP Server ## Supported surfaces | Surface | Auth | Notes | | - | - | - | | **Copilot Studio** | OAuth (recommended) or API key | OAuth via certified connector; API key via MCP wizard | | **Copilot CLI** | API key | Configured per developer | | **Copilot in VS Code** | API key | Configured per developer or at workspace level | The following surfaces do **not currently support remote MCP servers**: * Copilot chat on **github.com** and **copilot.com** * The GitHub **mobile** apps > [!NOTE] > > **Why are those surfaces unsupported?** Remote MCP currently requires HTTP custom-header support, which Copilot chat on github.com / copilot.com and the GitHub mobile apps don't yet expose. Microsoft / GitHub may add this later; check their changelog. > [!NOTE] > > **An Affinity Agent is coming to the Agent Store soon for a more streamlined setup.** > [!NOTE] > > **UI rendering is not yet supported on Copilot surfaces.** Copilot Studio, Copilot CLI, and Copilot in VS Code do not render UI components returned by MCP tools (such as interactive graphs, market maps, or visual outputs). Tool results that include rendered HTML or UI will be returned as plain text or raw data. Use a surface that supports full MCP rendering if your workflow depends on visual tool outputs. ## Prerequisites **Affinity** * **Plan**: Scale, Advanced, or Enterprise (required for API and MCP access). * **Admin setup**: None required by default. If an Affinity admin has disabled Copilot under **Settings → Affinity MCP**, ask them to re-enable it. **Microsoft Copilot Studio** * **Certified connector**: The Affinity MCP connector is available in the [Microsoft Learn connector reference](https://learn.microsoft.com/en-us/connectors/affinitymcp/). No manual installation is required — search for **Affinity MCP** directly in your Power Platform environment. * **License**: A Microsoft Copilot Studio license is required. MCP tools authored in Studio inherit the publisher's licensing for end users. * **Microsoft 365 admin access**: Publishing the agent to Microsoft 365 surfaces (Copilot, Teams, Outlook) requires a Microsoft 365 admin to approve it in the Microsoft 365 admin center (**Agents → All agents**). If you aren't an admin, ask one to approve it. See [Approve the agent](#approve-the-agent-microsoft-365-admin). * **Classic experience required**: Copilot Studio's new authoring experience has a known bug with certified connectors — use the classic experience instead. See Step 1 in the OAuth setup below. **GitHub Copilot** (CLI and VS Code) * An active GitHub Copilot subscription (Individual, Business, or Enterprise). * An Affinity API key. See [Authentication](/pages/mcp/authentication#api-key). *** ## Copilot Studio — OAuth (Recommended) The Affinity MCP connector is available as a certified connector in the Microsoft Power Platform catalog. OAuth authentication is handled via your Affinity account — no API key required. Setup is performed by the **agent author**. Once added, the tool is available to every user of the agent. ### Step 1: Open Copilot Studio classic experience > [!WARNING] > > **Known limitation — use the classic experience.** Copilot Studio's new authoring experience has a bug with certified (shared) connectors: adding one returns `OperationRequiresUserDefinedApi`. This affects any certified connector, not just Affinity MCP. Until Microsoft fixes this, use the classic experience instead. To report or track the issue, search the [Microsoft Copilot Studio Community](https://community.powerplatform.com/t5/Microsoft-Copilot-Studio/ct-p/PVAForums) or contact Microsoft Support. 1. Go to [Copilot Studio](https://copilotstudio.microsoft.com) and open the **...** menu at the bottom of the left sidebar. ![Copilot Studio sidebar ... menu showing Open classic experience option](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-classic-menu.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=7c718a27f0a4f0bec41795d463d9a959) The ... menu in Copilot Studio with Open classic experience highlighted. 2. Select **Open classic experience**. ![Copilot Studio classic experience showing What would you like to build?](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-classic-home.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=af7f6a25389142ac6ecd3426ea1db38f) The Copilot Studio classic experience home page. ### Step 2: Create an agent 1. Click **Agents** in the left sidebar. ![Copilot Studio classic experience with Agents highlighted in the left sidebar](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-classic-agents.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=4f53c257ade701f6cdf7e36b07f61431) The Agents section in the Copilot Studio classic experience left sidebar. 2. Click **Create blank agent**. ![Agents page in Copilot Studio classic experience showing Create blank agent button](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-classic-create-blank.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=9725e51faad8b20131623afac2b12013) The Agents page with the Create blank agent button. 3. Give the agent a name and description, then click **Create**. Suggested values: * **Name**: `Affinity` * **Description**: `Custom agent that connects Affinity to Copilot` ![Copilot Studio classic experience agent overview showing Affinity - agent with status Ready](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-classic-agent-created.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=2c4db0a6c42c79457ac2ff74b57026b7) The agent overview page after creation, showing the agent is ready. ### Step 3: Add the Affinity MCP tool 1. Click the **Tools** tab in the top navigation. ![Agent overview showing the Tools tab in the top navigation bar](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-classic-tools-tab.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=0e7b2cb318a31fe8234723abdf4ca779) The agent overview page with the Tools tab in the top navigation. 2. Click **+ Add a tool**. ![Tools tab showing Create your first tool empty state with Add a tool button](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-classic-add-tool.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=4d87bf1887a228b1bdd1fb329c9f5dba) The Tools tab empty state with the Add a tool button. 3. In the tool catalog, search for **Affinity MCP** and select **Invoke MCP Server** under **Model Context Protocol**. ![Add tool dialog showing Affinity MCP search results with Invoke MCP Server under Model Context Protocol](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-classic-search-affinity.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=ae3694bb97ca4f8edc3e3819df15ad7d) Searching for Affinity MCP in the tool catalog showing Invoke MCP Server under Model Context Protocol. ### Step 4: Select your connection A **Select a connection** dialog appears showing the Affinity MCP connector. 1. If you already have an active Affinity connection, select it from the dropdown and skip to step 3. 2. If not, click **Create new connection**. You will be redirected to Affinity — sign in with your Affinity credentials, review the requested permissions, and click **Allow**. See [Authentication](/pages/mcp/authentication#oauth-recommended) for details on the consent screen. ![Add tool dialog in Copilot Studio showing Not connected state with Create new connection option](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-select-connection.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=c71659cc5fd07d81794c23bd24dceb47) The Add tool dialog showing no existing connections and the Create new connection option. 3. After authorizing, you are redirected back to Copilot Studio. The connection appears with a green checkmark. Click **Add** to attach the tool to your agent. ![Add tool dialog showing Affinity - demo - connection with green checkmark and Add button](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-add-connected.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=35b3bd2bdbfb113d88fa7f9bb8f3252d) The Add tool dialog after a successful connection, ready to click Add. > [!NOTE] > > **Keep Credentials set to End user.** After adding the tool, open its settings and confirm **Credentials to use** is set to **End user credentials** (not Maker-provided). This ensures each person who uses the agent signs in with their own Affinity account. If you set it to Maker and publish the agent org-wide, all users will read and write Affinity data as you. ![Copilot Studio tool details showing Credentials to use dropdown with End user credentials selected and Maker-provided credentials as the alternative](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-credentials-end-user.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=e9de16422d0bab4d02e66d3877d64298) The tool's Additional details panel showing Credentials to use set to End user credentials. ### Step 5: Test your connection In the **Test your agent** panel, type a prompt such as: * *who am i?* * *Find 3 companies I emailed in the last 30 days.* * *Show me my upcoming meetings.* If Affinity data comes back, your agent is connected and working. ![Copilot Studio Test your agent panel showing who am i query returning Affinity user data](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-test-agent.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=48ee484764002b052aafd3ae5594f9ca) The Test your agent panel showing a successful Affinity MCP response. *** ## Publish your Copilot Studio agent to Microsoft 365 Once your agent is built and tested, you can publish it so it appears in Microsoft 365 Copilot (Teams, Outlook, and the Microsoft 365 app) for you and your organization. ### Step 1: Open the Evaluation tab Click the **Evaluation** tab in the agent top navigation. Running an evaluation before publishing is recommended — it lets you verify your agent's responses at scale before rolling it out. ![Copilot Studio Evaluation tab with Create a test set button](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-publish-evaluation-tab.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=7be380cc6a3f2fcc6f107e51fa82039d) The Evaluation tab in Copilot Studio showing the option to create a test set. ### Step 2: Create a test set Click **Create a test set**. The new evaluation page opens with options for data type and data source. ![New evaluation page in Copilot Studio showing Single response data type and data source options](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-publish-new-evaluation.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=4716425ef377d2781e7a67b1a575dc68) The new evaluation page showing data type and data source options. ### Step 3: Select Quick question set Under **More ways to start**, click **Quick question set**. Copilot Studio automatically generates 10 questions based on your agent's description and capabilities. ![New evaluation page showing Quick question set option under More ways to start](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-publish-quick-question-set.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=66af2d0d30ab3f4f3aca7b318f4865b3) The new evaluation page with the Quick question set option highlighted. ### Step 4: Run the evaluation Review the 10 generated test cases. Give the test set a name (e.g. **Evaluate Affinity - agent**) and click **Run**. ![Review your test cases page showing 10 questions about Affinity CRM with Configure test set panel and Run button](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-publish-run-evaluation.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=401c8bd89f6e824a952049e56fcd2eed) The test case review page showing 10 AI-generated questions and the Run button. ### Step 5: Confirm results and publish Once the run completes, review the results. Then click **Publish** in the top-right corner of the agent. ![Evaluation results page showing Pass 10/10 with 100% answer quality score and Publish button in top navigation](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-publish-evaluation-results.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=6e64f2ce3f7cbc812cd6c3bf8a5a9143) The test run results showing 10/10 passing with a 100% answer quality score. ### Submit to your org catalog After publishing, submit the agent for admin approval so it appears org-wide in Microsoft 365. #### Step 1: Go to Channels Click the **Channels** tab in the agent top navigation. ![Copilot Studio Channels tab showing published agent status and Microsoft 365 and Microsoft Teams channel option](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-publish-channels-tab.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=5a730d634e62fa8af6089779dded051a) The Channels tab showing published agent status and available Microsoft channels. #### Step 2: Select Microsoft 365 and Microsoft Teams Click **Microsoft 365 and Microsoft Teams**. A panel opens on the right showing the agent preview and availability options. ![Microsoft 365 and Microsoft Teams channel panel showing agent preview with See agent in Microsoft 365 and See agent in Teams buttons](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-publish-m365-teams-channel.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=b2ba1e62666dc619549bd298b8695656) The Microsoft 365 and Microsoft Teams channel panel showing the Affinity agent preview. #### Step 3: Add the channel Click **Add channel** at the bottom of the panel. A **The channel was added** confirmation appears at the top of the screen. #### Step 4: Open Availability options Click **Availability options** in the agent preview card. ![Microsoft 365 and Microsoft Teams channel panel showing the channel was added confirmation and Availability options button](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-publish-availability-options.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=004518f83bf421bb14e89e2a4cc23946) The Microsoft 365 and Microsoft Teams panel after the channel is added, with Availability options highlighted. #### Step 5: Select Show to everyone in my org Select **Show to everyone in my org**. This submits the agent for admin approval so it appears in the **Built by your org** section of the Microsoft 365 agent store. ![Availability options panel showing Show to my teammates and shared users and Show to everyone in my org options](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-publish-show-to-org.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=dbf45ca3f4250436dee6b333327281a0) The Availability options panel showing Show to everyone in my org. #### Step 6: Submit to org catalog Review the checklist on the **Show in Teams app store for org** screen, then click **Submit to org catalog**. The submission goes to your Microsoft 365 admin for approval before the agent appears org-wide. ![Show in Teams app store for org dialog showing pre-submission checklist and Submit to org catalog button](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-publish-submit-org-catalog.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=52c28801b485bab72822a9632f240460) The Show in Teams app store for org screen with the Submit to org catalog button. ### Approve the agent (Microsoft 365 admin) A Microsoft 365 admin must approve the submission before the agent appears org-wide. Go to [admin.cloud.microsoft](https://admin.cloud.microsoft/) and navigate to **Agents → All agents**. ![Microsoft 365 admin center All agents page showing Affinity - agent listed as Available](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-admin-all-agents.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=14d4d4f10e8e1f90d1e89b5f9f6d4f8d) The All agents page in the Microsoft 365 admin center showing the agent registry. Click the **Requests** tab. The submitted agent appears with state **Pending review**. ![All agents Requests tab showing Affinity - agent with Pending review status and Publish request type](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-admin-requests-tab.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=5176a943a2c0d71bb3ba51660d5407ec) The Requests tab showing the Affinity agent submission pending review. Click the agent row to open its detail panel, then click **Publish to store**. ![Agent detail panel showing Publish to store and Reject submission options with the pending request](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-admin-publish-to-store.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=8e61f075e74e72663e787810091e1369) The agent detail panel showing the Publish to store action. In the **Publish agent to selected users** wizard, choose who can install the agent and who will have it pre-installed. Setting both to **All users** makes the agent available to everyone in the tenant — you can also target a specific group to roll it out more narrowly. Click **Next**. ![Publish agent wizard Select users step showing All users selected for both install and pre-install options](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-admin-select-users.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=0feafb4e1ec1b7f7e5823a4b8c4ff234) The Select users step of the publish wizard with All users selected for install and pre-install. Proceed through **Apply template** and **Accept permissions**, then review the summary on **Review and finish**. ![Review and finish step showing Affinity - agent published to All users with default policy template](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-admin-review-finish.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=8d629bc5ab4e6fe3d665e6cb81e41906) The Review and finish step showing the publish summary before confirming. Click **Publish**. The confirmation screen shows **You published Affinity - agent**. ![You published Affinity - agent confirmation screen showing all steps completed and Done button](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-admin-published.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=e48aa230ab02f948878c1a0dd156eba2) The publish confirmation screen showing the agent was successfully published to all users. ### Verify in Microsoft Teams #### Step 1: Find and open your agent in Microsoft Teams Go to [teams.microsoft.com](https://teams.microsoft.com), click **Agents** in the left sidebar, then click **More agents**. Search for **Affinity** (or the name you gave your agent). The agent appears in the results. ![Microsoft Teams More agents search showing Affinity - agent result built using Microsoft Copilot Studio](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-teams-search-affinity.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=3fe6ed17dbb4fed3322fb7655fa56424) Searching for the Affinity agent in the Microsoft Teams More agents catalog. Click the agent tile and then click **Open** to start a chat with it. ![Affinity - agent tile in Teams showing Open button, works in Teams and Copilot, and permissions overview](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-teams-agent-tile.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=9d4ecb064c71f140cabe3c21586df5ce) The Affinity agent tile showing the Open button and permissions overview. #### Step 2: Test the agent In the chat, try a prompt such as *who am i?* to confirm the agent is connected to Affinity and returning live data. ![Microsoft Teams chat with Affinity - agent showing profile, organization, and access details in response to who am i](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-teams-chat-response.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=1b93a1afe4de4848072c9347f7c1d25b) The Affinity agent in Microsoft Teams responding to 'who am i' with profile and organization data from Affinity. ### Verify in Microsoft Copilot #### Step 1: Open the agent in Microsoft Copilot Go to [copilot.cloud.microsoft](https://copilot.cloud.microsoft). The approved agent appears under **Agents** in the left sidebar. Click it to open the chat. ![Microsoft Copilot sidebar showing Affinity - agent listed under Agents with a message input field](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-m365copilot-agent.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=d7c73ed976d4aa2c97b4f56f9b217f9d) Microsoft Copilot showing the Affinity agent in the left sidebar under Agents. #### Step 2: Test the agent In the chat, try a prompt such as *who am i?* to confirm the agent is connected to Affinity and returning live data. ![Microsoft Copilot chat with Affinity - agent showing profile, organization, and access details in response to who am i](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-m365copilot-chat-response.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=c90a48d70fe9447df1a48a887e27fb56) Microsoft Copilot responding to 'who am i' with profile, organization, and access details from Affinity. *** ## Copilot Studio — API Key Use this path if you prefer not to use the certified connector. Generate an Affinity API key first — see [Authentication](/pages/mcp/authentication#api-key). Setup is performed by the **agent author** using Copilot Studio's MCP onboarding wizard. 1. In [Copilot Studio](https://copilotstudio.microsoft.com), open your agent and go to the **Tools** tab. 2. Click **+ Add a tool**, then select **Add new MCP**. The MCP wizard appears. ![Add tool dialog in Copilot Studio showing Add new MCP option highlighted](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-apikey-add-mcp.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=d798a02c5eac11b7f76a68ef43a69864) The Add tool dialog with the Add new MCP option. 3. Fill in the server details: * **Server name**: `Affinity` * **Server description**: `Use this server to search, read, create, and update records in the user's Affinity CRM, including companies, people, opportunities, lists, fields, notes, meetings, meeting transcripts, and reminders.` * **Server URL**: `https://mcp.affinity.co/mcp` ![MCP server configuration form showing Affinity server name, description, URL, and API key authentication settings](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-apikey-server-form.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=94fd313f96111d85d82b339b6e539d25) The Add a Model Context Protocol server form filled in with Affinity server details. 4. For **Authentication**, select **API key** and set: * **Type**: Header * **Header name**: `Authorization` 5. Click **Create**. On the **Add tool** dialog that appears, click **Create new connection**. ![Add tool dialog for Affinity showing Not connected state with Create new connection option](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-apikey-create-connection.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=567ffef9ec9ba3f878ce24e67a1ea936) The Add tool dialog prompting to create a new connection. 6. When prompted, enter the full bearer token including the `Bearer ` prefix as the API key value: ``` Bearer your_api_key_here ``` ![Connect to Affinity dialog with display name and API key credential fields](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-apikey-connect-form.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=ef0ba4efaf9d4e4e8fb25acab5f330f8) The Connect to Affinity dialog prompting for the API key credential. 7. Click **Create**, then click **Add** to finish. ![Add tool dialog showing Affinity custom connection with green checkmark and Add button](https://mintcdn.com/affinityco/PsztO_1y8sPkPH-U/images/copilot-apikey-add-connected.png?fit=max\&auto=format\&n=PsztO_1y8sPkPH-U\&q=85\&s=5efbe1f5dbe9d05c2b429f08d5ab930b) The Add tool dialog with the connection established and ready to add to the agent. *** ## Copilot CLI Configure per developer. 1. Once Copilot is started, run **/mcp add** and enter the configuration below: * **Server Name**: `affinity-mcp` * **Server Type**: HTTP (option 3) * **Remote server URL**: `https://mcp.affinity.co/mcp` * **HTTP Headers**: `{"Authorization": "Bearer your_api_key_here"}` * **Tools**: `*` 2. Press CTRL + S to save. Running **/mcp show** should show the newly added MCP server. *** ## Copilot in VS Code Configure per developer (or commit to the workspace). 1. Open the Command Palette (CMD/CTRL + Shift + P) and select **MCP: Add Server**. 2. When prompted for type, select **HTTP (HTTP or Server-Sent Events)**. 3. When prompted for a URL, enter `https://mcp.affinity.co/mcp`. 4. When prompted for the name of the server, enter `affinity-mcp`. 5. Open `mcp.json` and add a `headers` section with your API key: ```json theme={null} { "servers": { "affinity-mcp": { "url": "https://mcp.affinity.co/mcp", "type": "http", "headers": { "Authorization": "Bearer your_api_key_here" } } }, "inputs": [] } ``` *** ## Test your connection Once configured, try one of these in your Copilot chat: * *Find 3 companies I emailed in the last 30 days.* * *Show me my upcoming meetings.* * *Summarize recent activity on Acme Corp.* If you get Affinity data, you're set. If not, see [Troubleshooting](/pages/mcp/troubleshooting). # Gemini Source: https://developer.affinity.co/pages/mcp/gemini Connect Gemini to the Affinity MCP Server ## Supported Gemini surfaces This guide applies to **Gemini CLI**, Google's command-line tool for developers. **Gemini on the web** (gemini.google.com), the **Gemini mobile apps**, and Gemini in **Google Workspace** apps do **not currently support MCP**. They run in environments that don't yet support custom MCP server connections; only the Gemini CLI can launch MCP processes. No configuration will make MCP work on those surfaces. Watch the Gemini changelog for changes. ## Prerequisites **Affinity** * **Plan**: Scale, Advanced, or Enterprise (required for API and MCP access). * **API key**: Generate one first. See [Authentication](/pages/mcp/authentication#api-key). Gemini does not currently support OAuth with Affinity. * **Admin setup**: None required by default. If an Affinity admin has disabled Gemini under **Settings → Affinity MCP**, ask them to re-enable it. **Gemini** * **Plan**: A Google account with Gemini CLI access. Each developer configures their own CLI install. * **Admin setup**: None. > [!TIP] > > **Get an Affinity API key in 3 steps**: In Affinity, go to **Settings → Manage Apps → API Keys → Create new key**. Copy the key immediately — you won't see it again. Name it something memorable (e.g., "Gemini MCP"). ## Setup Run the following command in Gemini CLI with your API key filled in: ```bash theme={null} gemini mcp add --transport http \ --header "Authorization: Bearer your_api_key_here" \ affinity-mcp https://mcp.affinity.co/mcp ``` *** ## Test your connection Once configured, try one of these in Gemini CLI: * *Find 3 companies I emailed in the last 30 days.* * *Show me my upcoming meetings.* * *Summarize recent activity on Acme Corp.* If Affinity data comes back, you're set. If not, see [Troubleshooting](/pages/mcp/troubleshooting). # Introduction Source: https://developer.affinity.co/pages/mcp/introduction Connect your AI assistant to Affinity with the MCP Server # Affinity MCP Server > [!NOTE] > > **Affinity plan required:** MCP access is available on **Scale**, **Advanced**, and **Enterprise** plans. To check your tier, go to **Settings → Billing & Plans** in Affinity, or ask your account admin. Ask your AI assistant questions about your pipeline, relationships, and meetings, and get answers directly from Affinity, without leaving your chat interface. ## How it works The Affinity MCP Server implements the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/), an open standard for connecting AI assistants to external data sources. Once configured, your AI client communicates with the MCP server, which securely fetches live data from the Affinity API on your behalf. ## What you can do > [card] Relationship intelligence > > Find companies or people you haven't been in touch with recently, surface new contacts, and see who on your team has the strongest relationship with a prospect. > [card] Pipeline management > > Search and summarize opportunities, pull up list entries, field data, and saved views. Create new lists, opportunities, and list entries straight from chat. > [card] Meetings and activity > > Review upcoming and past meetings with any contact or company, and get a summary of recent interactions with a prospect. > [card] Notes and capture > > Create notes against any person, company, or opportunity from your AI chat, and retrieve or search existing notes by creator or date. > [card] Field updates > > Update field values on any entity or list entry, define new fields, and review field value history without leaving your AI chat. > [card] Reminders > > Manage follow-up reminders for contacts and companies so nothing falls through the cracks. ## Example prompts Once connected, try asking your AI assistant: * *Find all companies I first emailed in Q1 2024.* * *Show me people I haven't spoken to since last year.* * *List all my upcoming meetings with VCs next week.* * *Who are the new people we met in the last 30 days?* * *Summarize the notes on Acme from this quarter.* * *Which opportunities in my pipeline haven't been updated recently?* * *Create a note on Acme summarizing our call today: we discussed partnership terms and next steps.* * *Add Acme to our address book and create an opportunity for them on the Series A Pipeline.* * *Update the Stage field on the Acme deal to "Due Diligence".* * *Set a reminder to follow up with Jane Smith in two weeks.* * *Who on my team has the strongest relationship with the partners at Benchmark?* * *What were the key discussion points from my last call with Acme?* * *Find AI infrastructure companies in our network.* ## Next steps > [card] [Supported Clients](/pages/mcp/supported-clients) > > See which AI clients work with Affinity and pick your setup path > [card] [Available Tools](/pages/mcp/available-tools) > > Browse all tools exposed by the MCP server # Local MCP Source: https://developer.affinity.co/pages/mcp/local-setup Run the Affinity MCP server locally using STDIO ## Prerequisites * An Affinity account with API access (Scale, Advanced, or Enterprise) * An MCP-compatible AI assistant (e.g., Claude Desktop, Copilot, Gemini CLI) * An Affinity API key. See the [Authentication](/pages/mcp/authentication) page for help obtaining one * [UV](https://docs.astral.sh/uv/getting-started/installation/) Python package manager > [!NOTE] > > **Switching to the hosted MCP server?** If you currently run Affinity locally and want to move > to the hosted server, first remove the existing `affinity-mcp` configuration from your AI > client (consult your client's documentation for steps), then follow the appropriate guide > under **Setup by Client**. > [tab] Claude CLI > > Run the following command with your API key filled in. The `--scope user` flag registers the server for your user account so it's available in all your projects. > > ```bash theme={null} > claude mcp add affinity-mcp \ > --scope user \ > --transport stdio \ > --env AFFINITY_API_KEY=your_api_key_here \ > -- uvx affinity-mcp > ``` > > Omit `--scope user` to register the server for the current project only. > > Verify the server is connected: > > ```bash theme={null} > claude mcp list > ``` > > You should see: > > ``` > affinity-mcp: uvx affinity-mcp - ✓ Connected > ``` > [tab] Claude Desktop > > 1. Go to **File** → **Settings** → **Developer** → **Edit Config** and open `claude_desktop_config.json`. > 2. Run `which uvx` in your terminal and copy the full path it returns. > 3. Add the following to the config, replacing the `command` with the path from the previous step and the API key with your own: > > ```json theme={null} > { > "mcpServers": { > "affinity-mcp": { > "command": "your-uvx-path-here", > "args": ["affinity-mcp"], > "env": { > "AFFINITY_API_KEY": "your_api_key_here" > } > } > } > } > ``` > > 4. Restart Claude Desktop to apply the changes. > [tab] Gemini CLI > > 1. Open `~/.gemini/settings.json`. > 2. Add the server configuration: > > ```json theme={null} > { > "mcpServers": { > "affinity-mcp": { > "command": "uvx", > "args": ["affinity-mcp"], > "env": { > "AFFINITY_API_KEY": "your_api_key_here" > }, > "trust": false > } > } > } > ``` > > 3. Verify with `gemini mcp list` or run `gemini` → `/mcp`. You should see: > > ``` > ✓ affinity-mcp: uvx affinity-mcp (stdio) - Connected > ``` > [tab] Copilot CLI > > 1. **Run Copilot CLI** > > 2. **Add server using /mcp** > > 1. Run **/mcp add** > > 2. Add the server information: > * **Server Name**: `affinity-mcp` > * **Server Type**: STDIO > * **Command**: `uvx affinity-mcp` > * **Environment Variables**: `{"AFFINITY_API_KEY": "your_api_key_here"}` > * **Tools**: `*` > > 3. Press CTRL + S to save. > > 3. **Verify configurations** > > 1. Run **/mcp show** and you should see the server is connected. > 2. Open **\~/.copilot/mcp_config.json** to verify: > > ```json theme={null} > { > "mcpServers": { > "affinity-mcp": { > "tools": [ > "*" > ], > "type": "stdio", > "command": "uvx", > "args": [ > "affinity-mcp" > ], > "env": { > "AFFINITY_API_KEY": "your_api_key_here" > } > } > } > } > ``` > [tab] Copilot (VS Code) > > 1. Open the Command Palette and select **MCP: Add Server…** > 2. Select **Command (stdio)** > 3. Enter: `uvx affinity-mcp` > 4. Choose **affinity-mcp** as the Server ID. > 5. Select **Workspace**. > 6. Open the generated `.vscode/mcp.json` and add your API key to the `env` block: > > ```json theme={null} > { > "inputs": [], > "servers": { > "affinity-mcp": { > "command": "uvx", > "args": ["affinity-mcp"], > "env": { > "AFFINITY_API_KEY": "your_api_key_here" > } > } > } > } > ``` ## OpenTelemetry (Optional) The server supports OpenTelemetry tracing. To export telemetry data to an OTLP-compatible collector, set the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable alongside your API key in your client config. Example: ```json theme={null} "env": { "AFFINITY_API_KEY": "your_api_key_here", "OTEL_EXPORTER_OTLP_ENDPOINT": "http://localhost:4317" } ``` If `OTEL_EXPORTER_OTLP_ENDPOINT` is not set, telemetry export is disabled and the server operates normally without it. ## Other Clients See [MCP Clients](https://modelcontextprotocol.io/clients) for a full list of compatible clients. # Notion Source: https://developer.affinity.co/pages/mcp/notion Connect Notion Custom Agents to the Affinity MCP Server ## Supported Notion surfaces Affinity's MCP server is connected through **Notion Custom Agents**. The default Notion AI assistant (Ask AI, Q\&A, search) does **not** support adding custom MCP servers. Only Custom Agents do. If you don't see an **Agents** section in your sidebar, your plan or workspace settings don't yet include Custom Agents. ## Prerequisites **Affinity** * **Plan**: Scale, Advanced, or Enterprise (required for API and MCP access). * **For API key setup**: Generate an Affinity API key first. See [Authentication](/pages/mcp/authentication#api-key). * **Admin setup**: None required by default. If an Affinity admin has disabled Notion under **Settings → Affinity MCP**, ask them to re-enable it. **Notion** * **Plan**: **Business** or **Enterprise**. Custom Agents and custom MCP servers are only available on these plans. * **Admin setup** (required): A **workspace Owner** must enable custom MCP servers and, if desired, restrict who can create agents. See the next section for steps. Notion supports both **OAuth** and **API key** authentication. ## Admin: Enable Custom MCP Servers A workspace Owner must enable the feature for the workspace before any user can use it. 1. Navigate to **Settings** → **Notion AI** → **AI Connectors**. 2. Under **MCP Connections**, enable the toggle for **Enable custom MCP servers**. 3. Optionally, navigate to **Settings** → **Notion AI** → **Agents** and update **Control who can create agents** to restrict agent creation to certain users. > [!NOTE] > > **Not an admin?** Send this to your workspace Owner: "Can you enable Settings → Notion AI → AI Connectors → Enable custom MCP servers so I can connect to the Affinity MCP server?" ## User: Create an Agent (OAuth) 1. In the left sidebar, find the **Agents** section and click **New Agent**. 2. In the module that appears, click **Create blank** in the top right. 3. In the **Tools and access** section, click **Add connection**. 4. In the **Add connection** module, click **Add custom MCP** in the bottom left. 5. Enter the following configuration: * **MCP server URL**: `https://mcp.affinity.co/mcp` * **Name**: Affinity * **Authentication**: OAuth 6. Click **Connect** to initiate the OAuth flow. Once authorized, click **Save** in the top right. 7. The agent appears under the **Agents** section. Click on it to start chatting and using the MCP server. ## User: Create an Agent (API Key) Generate an Affinity API key first. See [Authentication](/pages/mcp/authentication#api-key). 1. In the left sidebar, find the **Agents** section and click **New Agent**. 2. In the module that appears, click **Create blank** in the top right. 3. In the **Tools and access** section, click **Add connection**. 4. In the **Add connection** module, click **Add custom MCP** in the bottom left. 5. Enter the following configuration: * **MCP server URL**: `https://mcp.affinity.co/mcp` * **Name**: Affinity * **Authentication**: Bearer (set the **Token** field to your API key) 6. Click **Connect**. The MCP server will appear with its available tools. 7. Click **Save** in the top right. The agent appears under the **Agents** section. Click on it to start chatting and using Affinity data. *** ## Test your connection Open the new agent and try one of these: * *Find 3 companies I emailed in the last 30 days.* * *Show me my upcoming meetings.* * *Summarize recent activity on Acme Corp.* If Affinity data comes back, you're set. If not, see [Troubleshooting](/pages/mcp/troubleshooting). # Other Clients Source: https://developer.affinity.co/pages/mcp/other-clients Connect any MCP-compatible tool to the Affinity MCP Server This page is for MCP clients beyond the ones with dedicated guides. If you're using **Claude**, **ChatGPT**, **Copilot**, **Notion**, or **Gemini**, follow the page for that client instead. ## Prerequisites * **Affinity plan**: Scale, Advanced, or Enterprise. * **API key**: Generate one first. See [Authentication](/pages/mcp/authentication#api-key). * **Client requirements**: The client must support connecting to a remote MCP server using an API key (passed as a custom `Authorization` header). ## Setup Any MCP client that supports custom headers can connect to the Affinity hosted MCP server using an API key. Configure your client with: * **Server URL**: `https://mcp.affinity.co/mcp` * **Headers**: `Authorization: Bearer your_api_key_here` The `Authorization` header must use the `Bearer` scheme followed by a single space and your Affinity API key. For example: ``` Authorization: Bearer a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6 ``` Affinity validates the API key on every request and authorizes MCP tool calls using the permissions of the user who issued it. See [Authentication](/pages/mcp/authentication) for help generating an API key. See [MCP Clients](https://modelcontextprotocol.io/clients) for the full list of MCP-compatible tools. # Security Source: https://developer.affinity.co/pages/mcp/security How the Affinity MCP Server protects your data and credentials The Affinity MCP Server is built on the same authentication, permissioning, and data-handling controls as the Affinity API. The MCP layer doesn't add new ways to read or modify data; every request goes through the Affinity API as the authenticated user. For Affinity's broader security and compliance posture (certifications, data residency, incident response, and more), see the [Affinity Trust Center](https://trust.affinity.co/). ## Authentication uses industry-standard protocols Connections to the hosted MCP server are authenticated using: * **OAuth 2.0**: Each end user authorizes Affinity once in their browser and receives an access token scoped to their account. Affinity admins can revoke access for any AI client under **Settings → Affinity MCP** (or per role on Enterprise plans), and end users can disconnect from their AI client at any time. * **API key**: A long-lived Affinity API key passed as a `Bearer` token in the `Authorization` header. API keys can be rotated or revoked at any time under **Settings → Manage Apps**. See [Authentication](/pages/mcp/authentication) for details and management instructions. ## The MCP server does not store sensitive data or secrets The hosted MCP server is stateless. Every tool call is proxied to the Affinity API in real time: * No CRM records, notes, emails, meeting content, or other Affinity data are persisted by the MCP server. * Credentials (API keys and OAuth tokens) are not retained by the MCP server beyond what is required to authenticate the in-flight request. **Affinity does not see your prompts.** The conversation between you and your AI assistant stays between you and the AI provider. The MCP server only receives the structured tool calls your AI client decides to make (for example, `search_companies(query: "fintech")`), not the natural-language prompts you typed. Your prompts and the AI's responses are governed by your AI provider's own data-handling policies. ## API permissions are fully enforced Every MCP tool call executes with the permissions of the authenticating user, the same permissions that apply when they use the Affinity CRM directly: * List access controls, role permissions, and field-level visibility all apply. * Users cannot read records they don't have access to in the CRM, and cannot create or update records they wouldn't be able to update in the CRM. * OAuth users can additionally restrict the connection to **read-only** at consent time by unchecking the write scope, which prevents the AI client from making any changes through MCP. There is no MCP-only privilege escalation. If a user is removed from a list or has their role changed in Affinity, those changes take effect on the next MCP tool call. # Supported Clients Source: https://developer.affinity.co/pages/mcp/supported-clients AI clients that can connect to the Affinity MCP Server, and how to set them up The Affinity MCP Server is compatible with any client that supports the [Model Context Protocol](https://modelcontextprotocol.io/). The clients below have dedicated setup guides. Pick yours to get started. > [!NOTE] > > All clients below require an Affinity **Scale**, **Advanced**, or **Enterprise** plan. Specific AI-client plan and admin requirements are listed at the top of each client's setup page. > [card] [Claude](/pages/mcp/claude) > > Desktop, Web, and Claude Code > [card] [ChatGPT](/pages/mcp/chatgpt) > > Free plan and up > [card] [Copilot](/pages/mcp/copilot) > > Studio, CLI, and VS Code > [card] [Notion](/pages/mcp/notion) > > Notion Custom Agents > [card] [Gemini](/pages/mcp/gemini) > > Gemini CLI (web not supported) > [card] [Other clients](/pages/mcp/other-clients) > > Any MCP-compatible tool ## Don't see your client? Any MCP client that supports custom headers can connect to the hosted server. See [Other clients](/pages/mcp/other-clients) for the generic configuration, or [MCP Clients](https://modelcontextprotocol.io/clients) for the full ecosystem list. # Troubleshooting Source: https://developer.affinity.co/pages/mcp/troubleshooting Diagnose and fix common issues with the Affinity MCP Server ## Viewing server logs If the server isn't working as expected, check the logs first. > [tab] Claude Code (macOS/Linux) > > Logs are written per session to `~/.claude/debug/`. The `latest` symlink always points to the most recent session: > > ```bash theme={null} > tail -n 50 -F ~/.claude/debug/latest > ``` > [tab] Claude Code (Windows) > > Logs are written per session to `%USERPROFILE%\.claude\debug\`. > [tab] Claude Desktop (macOS) > > ```bash theme={null} > tail -n 20 -F ~/Library/Logs/Claude/mcp*.log > ``` > [tab] Claude Desktop (Windows) > > Logs are located at `%APPDATA%\Roaming\Claude\logs`. > [tab] ChatGPT > > ChatGPT does not expose MCP server logs directly. If Affinity tools aren't appearing or calls > are failing, try these steps: > > 1. Open **Settings** → **Apps** and check that the Affinity app shows a connected status. > 2. If the app shows an error or is disconnected, click the app and press **Disconnect**, then > reconnect and reauthorize. > 3. Verify the **MCP Server URL** is set to `https://mcp.affinity.co/mcp`. > 4. If the issue persists, delete the app and recreate it following the setup guide. *** ## Common issues > [accordion] "Authentication failed" or 401 errors > > **Cause:** The `AFFINITY_API_KEY` is missing, invalid, or has extra spaces or quotes around it. > > **Fix:** Double-check the environment variable value in your client config. The key should be a plain string with no surrounding quotes or whitespace. > [accordion] API key shown as 'invalid' or returning 401 errors > > * Confirm you copied the full key, including any trailing characters. > * Confirm the `Authorization` header uses the exact format `Bearer ` (one space, no quotes around the value). > * In **Affinity → Settings → Manage Apps**, verify the key hasn't been rotated or revoked. > [accordion] "Connection refused" or timeout errors > > **Cause:** The server cannot reach `api.affinity.co`. > > **Fix:** > > * Check your internet connection. > * If you're on a corporate VPN, ensure it allows traffic to Affinity's API. > [accordion] "Tool not found" errors > > **Cause:** The MCP server may have crashed or failed to start. > > **Fix:** Check the logs for startup errors. > [accordion] My AI client doesn't see the Affinity tool > > * Refresh / restart the AI client (some clients only refresh the tool list on startup). > * In the client, verify the MCP server status is "connected" or "healthy". > * For Copilot CLI, run `/mcp show`. For Claude Code, run `/mcp`. > [accordion] OAuth flow returned 'unauthorized' or 'access denied' > > Most common cause: your Affinity admin has disabled the AI client you're connecting from, or your plan doesn't include MCP access. > > * In Affinity, go to **Settings → Affinity MCP** and confirm your client is enabled. > * Confirm your plan is **Scale**, **Advanced**, or **Enterprise**. > * Affinity may not support OAuth for the AI client you're using. Check > [Supported Clients](/pages/mcp/supported-clients) to see which auth methods are available > for your client, and use API key auth if OAuth isn't supported. > * If all of the above check out, disconnect the AI client and re-authenticate from scratch. > [accordion] OAuth works but tool calls return permission errors > > MCP tool calls run with your Affinity user's permissions. If you can't read a list or create a note in Affinity directly, MCP can't either. Ask your admin to grant the needed list / role access. > [accordion] `get_meetings` returns an access error > > **Cause:** Your organization hasn't been onboarded to Affinity's unified events feature, which is required for the meetings API. > > **Fix:** Contact your Affinity CSM to request access. *** ## Debugging with MCP Inspector You can use the MCP Inspector to test tools and debug the server interactively in your browser. The inspector lets you list available tools, call them with custom arguments, and inspect responses. Useful for verifying the server is working before connecting a full AI client. > [tab] Local server > > ```bash theme={null} > npx @modelcontextprotocol/inspector uvx affinity-mcp > ``` > > Set the `AFFINITY_API_KEY` environment variable before running, or pass it inline: > > ```bash theme={null} > AFFINITY_API_KEY=your_api_key_here npx @modelcontextprotocol/inspector uvx affinity-mcp > ``` > [tab] Hosted server > > ```bash theme={null} > npx @modelcontextprotocol/inspector > ``` > > In the Inspector UI, set the transport to **HTTP** and enter the server URL: > > ``` > https://mcp.affinity.co/mcp > ``` > > Add an `Authorization` header with your API key: > > ``` > Authorization: Bearer your_api_key_here > ```