{ "components": { "examples": { "ai-notetaker": { "description": "Example response for AI Notetaker notes.", "value": { "data": [ { "content": { "html": "

This is an AI Notetaker note!

" }, "createdAt": "2023-01-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 1, "mentions": [], "type": "ai-notetaker", "updatedAt": "2023-01-21T00:00:00Z" }, { "content": { "html": "

This is another AI Notetaker note!

" }, "createdAt": "2024-01-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 2, "mentions": [], "type": "ai-notetaker", "updatedAt": "2024-01-21T00:00:00Z" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/notes?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/notes?cursor=ICAgICAgYmVmb3JlOjo6Nw" } }, "x-stability-level": "beta" }, "ai-notetaker-2": { "description": "Example response for an AI Notetaker note.", "value": { "content": { "html": "

This is an AI Notetaker note!

" }, "createdAt": "2023-01-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 1, "mentions": [], "type": "ai-notetaker", "updatedAt": "2023-01-21T00:00:00Z" }, "x-stability-level": "beta" }, "ai-notetaker-3": { "value": { "data": [ { "content": { "html": "

test

%

" }, "createdAt": "2023-01-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 1, "mentions": [ { "id": 1, "person": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "type": "person" } ], "permissions": { "owner": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "sharingType": "private" }, "type": "ai-notetaker", "updatedAt": "2023-01-01T00:00:00Z" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/persons/1/notes?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/persons/1/notes?cursor=ICAgICAgYmVmb3JlOjo6Nw" } }, "x-stability-level": "beta" }, "ai-notetaker-reply": { "description": "Example response for an AI Notetaker note reply.", "value": { "content": { "html": "

This is an AI Notetaker reply note!

" }, "createdAt": "2023-01-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 2, "mentions": [], "parent": { "id": 1 }, "type": "ai-notetaker-reply", "updatedAt": "2023-01-21T00:00:00Z" }, "x-stability-level": "beta" }, "ai-notetaker-reply-2": { "value": { "data": [ { "content": { "html": "

This is an AI Notetaker reply note. John Doe was mentioned.

" }, "createdAt": "2023-01-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 2, "mentions": [ { "id": 1, "person": { "firstName": "John", "id": 1, "lastName": "Doe", "primaryEmailAddress": "john.doe@acme.co", "type": "internal" }, "type": "person" } ], "parent": { "id": 1 }, "type": "ai-notetaker-reply", "updatedAt": "2023-02-01T00:00:00Z" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/notes/1/notes?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/notes/1/replies?cursor=ICAgICAgYmVmb3JlOjo6Nw" } }, "x-stability-level": "beta" }, "company": { "description": "Example response on a field with a company value.", "value": { "enrichmentSource": null, "id": "field-1", "name": "Field with company value", "type": "list", "value": { "data": { "domain": "acme.co", "id": 1, "name": "Acme" }, "type": "company" } } }, "company-2": { "description": "Example response on a field with a company value.", "value": { "value": { "data": { "id": 1 }, "type": "company" } } }, "company-list": { "description": "Example Company list.", "value": { "creatorId": 1, "id": 1, "isPublic": false, "name": "My Companies", "ownerId": 1, "type": "company" } }, "company-list-2": { "description": "Example response on a Company list.", "value": { "data": [ { "enrichmentSource": "affinity-data", "id": "affinity-data-description", "name": "Description", "type": "enriched", "valueType": "text" }, { "enrichmentSource": "affinity-data", "id": "affinity-data-industry", "name": "Industry", "type": "enriched", "valueType": "filterable-text-multi" }, { "enrichmentSource": "affinity-data", "id": "affinity-data-investment-stage", "name": "Investment Stage", "type": "enriched", "valueType": "filterable-text" }, { "enrichmentSource": "affinity-data", "id": "affinity-data-investors", "name": "Investors", "type": "enriched", "valueType": "filterable-text-multi" }, { "enrichmentSource": "affinity-data", "id": "affinity-data-last-funding-amount", "name": "Last Funding Amount (USD)", "type": "enriched", "valueType": "number" }, { "enrichmentSource": "affinity-data", "id": "affinity-data-last-funding-date", "name": "Last Funding Date", "type": "enriched", "valueType": "datetime" }, { "enrichmentSource": "affinity-data", "id": "affinity-data-linkedin-url", "name": "LinkedIn URL", "type": "enriched", "valueType": "text" }, { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "valueType": "location" }, { "enrichmentSource": "affinity-data", "id": "affinity-data-number-of-employees", "name": "Number of Employees", "type": "enriched", "valueType": "number" }, { "enrichmentSource": "affinity-data", "id": "affinity-data-total-funding-amount", "name": "Total Funding Amount (USD)", "type": "enriched", "valueType": "number" }, { "enrichmentSource": "affinity-data", "id": "affinity-data-year-founded", "name": "Year Founded", "type": "enriched", "valueType": "number" }, { "enrichmentSource": null, "id": "field-1", "name": "Custom global field", "type": "global", "valueType": "text" }, { "enrichmentSource": null, "id": "field-2", "name": "Custom list field", "type": "list", "valueType": "text" }, { "enrichmentSource": null, "id": "first-chat-message", "name": "First Chat Message", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "first-email", "name": "First Email", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "first-event", "name": "First Event", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "last-chat-message", "name": "Last Chat Message", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "last-contact", "name": "Last Contact", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "last-email", "name": "Last Email", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "last-event", "name": "Last Event", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "next-event", "name": "Next Event", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "source-of-introduction", "name": "Source of Introduction", "type": "relationship-intelligence", "valueType": "person" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/lists/1/fields?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/lists/1/fields?cursor=ICAgICAgYmVmb3JlOjo6Nw" } } }, "company-list-enriched": { "description": "Example response on a Company list using `fieldTypes=enriched`.", "value": { "data": [ { "createdAt": "2023-01-01T00:00:00Z", "creatorId": 1, "entity": { "domain": "acme.co", "domains": [ "acme.co" ], "fields": [ { "enrichmentSource": "affinity-data", "id": "affinity-data-description", "name": "Description", "type": "enriched", "value": { "data": "Acme is a mega-corporation that manufactures everything from anvils to earthquake pills.", "type": "text" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-industry", "name": "Industry", "type": "enriched", "value": { "data": [ "Aerospace", "Construction", "Consumer Goods" ], "type": "filterable-text-multi" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-investment-stage", "name": "Investment Stage", "type": "enriched", "value": { "data": "Public Markets", "type": "filterable-text" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-investors", "name": "Investors", "type": "enriched", "value": { "data": [ "Marvin Acme", "Yosemite Sam" ], "type": "filterable-text-multi" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-last-funding-amount", "name": "Last Funding Amount (USD)", "type": "enriched", "value": { "data": 100000000, "type": "number" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-last-funding-date", "name": "Last Funding Date", "type": "enriched", "value": { "data": "2023-01-01T00:00:00Z", "type": "datetime" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-linkedin-url", "name": "LinkedIn URL", "type": "enriched", "value": { "data": "https://linkedin.com/company/acme", "type": "text" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "Fairfield", "continent": null, "country": "United States", "state": "New Jersey", "streetAddress": null }, "type": "location" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-number-of-employees", "name": "Number of Employees", "type": "enriched", "value": { "data": 3990, "type": "number" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-total-funding-amount", "name": "Total Funding Amount (USD)", "type": "enriched", "value": { "data": 90000000, "type": "number" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-year-founded", "name": "Year Founded", "type": "enriched", "value": { "data": 1952, "type": "number" } } ], "id": 1, "isGlobal": true, "name": "Acme" }, "id": 1, "listId": 1, "type": "company" }, { "createdAt": "2023-01-01T00:00:00Z", "creatorId": 1, "entity": { "domain": "umbrella.co", "domains": [ "umbrella.co" ], "fields": [ { "enrichmentSource": "affinity-data", "id": "affinity-data-description", "name": "Description", "type": "enriched", "value": { "data": "The Umbrella Corporation is a multinational conglomerate with subsidiaries active in a variety of industries.", "type": "text" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-industry", "name": "Industry", "type": "enriched", "value": { "data": [ "Cosmetics", "Chemical", "Consumer Goods", "Food Products", "Machinery Manufacturing", "Pharmaceuticals", "Transportation", "Tourism" ], "type": "filterable-text-multi" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-investment-stage", "name": "Investment Stage", "type": "enriched", "value": { "data": "Public Markets", "type": "filterable-text" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-investors", "name": "Investors", "type": "enriched", "value": { "data": [ "Oswell E. Spencer", "Albert Wesker" ], "type": "filterable-text-multi" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-last-funding-amount", "name": "Last Funding Amount (USD)", "type": "enriched", "value": { "data": 100000000, "type": "number" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-last-funding-date", "name": "Last Funding Date", "type": "enriched", "value": { "data": "2023-01-01T00:00:00Z", "type": "datetime" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-linkedin-url", "name": "LinkedIn URL", "type": "enriched", "value": { "data": "https://linkedin.com/company/umbrella", "type": "text" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "Chicago", "continent": null, "country": "United States", "state": "Illinois", "streetAddress": null }, "type": "location" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-number-of-employees", "name": "Number of Employees", "type": "enriched", "value": { "data": 12000, "type": "number" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-total-funding-amount", "name": "Total Funding Amount (USD)", "type": "enriched", "value": { "data": 60000000, "type": "number" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-year-founded", "name": "Year Founded", "type": "enriched", "value": { "data": 1968, "type": "number" } } ], "id": 2, "isGlobal": true, "name": "Umbrella Corporation" }, "id": 2, "listId": 1, "type": "company" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/lists/1/list-entries?fieldTypes=enriched&cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/lists/1/list-entries?fieldTypes=enriched&cursor=ICAgICAgYmVmb3JlOjo6Nw" } } }, "company-list-enriched-2": { "description": "Example response on a Company list using `fieldTypes=enriched`.", "value": { "createdAt": "2023-01-01T00:00:00Z", "creatorId": 1, "entity": { "domain": "acme.co", "domains": [ "acme.co" ], "fields": [ { "enrichmentSource": "affinity-data", "id": "affinity-data-description", "name": "Description", "type": "enriched", "value": { "data": "Acme is a mega-corporation that manufactures everything from anvils to earthquake pills.", "type": "text" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-industry", "name": "Industry", "type": "enriched", "value": { "data": [ "Aerospace", "Construction", "Consumer Goods" ], "type": "filterable-text-multi" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-investment-stage", "name": "Investment Stage", "type": "enriched", "value": { "data": "Public Markets", "type": "filterable-text" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-investors", "name": "Investors", "type": "enriched", "value": { "data": [ "Marvin Acme", "Yosemite Sam" ], "type": "filterable-text-multi" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-last-funding-amount", "name": "Last Funding Amount (USD)", "type": "enriched", "value": { "data": 100000000, "type": "number" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-last-funding-date", "name": "Last Funding Date", "type": "enriched", "value": { "data": "2023-01-01T00:00:00Z", "type": "datetime" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-linkedin-url", "name": "LinkedIn URL", "type": "enriched", "value": { "data": "https://linkedin.com/company/acme", "type": "text" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "Fairfield", "continent": null, "country": "United States", "state": "New Jersey", "streetAddress": null }, "type": "location" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-number-of-employees", "name": "Number of Employees", "type": "enriched", "value": { "data": 3990, "type": "number" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-total-funding-amount", "name": "Total Funding Amount (USD)", "type": "enriched", "value": { "data": 90000000, "type": "number" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-year-founded", "name": "Year Founded", "type": "enriched", "value": { "data": 1952, "type": "number" } } ], "id": 1, "isGlobal": true, "name": "Acme" }, "id": 1, "listId": 1, "type": "company" } }, "company-list-enriched-3": { "description": "Example response on a Company list using `types=enriched`.", "value": { "data": [ { "enrichmentSource": "affinity-data", "id": "affinity-data-description", "name": "Description", "type": "enriched", "value": { "data": "Acme is a mega-corporation that manufactures everything from anvils to earthquake pills.", "type": "text" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-industry", "name": "Industry", "type": "enriched", "value": { "data": [ "Aerospace", "Construction", "Consumer Goods" ], "type": "filterable-text-multi" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-investment-stage", "name": "Investment Stage", "type": "enriched", "value": { "data": "Public Markets", "type": "filterable-text" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-investors", "name": "Investors", "type": "enriched", "value": { "data": [ "Marvin Acme", "Yosemite Sam" ], "type": "filterable-text-multi" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-last-funding-amount", "name": "Last Funding Amount (USD)", "type": "enriched", "value": { "data": 100000000, "type": "number" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-last-funding-date", "name": "Last Funding Date", "type": "enriched", "value": { "data": "2023-01-01T00:00:00Z", "type": "datetime" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-linkedin-url", "name": "LinkedIn URL", "type": "enriched", "value": { "data": "https://linkedin.com/company/acme", "type": "text" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "Fairfield", "continent": null, "country": "United States", "state": "New Jersey", "streetAddress": null }, "type": "location" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-number-of-employees", "name": "Number of Employees", "type": "enriched", "value": { "data": 3990, "type": "number" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-total-funding-amount", "name": "Total Funding Amount (USD)", "type": "enriched", "value": { "data": 90000000, "type": "number" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-year-founded", "name": "Year Founded", "type": "enriched", "value": { "data": 1952, "type": "number" } } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/lists/1/list-entries?types=enriched&cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/lists/1/list-entries?types=enriched&cursor=ICAgICAgYmVmb3JlOjo6Nw" } } }, "company-list-global-and-list": { "description": "Example response on a Company list using `fieldTypes=global&fieldTypes=list`.", "value": { "data": [ { "createdAt": "2023-01-01T00:00:00Z", "creatorId": 1, "entity": { "domain": "acme.co", "domains": [ "acme.co" ], "fields": [ { "enrichmentSource": null, "id": "field-1", "name": "Global Number Field", "type": "global", "value": { "data": 100, "type": "number" } }, { "enrichmentSource": null, "id": "field-2", "name": "List Number Field", "type": "list", "value": { "data": 200, "type": "number" } } ], "id": 222345350, "isGlobal": true, "name": "Acme" }, "id": 1, "listId": 1, "type": "company" }, { "createdAt": "2023-01-01T00:00:00Z", "creatorId": 1, "entity": { "domain": "umbrella.co", "domains": [ "umbrella.co" ], "fields": [ { "enrichmentSource": null, "id": "field-1", "name": "Global Number Field", "type": "global", "value": { "data": 100, "type": "number" } }, { "enrichmentSource": null, "id": "field-2", "name": "List Number Field", "type": "list", "value": { "data": 200, "type": "number" } } ], "id": 2, "isGlobal": true, "name": "Umbrella Corporation" }, "id": 2, "listId": 1, "type": "company" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/lists/1/list-entries?fieldTypes=global&fieldTypes=list&cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/lists/1/list-entries?fieldTypes=global&fieldTypes=list&cursor=ICAgICAgYmVmb3JlOjo6Nw" } } }, "company-list-global-and-list-2": { "description": "Example response on a Company list using `fieldTypes=global&fieldTypes=list`.", "value": { "createdAt": "2023-01-01T00:00:00Z", "creatorId": 1, "entity": { "domain": "acme.co", "domains": [ "acme.co" ], "fields": [ { "enrichmentSource": null, "id": "field-1", "name": "Global Number Field", "type": "global", "value": { "data": 100, "type": "number" } }, { "enrichmentSource": null, "id": "field-2", "name": "List Number Field", "type": "list", "value": { "data": 200, "type": "number" } } ], "id": 222345350, "isGlobal": true, "name": "Acme" }, "id": 1, "listId": 1, "type": "company" } }, "company-list-global-and-list-3": { "description": "Example response on a Company list using `types=global&fieldTypes=list`.", "value": { "data": [ { "enrichmentSource": null, "id": "field-1", "name": "Global Number Field", "type": "global", "value": { "data": 100, "type": "number" } }, { "enrichmentSource": null, "id": "field-2", "name": "List Number Field", "type": "list", "value": { "data": 200, "type": "number" } } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/lists/1/list-entries/1/fields?types=global&types=list&cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/lists/1/list-entries/1/fields?types=global&types=list&cursor=ICAgICAgYmVmb3JlOjo6Nw" } } }, "company-list-relationship-intelligence": { "description": "Example response on a Company list using `fieldTypes=relationship-intelligence`.", "value": { "data": [ { "createdAt": "2023-01-01T00:00:00Z", "creatorId": 1, "entity": { "domain": "acme.co", "domains": [ "acme.co" ], "fields": [ { "enrichmentSource": null, "id": "first-chat-message", "name": "First Chat Message", "type": "relationship-intelligence", "value": { "data": { "direction": "sent", "id": 1, "manualCreator": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" }, "participants": [ { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" }, { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } ], "sentAt": "2020-01-01T00:00:00Z", "type": "chat-message" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "first-email", "name": "First Email", "type": "relationship-intelligence", "value": { "data": { "cc": [], "from": { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, "id": 1, "sentAt": "2020-01-01T00:00:00Z", "subject": "Defective Products", "to": [ { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "type": "email" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "first-event", "name": "First Event", "type": "relationship-intelligence", "value": { "data": { "allDay": false, "attendees": [ { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "endTime": "2020-01-02T01:00:00Z", "id": 1, "startTime": "2020-01-02T00:00:00Z", "title": "Defective Products", "type": "meeting" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "last-chat-message", "name": "Last Chat Message", "type": "relationship-intelligence", "value": { "data": { "direction": "sent", "id": 2, "manualCreator": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" }, "participants": [ { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" }, { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } ], "sentAt": "2020-01-02T00:00:00Z", "type": "chat-message" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "last-contact", "name": "Last Contact", "type": "relationship-intelligence", "value": { "data": { "cc": [], "from": { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, "id": 2, "sentAt": "2020-02-01T00:00:00Z", "subject": "re: re: re: Defective Products", "to": [ { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "type": "email" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "last-email", "name": "Last Email", "type": "relationship-intelligence", "value": { "data": { "cc": [], "from": { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, "id": 2, "sentAt": "2020-02-01T00:00:00Z", "subject": "re: re: re: Defective Products", "to": [ { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "type": "email" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "last-event", "name": "Last Event", "type": "relationship-intelligence", "value": { "data": { "allDay": false, "attendees": [ { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "endTime": "2020-01-03T01:00:00Z", "id": 2, "startTime": "2020-01-03T00:00:00Z", "title": "re: re: re: Defective Products", "type": "meeting" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "next-event", "name": "Next Event", "type": "relationship-intelligence", "value": { "data": { "allDay": false, "attendees": [ { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "endTime": "2020-02-03T01:00:00Z", "id": 3, "startTime": "2020-02-03T00:00:00Z", "title": "re: re: re: re: Defective Products", "type": "meeting" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "source-of-introduction", "name": "Source of Introduction", "type": "relationship-intelligence", "value": { "data": { "firstName": "Yosemite", "id": 3, "lastName": "Sam", "primaryEmailAddress": "yosemite@sam.com", "type": "internal" }, "type": "person" } } ], "id": 1, "isGlobal": true, "name": "Acme" }, "id": 1, "listId": 1, "type": "company" }, { "createdAt": "2023-01-01T00:00:00Z", "creatorId": 1, "entity": { "domain": "umbrella.co", "domains": [ "umbrella.co" ], "fields": [ { "enrichmentSource": null, "id": "first-chat-message", "name": "First Chat Message", "type": "relationship-intelligence", "value": { "data": { "direction": "sent", "id": 3, "manualCreator": { "firstName": "Leon S", "id": 4, "lastName": "Kennedy", "primaryEmailAddress": "leon.s@kennedy.com", "type": "internal" }, "participants": [ { "firstName": "Leon S", "id": 4, "lastName": "Kennedy", "primaryEmailAddress": "leon.s@kennedy.com", "type": "internal" }, { "firstName": "Oswell E.", "id": 5, "lastName": "Spencer", "primaryEmailAddress": "oswell.e.spencer@umbrella.co", "type": "external" } ], "sentAt": "2020-01-01T00:00:00Z", "type": "chat-message" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "first-email", "name": "First Email", "type": "relationship-intelligence", "value": { "data": { "cc": [], "from": { "emailAddress": "leon.s@kennedy.com", "person": { "firstName": "Leon S", "id": 4, "lastName": "Kennedy", "primaryEmailAddress": "leon.s@kennedy.com", "type": "internal" } }, "id": 4, "sentAt": "2020-01-01T00:00:00Z", "subject": "Zombie Outbreak", "to": [ { "emailAddress": "oswell.e.spencer@umbrella.co", "person": { "firstName": "Oswell E.", "id": 5, "lastName": "Spencer", "primaryEmailAddress": "oswell.e.spencer@umbrella.co", "type": "external" } } ], "type": "email" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "first-event", "name": "First Event", "type": "relationship-intelligence", "value": { "data": { "allDay": false, "attendees": [ { "emailAddress": "leon.s@kennedy.com", "person": { "firstName": "Leon S", "id": 4, "lastName": "Kennedy", "primaryEmailAddress": "leon.s@kennedy.com", "type": "internal" } }, { "emailAddress": "oswell.e.spencer@umbrella.co", "person": { "firstName": "Oswell E.", "id": 5, "lastName": "Spencer", "primaryEmailAddress": "oswell.e.spencer@umbrella.co", "type": "external" } } ], "endTime": "2020-01-02T01:00:00Z", "id": 4, "startTime": "2020-01-02T00:00:00Z", "title": "Zombie Outbreak", "type": "meeting" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "last-chat-message", "name": "Last Chat Message", "type": "relationship-intelligence", "value": { "data": { "direction": "sent", "id": 4, "manualCreator": { "firstName": "Leon S", "id": 4, "lastName": "Kennedy", "primaryEmailAddress": "leon.s@kennedy.com", "type": "internal" }, "participants": [ { "firstName": "Leon S", "id": 4, "lastName": "Kennedy", "primaryEmailAddress": "leon.s@kennedy.com", "type": "internal" }, { "firstName": "Oswell E.", "id": 5, "lastName": "Spencer", "primaryEmailAddress": "oswell.e.spencer@umbrella.co", "type": "external" } ], "sentAt": "2020-01-02T00:00:00Z", "type": "chat-message" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "last-contact", "name": "Last Contact", "type": "relationship-intelligence", "value": { "data": { "cc": [], "from": { "emailAddress": "leon.s@kennedy.com", "person": { "firstName": "Leon S", "id": 4, "lastName": "Kennedy", "primaryEmailAddress": "leon.s@kennedy.com", "type": "internal" } }, "id": 5, "sentAt": "2020-02-01T00:00:00Z", "subject": "re: re: re: Zombie Outbreak", "to": [ { "emailAddress": "oswell.e.spencer@umbrella.co", "person": { "firstName": "Oswell E.", "id": 5, "lastName": "Spencer", "primaryEmailAddress": "oswell.e.spencer@umbrella.co", "type": "external" } } ], "type": "email" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "last-email", "name": "Last Email", "type": "relationship-intelligence", "value": { "data": { "cc": [], "from": { "emailAddress": "leon.s@kennedy.com", "person": { "firstName": "Leon S", "id": 4, "lastName": "Kennedy", "primaryEmailAddress": "leon.s@kennedy.com", "type": "internal" } }, "id": 5, "sentAt": "2020-02-01T00:00:00Z", "subject": "re: re: re: Zombie Outbreak", "to": [ { "emailAddress": "oswell.e.spencer@umbrella.co", "person": { "firstName": "Oswell E.", "id": 5, "lastName": "Spencer", "primaryEmailAddress": "oswell.e.spencer@umbrella.co", "type": "external" } } ], "type": "email" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "last-event", "name": "Last Event", "type": "relationship-intelligence", "value": { "data": { "allDay": false, "attendees": [ { "emailAddress": "leon.s@kennedy.com", "person": { "firstName": "Leon S", "id": 4, "lastName": "Kennedy", "primaryEmailAddress": "leon.s@kennedy.com", "type": "internal" } }, { "emailAddress": "oswell.e.spencer@umbrella.co", "person": { "firstName": "Oswell E.", "id": 5, "lastName": "Spencer", "primaryEmailAddress": "oswell.e.spencer@umbrella.co", "type": "external" } } ], "endTime": "2020-01-02T01:00:00Z", "id": 5, "startTime": "2020-01-02T00:00:00Z", "title": "re: re: re: Zombie Outbreak", "type": "meeting" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "next-event", "name": "Next Event", "type": "relationship-intelligence", "value": { "data": { "allDay": false, "attendees": [ { "emailAddress": "leon.s@kennedy.com", "person": { "firstName": "Leon S", "id": 4, "lastName": "Kennedy", "primaryEmailAddress": "leon.s@kennedy.com", "type": "internal" } }, { "emailAddress": "oswell.e.spencer@umbrella.co", "person": { "firstName": "Oswell E.", "id": 5, "lastName": "Spencer", "primaryEmailAddress": "oswell.e.spencer@umbrella.co", "type": "external" } } ], "endTime": "2020-01-03T01:00:00Z", "id": 6, "startTime": "2020-01-03T00:00:00Z", "title": "re: re: re: re: Zombie Outbreak", "type": "meeting" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "source-of-introduction", "name": "Source of Introduction", "type": "relationship-intelligence", "value": { "data": { "firstName": "Albert", "id": 3, "lastName": "Wesker", "primaryEmailAddress": "albert.wesker@umbrella.com", "type": "internal" }, "type": "person" } } ], "id": 2, "isGlobal": true, "name": "Umbrella Corporation" }, "id": 2, "listId": 1, "type": "company" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/lists/1/list-entries?fieldTypes=relationship-intelligence&cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/lists/1/list-entries?fieldTypes=relationship-intelligence&cursor=ICAgICAgYmVmb3JlOjo6Nw" } } }, "company-list-relationship-intelligence-2": { "description": "Example response on a Company list using `fieldTypes=relationship-intelligence`.", "value": { "createdAt": "2023-01-01T00:00:00Z", "creatorId": 1, "entity": { "domain": "acme.co", "domains": [ "acme.co" ], "fields": [ { "enrichmentSource": null, "id": "first-chat-message", "name": "First Chat Message", "type": "relationship-intelligence", "value": { "data": { "direction": "sent", "id": 1, "manualCreator": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" }, "participants": [ { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" }, { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } ], "sentAt": "2020-01-01T00:00:00Z", "type": "chat-message" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "first-email", "name": "First Email", "type": "relationship-intelligence", "value": { "data": { "cc": [], "from": { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, "id": 1, "sentAt": "2020-01-01T00:00:00Z", "subject": "Defective Products", "to": [ { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "type": "email" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "first-event", "name": "First Event", "type": "relationship-intelligence", "value": { "data": { "allDay": false, "attendees": [ { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "endTime": "2020-01-02T01:00:00Z", "id": 1, "startTime": "2020-01-02T00:00:00Z", "title": "Defective Products", "type": "meeting" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "last-chat-message", "name": "Last Chat Message", "type": "relationship-intelligence", "value": { "data": { "direction": "sent", "id": 2, "manualCreator": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" }, "participants": [ { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" }, { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } ], "sentAt": "2020-01-02T00:00:00Z", "type": "chat-message" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "last-contact", "name": "Last Contact", "type": "relationship-intelligence", "value": { "data": { "cc": [], "from": { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, "id": 2, "sentAt": "2020-02-01T00:00:00Z", "subject": "re: re: re: Defective Products", "to": [ { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "type": "email" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "last-email", "name": "Last Email", "type": "relationship-intelligence", "value": { "data": { "cc": [], "from": { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, "id": 2, "sentAt": "2020-02-01T00:00:00Z", "subject": "re: re: re: Defective Products", "to": [ { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "type": "email" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "last-event", "name": "Last Event", "type": "relationship-intelligence", "value": { "data": { "allDay": false, "attendees": [ { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "endTime": "2020-01-03T01:00:00Z", "id": 2, "startTime": "2020-01-03T00:00:00Z", "title": "re: re: re: Defective Products", "type": "meeting" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "next-event", "name": "Next Event", "type": "relationship-intelligence", "value": { "data": { "allDay": false, "attendees": [ { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "endTime": "2020-02-03T01:00:00Z", "id": 3, "startTime": "2020-02-03T00:00:00Z", "title": "re: re: re: re: Defective Products", "type": "meeting" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "source-of-introduction", "name": "Source of Introduction", "type": "relationship-intelligence", "value": { "data": { "firstName": "Yosemite", "id": 3, "lastName": "Sam", "primaryEmailAddress": "yosemite@sam.com", "type": "internal" }, "type": "person" } } ], "id": 1, "isGlobal": true, "name": "Acme" }, "id": 1, "listId": 1, "type": "company" } }, "company-list-relationship-intelligence-3": { "description": "Example response on a Company list using `types=relationship-intelligence`.", "value": { "data": [ { "enrichmentSource": null, "id": "first-chat-message", "name": "First Chat Message", "type": "relationship-intelligence", "value": { "data": { "direction": "sent", "id": 1, "manualCreator": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" }, "participants": [ { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" }, { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } ], "sentAt": "2020-01-01T00:00:00Z", "type": "chat-message" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "first-email", "name": "First Email", "type": "relationship-intelligence", "value": { "data": { "cc": [], "from": { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, "id": 1, "sentAt": "2020-01-01T00:00:00Z", "subject": "Defective Products", "to": [ { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "type": "email" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "first-event", "name": "First Event", "type": "relationship-intelligence", "value": { "data": { "allDay": false, "attendees": [ { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "endTime": "2020-01-02T01:00:00Z", "id": 1, "startTime": "2020-01-02T00:00:00Z", "title": "Defective Products", "type": "meeting" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "last-chat-message", "name": "Last Chat Message", "type": "relationship-intelligence", "value": { "data": { "direction": "sent", "id": 2, "manualCreator": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" }, "participants": [ { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" }, { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } ], "sentAt": "2020-01-02T00:00:00Z", "type": "chat-message" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "last-contact", "name": "Last Contact", "type": "relationship-intelligence", "value": { "data": { "cc": [], "from": { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, "id": 2, "sentAt": "2020-02-01T00:00:00Z", "subject": "re: re: re: Defective Products", "to": [ { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "type": "email" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "last-email", "name": "Last Email", "type": "relationship-intelligence", "value": { "data": { "cc": [], "from": { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, "id": 2, "sentAt": "2020-02-01T00:00:00Z", "subject": "re: re: re: Defective Products", "to": [ { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "type": "email" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "last-event", "name": "Last Event", "type": "relationship-intelligence", "value": { "data": { "allDay": false, "attendees": [ { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "endTime": "2020-01-03T01:00:00Z", "id": 2, "startTime": "2020-01-03T00:00:00Z", "title": "re: re: re: Defective Products", "type": "meeting" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "next-event", "name": "Next Event", "type": "relationship-intelligence", "value": { "data": { "allDay": false, "attendees": [ { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "endTime": "2020-02-03T01:00:00Z", "id": 3, "startTime": "2020-02-03T00:00:00Z", "title": "re: re: re: re: Defective Products", "type": "meeting" }, "type": "interaction" } }, { "enrichmentSource": null, "id": "source-of-introduction", "name": "Source of Introduction", "type": "relationship-intelligence", "value": { "data": { "firstName": "Yosemite", "id": 3, "lastName": "Sam", "primaryEmailAddress": "yosemite@sam.com", "type": "internal" }, "type": "person" } } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/lists/1/list-entries?types=relationship-intelligence&cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/lists/1/list-entries?types=relationship-intelligence&cursor=ICAgICAgYmVmb3JlOjo6Nw" } } }, "company-multi": { "description": "Example response on a field with a company-multi value.", "value": { "enrichmentSource": null, "id": "field-2", "name": "Field with company-multi value", "type": "list", "value": { "data": [ { "domain": "acme.co", "id": 1, "name": "Acme" }, { "domain": "umbrella.co", "id": 2, "name": "Umbrella Corporation" } ], "type": "company-multi" } } }, "company-multi-2": { "description": "Example response on a field with a company-multi value.", "value": { "value": { "data": [ { "id": 1 }, { "id": 2 } ], "type": "company-multi" } } }, "datetime": { "description": "Example response on a field with a datetime value.", "value": { "enrichmentSource": null, "id": "field-3", "name": "Field with datetime value", "type": "list", "value": { "data": "2023-01-01T00:00:00Z", "type": "datetime" } } }, "datetime-2": { "description": "Example response on a field with a datetime value.", "value": { "value": { "data": "2023-01-01T00:00:00Z", "type": "datetime" } } }, "dropdown": { "description": "Example response on a field with a dropdown value.", "value": { "enrichmentSource": null, "id": "field-4", "name": "Field with dropdown value", "type": "list", "value": { "data": { "dropdownOptionId": 1, "text": "Option 1" }, "type": "dropdown" } } }, "dropdown-2": { "description": "Example response on a field with a dropdown value.", "value": { "value": { "data": { "dropdownOptionId": 1 }, "type": "dropdown" } } }, "dropdown-multi": { "description": "Example response on a field with a dropdown-multi value.", "value": { "enrichmentSource": null, "id": "field-5", "name": "Field with dropdown-multi value", "type": "list", "value": { "data": [ { "dropdownOptionId": 1, "text": "Option 1" }, { "dropdownOptionId": 2, "text": "Option 2" } ], "type": "dropdown-multi" } } }, "dropdown-multi-2": { "description": "Example response on a field with a dropdown-multi value.", "value": { "value": { "data": [ { "dropdownOptionId": 1 }, { "dropdownOptionId": 2 } ], "type": "dropdown-multi" } } }, "entities": { "description": "Example response for entity notes.", "value": { "data": [ { "content": { "html": "

This is a note! John Doe

" }, "createdAt": "2023-01-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 1, "mentions": [ { "id": 1, "person": { "firstName": "John", "id": 2, "lastName": "Doe", "primaryEmailAddress": "john.doe@acme.co", "type": "internal" }, "type": "person" } ], "type": "entities", "updatedAt": "2023-01-21T00:00:00Z" }, { "content": { "html": "

This is another note!

" }, "createdAt": "2024-01-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 2, "mentions": [], "type": "entities", "updatedAt": "2024-01-21T00:00:00Z" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/notes?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/notes?cursor=ICAgICAgYmVmb3JlOjo6Nw" } }, "x-stability-level": "beta" }, "entities-2": { "description": "Example response for an entities note.", "value": { "content": { "html": "

This is a note! John Doe was mentioned.

" }, "createdAt": "2023-01-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 1, "mentions": [ { "id": 1, "person": { "firstName": "John", "id": 2, "lastName": "Doe", "primaryEmailAddress": "john.doe@acme.co", "type": "internal" }, "type": "person" } ], "type": "entities", "updatedAt": "2023-01-21T00:00:00Z" }, "x-stability-level": "beta" }, "entities-3": { "value": { "data": [ { "content": { "html": "

test

%

" }, "createdAt": "2023-01-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 1, "mentions": [ { "id": 1, "person": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "type": "person" } ], "permissions": { "owner": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "sharingType": "private" }, "type": "entities", "updatedAt": "2023-01-01T00:00:00Z" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/persons/1/notes?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/persons/1/notes?cursor=ICAgICAgYmVmb3JlOjo6Nw" } }, "x-stability-level": "beta" }, "failed-merge": { "description": "Example of a failed company merge with error details", "summary": "Failed company merge", "value": { "completedAt": "2025-06-03T09:16:30Z", "duplicateCompanyId": 98765, "errorMessage": "Primary company not found", "id": 67890, "primaryCompanyId": 54321, "startedAt": "2025-06-03T09:15:00Z", "status": "failed", "taskId": "789e0123-e45b-67c8-d901-234567890123" }, "x-stability-level": "beta" }, "failed-merge-2": { "description": "Example of a failed person merge with error details", "summary": "Failed person merge", "value": { "completedAt": "2025-06-03T09:16:30Z", "duplicatePersonId": 98765, "errorMessage": "Primary person not found", "id": 67890, "primaryPersonId": 54321, "startedAt": "2025-06-03T09:15:00Z", "status": "failed", "taskId": "789e0123-e45b-67c8-d901-234567890123" }, "x-stability-level": "beta" }, "filterable-text": { "description": "Example response on a field with a filterable-text value.", "value": { "enrichmentSource": null, "id": "field-6", "name": "Field with filterable-text value", "type": "list", "value": { "data": "A text value", "type": "filterable-text" } } }, "filterable-text-2": { "description": "Example response on a field with a filterable-text value.", "value": { "value": { "data": "A text value", "type": "filterable-text" } } }, "filterable-text-multi": { "description": "Example response on a field with a filterable-text-multi value.", "value": { "enrichmentSource": null, "id": "field-7", "name": "Field with filterable-text-multi value", "type": "list", "value": { "data": [ "A text value", "Another text value" ], "type": "filterable-text-multi" } } }, "filterable-text-multi-2": { "description": "Example response on a field with a filterable-text-multi value.", "value": { "value": { "data": [ "A text value", "Another text value" ], "type": "filterable-text-multi" } } }, "formula-number": { "description": "Example response on a field with a formula-number value.", "value": { "enrichmentSource": null, "id": "field-8", "name": "Field with formula-number value", "type": "list", "value": { "data": { "calculatedValue": 100 }, "type": "formula-number" } } }, "in-progress-merge": { "description": "Example of a company merge currently being processed", "summary": "In-progress company merge", "value": { "completedAt": null, "duplicateCompanyId": 13579, "errorMessage": null, "id": 98765, "primaryCompanyId": 24680, "startedAt": "2025-06-03T11:45:00Z", "status": "in-progress", "taskId": "456e7890-e12b-34c5-d678-901234567890" }, "x-stability-level": "beta" }, "in-progress-merge-2": { "description": "Example of a person merge currently being processed", "summary": "In-progress person merge", "value": { "completedAt": null, "duplicatePersonId": 13579, "errorMessage": null, "id": 98765, "primaryPersonId": 24680, "startedAt": "2025-06-03T11:45:00Z", "status": "in-progress", "taskId": "456e7890-e12b-34c5-d678-901234567890" }, "x-stability-level": "beta" }, "interaction": { "description": "Example response on a field with a interaction value.", "value": { "enrichmentSource": null, "id": "field-9", "name": "Field with interaction value", "type": "list", "value": { "data": { "allDay": false, "attendees": [ { "emailAddress": "wile.e@coyote.com", "person": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" } }, { "emailAddress": "bobbo@acme.co", "person": { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } } ], "endTime": "2020-01-02T01:00:00Z", "id": 1, "startTime": "2020-01-02T00:00:00Z", "title": "Defective Products", "type": "meeting" }, "type": "interaction" } } }, "interaction-2": { "description": "Example response for interaction notes.", "value": { "data": [ { "content": { "html": "

This is a call note!

Jane Doe" }, "createdAt": "2023-01-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 1, "interaction": { "id": 1, "type": "call" }, "mentions": [ { "id": 1, "person": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "type": "person" } ], "type": "interaction", "updatedAt": "2023-01-21T00:00:00Z" }, { "content": { "html": "

This is a meeting note!

" }, "createdAt": "2023-02-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 2, "interaction": { "id": 1, "type": "meeting" }, "mentions": [], "type": "interaction", "updatedAt": null }, { "content": { "html": "

This is an email note!

" }, "createdAt": "2023-02-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 3, "interaction": { "id": 1, "type": "email" }, "mentions": [], "type": "interaction", "updatedAt": null }, { "content": { "html": "

This is a chat message note!

" }, "createdAt": "2023-02-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 4, "interaction": { "id": 1, "type": "chat-message" }, "mentions": [], "type": "interaction", "updatedAt": null } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/notes?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/notes?cursor=ICAgICAgYmVmb3JlOjo6Nw" } }, "x-stability-level": "beta" }, "interaction-3": { "description": "Example response for an interaction note.", "value": { "content": { "html": "

This is a note! John Doe was mentioned.

" }, "createdAt": "2023-01-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 1, "interaction": { "id": 2, "type": "call" }, "mentions": [ { "id": 1, "person": { "firstName": "John", "id": 2, "lastName": "Doe", "primaryEmailAddress": "john.doe@acme.co", "type": "internal" }, "type": "person" } ], "type": "interaction", "updatedAt": "2023-01-21T00:00:00Z" }, "x-stability-level": "beta" }, "interaction-4": { "value": { "data": [ { "content": { "html": "

test

%

" }, "createdAt": "2023-01-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 1, "interaction": { "id": 2, "type": "call" }, "mentions": [ { "id": 1, "person": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "type": "person" } ], "permissions": { "owner": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "sharingType": "private" }, "type": "interaction", "updatedAt": "2023-01-01T00:00:00Z" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/persons/1/notes?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/persons/1/notes?cursor=ICAgICAgYmVmb3JlOjo6Nw" } }, "x-stability-level": "beta" }, "location": { "description": "Example response on a field with a location value.", "value": { "enrichmentSource": null, "id": "field-10", "name": "Field with location value", "type": "list", "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } } }, "location-2": { "description": "Example response on a field with a location value.", "value": { "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } } }, "location-multi": { "description": "Example response on a field with a location-multi value.", "value": { "enrichmentSource": null, "id": "field-11", "name": "Field with location-multi value", "type": "list", "value": { "data": [ { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, { "city": "Washington", "continent": "North America", "country": "United States", "state": "DC", "streetAddress": "1600 Pennsylvania Avenue NW" } ], "type": "location-multi" } } }, "location-multi-2": { "description": "Example response on a field with a location-multi value.", "value": { "value": { "data": [ { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, { "city": "Washington", "continent": "North America", "country": "United States", "state": "DC", "streetAddress": "1600 Pennsylvania Avenue NW" } ], "type": "location-multi" } } }, "merge-companies": { "description": "Example request to merge a duplicate company profile into a primary company profile. The primary company (ID 12345) will be kept and all data from the duplicate company (ID 67890) will be merged into it.", "summary": "Merge two company profiles", "value": { "duplicateCompanyId": 67890, "primaryCompanyId": 12345 }, "x-stability-level": "beta" }, "merge-initiated": { "description": "Response when a company merge task has been accepted for processing. The task ID can be used to track the progress of the merge task.", "summary": "Merge task initiated", "value": { "taskUrl": "https://api.affinity.co/v2/tasks/company-merges/123e4567-e89b-12d3-a456-426614174000" }, "x-stability-level": "beta" }, "merge-initiated-2": { "description": "Response when a person merge task has been accepted for processing. The task ID can be used to track the progress of the merge task.", "summary": "Merge task initiated", "value": { "taskUrl": "https://api.affinity.co/v2/tasks/person-merges/123e4567-e89b-12d3-a456-426614174000" }, "x-stability-level": "beta" }, "merge-persons": { "description": "Example request to merge a duplicate person profile into a primary person profile. The primary person (ID 12345) will be kept and all data from the duplicate person (ID 67890) will be merged into it.", "summary": "Merge two person profiles", "value": { "duplicatePersonId": 67890, "primaryPersonId": 12345 }, "x-stability-level": "beta" }, "merges-list": { "description": "Example response showing multiple company merges with different statuses", "summary": "List of company merges", "value": { "data": [ { "completedAt": "2025-06-03T10:32:15Z", "duplicateCompanyId": 67890, "errorMessage": null, "id": 12, "primaryCompanyId": 12345, "startedAt": "2025-06-03T10:30:00Z", "status": "success", "taskId": "789e0123-e45b-67c8-d901-234567890123" }, { "completedAt": "2025-06-03T09:16:30Z", "duplicateCompanyId": 98765, "errorMessage": "Primary company not found", "id": 13, "primaryCompanyId": 54321, "startedAt": "2025-06-03T09:15:00Z", "status": "failed", "taskId": "456e7890-1234-5678-9012-345678901234" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/companies/merge?cursor=eyJpZCI6NDU2ZTc4OTAtZTEyYi0zNGM1LWQ2NzgtOTAxMjM0NTY3ODkwfQ==", "prevUrl": null } }, "x-stability-level": "beta" }, "merges-list-2": { "description": "Example response showing multiple person merges with different statuses", "summary": "Person merges", "value": { "data": [ { "completedAt": "2025-06-03T10:32:15Z", "duplicatePersonId": 67890, "errorMessage": null, "id": 12, "primaryPersonId": 12345, "startedAt": "2025-06-03T10:30:00Z", "status": "success", "taskId": "789e0123-e45b-67c8-d901-234567890123" }, { "completedAt": "2025-06-03T09:16:30Z", "duplicatePersonId": 98765, "errorMessage": "Primary person not found", "id": 13, "primaryPersonId": 54321, "startedAt": "2025-06-03T09:15:00Z", "status": "failed", "taskId": "456e7890-1234-5678-9012-345678901234" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/persons/merge?cursor=eyJpZCI6NDU2ZTc4OTAtZTEyYi0zNGM1LWQ2NzgtOTAxMjM0NTY3ODkwfQ==", "prevUrl": null } }, "x-stability-level": "beta" }, "number": { "description": "Example response on a field with a number value.", "value": { "enrichmentSource": null, "id": "field-12", "name": "Field with number value", "type": "list", "value": { "data": 100, "type": "number" } } }, "number-2": { "description": "Example response on a field with a number value.", "value": { "value": { "data": 100, "type": "number" } } }, "number-multi": { "description": "Example response on a field with a number-multi value.", "value": { "enrichmentSource": null, "id": "field-13", "name": "Field with number-multi value", "type": "list", "value": { "data": [ 100, 200, 300 ], "type": "number-multi" } } }, "number-multi-2": { "description": "Example response on a field with a number-multi value.", "value": { "value": { "data": [ 100, 200, 300 ], "type": "number-multi" } } }, "opportunity-list": { "description": "Example Opportunity list.", "value": { "creatorId": 1, "id": 3, "isPublic": false, "name": "My Opportunities", "ownerId": 1, "type": "opportunity" } }, "opportunity-list-2": { "description": "Example response on an Opportunity list.", "value": { "data": [ { "enrichmentSource": null, "id": "companies", "name": "Organizations", "type": "list", "valueType": "company-multi" }, { "enrichmentSource": null, "id": "field-2", "name": "Custom list field", "type": "list", "valueType": "text" }, { "enrichmentSource": null, "id": "first-chat-message", "name": "First Chat Message", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "first-email", "name": "First Email", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "first-event", "name": "First Event", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "last-chat-message", "name": "Last Chat Message", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "last-contact", "name": "Last Contact", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "last-email", "name": "Last Email", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "last-event", "name": "Last Event", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "next-event", "name": "Next Event", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "persons", "name": "People", "type": "list", "valueType": "person-multi" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/lists/3/fields?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/lists/3/fields?cursor=ICAgICAgYmVmb3JlOjo6Nw" } } }, "person": { "description": "Example response on a field with a person value.", "value": { "enrichmentSource": null, "id": "field-14", "name": "Field with person value", "type": "list", "value": { "data": { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" }, "type": "person" } } }, "person-2": { "description": "Example response on a field with a person value.", "value": { "value": { "data": { "id": 1 }, "type": "person" } } }, "person-list": { "description": "Example Person list.", "value": { "creatorId": 1, "id": 2, "isPublic": false, "name": "My Persons", "ownerId": 1, "type": "person" } }, "person-list-2": { "description": "Example response on a Person list.", "value": { "data": [ { "enrichmentSource": "affinity-data", "id": "affinity-data-current-job-title", "name": "Current Job Title", "type": "enriched", "valueType": "filterable-text" }, { "enrichmentSource": "affinity-data", "id": "affinity-data-current-organization", "name": "Current Organization", "type": "enriched", "valueType": "company" }, { "enrichmentSource": "affinity-data", "id": "affinity-data-industry", "name": "Industry", "type": "enriched", "valueType": "filterable-text-multi" }, { "enrichmentSource": "affinity-data", "id": "affinity-data-job-titles", "name": "Job Titles", "type": "enriched", "valueType": "filterable-text-multi" }, { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "valueType": "location" }, { "enrichmentSource": "affinity-data", "id": "affinity-data-linkedin-url", "name": "LinkedIn URL", "type": "enriched", "valueType": "text" }, { "enrichmentSource": "affinity-data", "id": "affinity-data-phone-number", "name": "Phone Number", "type": "enriched", "valueType": "filterable-text-multi" }, { "enrichmentSource": null, "id": "companies", "name": "Organizations", "type": "list", "valueType": "company-multi" }, { "enrichmentSource": null, "id": "field-1", "name": "Custom global field", "type": "global", "valueType": "text" }, { "enrichmentSource": null, "id": "field-2", "name": "Custom list field", "type": "list", "valueType": "text" }, { "enrichmentSource": null, "id": "first-chat-message", "name": "First Chat Message", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "first-email", "name": "First Email", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "first-event", "name": "First Event", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "last-chat-message", "name": "Last Chat Message", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "last-contact", "name": "Last Contact", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "last-email", "name": "Last Email", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "last-event", "name": "Last Event", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "next-event", "name": "Next Event", "type": "relationship-intelligence", "valueType": "interaction" }, { "enrichmentSource": null, "id": "source-of-introduction", "name": "Source of Introduction", "type": "relationship-intelligence", "valueType": "person" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/lists/2/fields?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/lists/2/fields?cursor=ICAgICAgYmVmb3JlOjo6Nw" } } }, "person-multi": { "description": "Example response on a field with a person-multi value.", "value": { "enrichmentSource": null, "id": "field-15", "name": "Field with person-multi value", "type": "list", "value": { "data": [ { "firstName": "Wile E.", "id": 1, "lastName": "Coyote", "primaryEmailAddress": "wile.e@coyote.com", "type": "internal" }, { "firstName": "Bobbo", "id": 2, "lastName": "Acme", "primaryEmailAddress": "bobbo@stackshare.io", "type": "external" } ], "type": "person-multi" } } }, "person-multi-2": { "description": "Example response on a field with a person-multi value.", "value": { "value": { "data": [ { "id": 1 }, { "id": 2 } ], "type": "person-multi" } } }, "ranked-dropdown": { "description": "Example response on a field with a ranked-dropdown value.", "value": { "enrichmentSource": null, "id": "field-16", "name": "Field with ranked-dropdown value", "type": "list", "value": { "data": { "color": "gray", "dropdownOptionId": 1, "rank": 1, "text": "Option 1" }, "type": "ranked-dropdown" } } }, "ranked-dropdown-2": { "description": "Example response on a field with a ranked-dropdown value.", "value": { "value": { "data": { "dropdownOptionId": 1 }, "type": "ranked-dropdown" } } }, "succeeded-merge": { "description": "Example of a successful company merge", "summary": "Succeeded company merge", "value": { "completedAt": "2025-06-03T10:32:15Z", "duplicateCompanyId": 67890, "errorMessage": null, "id": 12345, "primaryCompanyId": 12345, "startedAt": "2025-06-03T10:30:00Z", "status": "success", "taskId": "1ac19acd-674c-49a0-819a-cd674cc9a042" }, "x-stability-level": "beta" }, "succeeded-merge-2": { "description": "Example of a successful person merge", "summary": "Succeeded person merge", "value": { "completedAt": "2025-06-03T10:32:15Z", "duplicatePersonId": 67890, "errorMessage": null, "id": 12345, "primaryPersonId": 12345, "startedAt": "2025-06-03T10:30:00Z", "status": "success", "taskId": "1b9684ad-e954-46d7-9684-ade95436d7dd" }, "x-stability-level": "beta" }, "success": { "value": { "data": [ { "creatorId": 1, "id": 1, "isPublic": false, "name": "My Companies", "ownerId": 1, "type": "company" }, { "creatorId": 1, "id": 2, "isPublic": false, "name": "My Persons", "ownerId": 1, "type": "person" }, { "creatorId": 1, "id": 3, "isPublic": false, "name": "My Opportunities", "ownerId": 1, "type": "opportunity" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/lists?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/lists?cursor=ICAgICAgYmVmb3JlOjo6Nw" } } }, "success-2": { "description": "Example response on fetching opportunities attached to a note.", "value": { "data": [ { "id": 1, "listId": 1000, "name": "Opp Name" }, { "id": 2, "listId": 1001, "name": "Another Opp Name" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/notes/1/attached-opportunities?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/notes/1/attached-opportunities?cursor=ICAgICAgYmVmb3JlOjo6Nw" } }, "x-stability-level": "beta" }, "task-failed": { "description": "Example response showing a merge task that failed during processing.", "summary": "Merge task failed", "value": { "id": "012e3456-a78b-90c1-d234-567890123456", "resultsSummary": { "failed": 1, "inProgress": 0, "success": 0, "total": 1 }, "status": "failed" }, "x-stability-level": "beta" }, "task-in-progress": { "description": "Example response showing a merge task that is currently being processed.", "summary": "Merge task in progress", "value": { "id": "456e7890-e12b-34c5-d678-901234567890", "resultsSummary": { "failed": 0, "inProgress": 1, "success": 0, "total": 1 }, "status": "in-progress" }, "x-stability-level": "beta" }, "task-success": { "description": "Example response showing a merge task that has been successfully completed.", "summary": "Merge task succeeded", "value": { "id": "76b45575-c17a-4b73-b455-75c17a9b737c", "resultsSummary": { "failed": 0, "inProgress": 0, "success": 1, "total": 1 }, "status": "success" }, "x-stability-level": "beta" }, "task-success-2": { "description": "Example response showing a merge task that has been successfully completed.", "summary": "Merge task succeeded", "value": { "id": "d8ff68ec-33d9-4d70-bf68-ec33d93d7092", "resultsSummary": { "failed": 0, "inProgress": 0, "success": 1, "total": 1 }, "status": "success" }, "x-stability-level": "beta" }, "tasks-list": { "description": "Example response showing multiple person merge tasks with different statuses", "summary": "Person merge tasks", "value": { "data": [ { "id": "123e4567-e89b-12d3-a456-426614174000", "resultsSummary": { "failed": 0, "inProgress": 0, "success": 1, "total": 1 }, "status": "success" }, { "id": "456e7890-e12b-34c5-d678-901234567890", "resultsSummary": { "failed": 1, "inProgress": 0, "success": 0, "total": 1 }, "status": "failed" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/tasks/person-merges?cursor=eyJpZCI6NDU2ZTc4OTAtZTEyYi0zNGM1LWQ2NzgtOTAxMjM0NTY3ODkwfQ==", "prevUrl": null } }, "x-stability-level": "beta" }, "tasks-list-2": { "description": "Example response showing multiple company merge tasks with different statuses", "summary": "List of company merge tasks", "value": { "data": [ { "id": "123e4567-e89b-12d3-a456-426614174000", "resultsSummary": { "failed": 0, "inProgress": 0, "success": 1, "total": 1 }, "status": "success" }, { "id": "456e7890-e12b-34c5-d678-901234567890", "resultsSummary": { "failed": 1, "inProgress": 0, "success": 0, "total": 1 }, "status": "failed" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/tasks/company-merges?cursor=eyJpZCI6NDU2ZTc4OTAtZTEyYi0zNGM1LWQ2NzgtOTAxMjM0NTY3ODkwfQ==", "prevUrl": null } }, "x-stability-level": "beta" }, "text": { "description": "Example response on a field with a text value.", "value": { "enrichmentSource": null, "id": "field-17", "name": "Field with text value", "type": "list", "value": { "data": "Hello", "type": "text" } } }, "text-2": { "description": "Example response on a field with a text value.", "value": { "value": { "data": "Some new text", "type": "text" } } }, "update-fields": { "description": "Example request for an `update-fields` operation.", "value": { "operation": "update-fields", "updates": [ { "id": "field-1", "value": { "data": { "id": 1 }, "type": "company" } }, { "id": "field-2", "value": { "data": [ { "id": 1 }, { "id": 2 } ], "type": "company-multi" } }, { "id": "field-3", "value": { "data": "2023-01-01T00:00:00Z", "type": "datetime" } }, { "id": "field-4", "value": { "data": { "dropdownOptionId": 1 }, "type": "dropdown" } }, { "id": "field-5", "value": { "data": [ { "dropdownOptionId": 1 }, { "dropdownOptionId": 2 } ], "type": "dropdown-multi" } }, { "id": "field-6", "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } }, { "id": "field-7", "value": { "data": [ { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, { "city": "Washington", "continent": "North America", "country": "United States", "state": "DC", "streetAddress": "1600 Pennsylvania Avenue NW" } ], "type": "location-multi" } }, { "id": "field-8", "value": { "data": 100, "type": "number" } }, { "id": "field-9", "value": { "data": [ 100, 200, 300 ], "type": "number-multi" } }, { "id": "field-10", "value": { "data": { "id": 1 }, "type": "person" } }, { "id": "field-11", "value": { "data": [ { "id": 1 }, { "id": 2 } ], "type": "person-multi" } }, { "id": "field-12", "value": { "data": { "dropdownOptionId": 1 }, "type": "ranked-dropdown" } }, { "id": "field-13", "value": { "data": "Some new text", "type": "text" } } ] } }, "update-fields-2": { "description": "Example response from an update-fields operation.", "value": { "operation": "update-fields" } }, "user-reply": { "description": "Example response for a user reply note.", "value": { "content": { "html": "

This reply note was added manually by a user. John Doe was mentioned.

" }, "createdAt": "2023-01-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 2, "mentions": [ { "id": 1, "person": { "firstName": "John", "id": 2, "lastName": "Doe", "primaryEmailAddress": "john.doe@acme.co", "type": "internal" }, "type": "person" } ], "parent": { "id": 1 }, "type": "user-reply", "updatedAt": "2023-01-21T00:00:00Z" }, "x-stability-level": "beta" }, "user-reply-2": { "value": { "data": [ { "content": { "html": "

This is a user reply note. John Doe was mentioned.

" }, "createdAt": "2023-01-01T00:00:00Z", "creator": { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, "id": 2, "mentions": [ { "id": 1, "person": { "firstName": "John", "id": 1, "lastName": "Doe", "primaryEmailAddress": "john.doe@acme.co", "type": "internal" }, "type": "person" } ], "parent": { "id": 1 }, "type": "user-reply", "updatedAt": "2023-02-01T00:00:00Z" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/notes/1/notes?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/notes/1/replies?cursor=ICAgICAgYmVmb3JlOjo6Nw" } }, "x-stability-level": "beta" } }, "headers": { "X-Ratelimit-Limit-Org": { "description": "Number of requests allowed per month for the account", "schema": { "type": "integer" } }, "X-Ratelimit-Limit-Org-Remaining": { "description": "Number of requests remaining for the account", "schema": { "type": "integer" } }, "X-Ratelimit-Limit-Org-Reset": { "description": "Time in seconds before the limit resets for the account", "schema": { "type": "integer" } }, "X-Ratelimit-Limit-User": { "description": "Number of requests allowed per minute for the user", "schema": { "type": "integer" } }, "X-Ratelimit-Limit-User-Remaining": { "description": "Number of requests remaining for the user", "schema": { "type": "integer" } }, "X-Ratelimit-Limit-User-Reset": { "description": "Time in seconds before the limit resets for the user", "schema": { "type": "integer" } } }, "parameters": { "note.includes": { "description": "Additional properties to include in the response", "explode": true, "in": "query", "name": "includes", "required": false, "schema": { "items": { "enum": [ "companiesPreview", "personsPreview", "opportunitiesPreview", "repliesCount" ], "type": "string" }, "title": "note.includes", "type": "array", "uniqueItems": true }, "style": "form", "x-stability-level": "beta" }, "notes.includes": { "description": "Additional properties to include in the response", "explode": true, "in": "query", "name": "includes", "required": false, "schema": { "items": { "enum": [ "companiesPreview", "personsPreview", "opportunitiesPreview", "repliesCount" ], "type": "string" }, "title": "notes.includes", "type": "array", "uniqueItems": true }, "style": "form", "x-stability-level": "beta" } }, "responses": { "400": { "content": { "application/json": { "schema": { "additionalProperties": false, "properties": { "errors": { "items": { "discriminator": { "mapping": { "bad-request": "#/components/schemas/BadRequestError", "validation": "#/components/schemas/ValidationError" }, "propertyName": "code" }, "oneOf": [ { "$ref": "#/components/schemas/BadRequestError" }, { "$ref": "#/components/schemas/ValidationError" } ] }, "type": "array" } }, "required": [ "errors" ], "title": "responses.400", "type": "object" } } }, "description": "Bad Request", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthorizationErrors" } } }, "description": "Forbidden", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NotFoundErrors" } } }, "description": "Not Found", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "default": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Errors" } } }, "description": "Errors", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } } }, "schemas": { "Attendee": { "additionalProperties": false, "properties": { "emailAddress": { "description": "The email addresses of the attendee", "examples": [ "john.smith@contoso.com" ], "format": "email", "type": [ "string", "null" ] }, "person": { "oneOf": [ { "$ref": "#/components/schemas/PersonData" }, { "type": "null" } ] } }, "required": [ "emailAddress", "person" ], "title": "Attendee", "type": "object" }, "AttendeesPreview": { "additionalProperties": false, "properties": { "data": { "description": "A preview of Attendees", "items": { "$ref": "#/components/schemas/Attendee" }, "maxItems": 100, "type": "array" }, "totalCount": { "description": "The total count of Attendees", "examples": [ 200 ], "format": "int64", "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "required": [ "data", "totalCount" ], "title": "interactions.AttendeesPreview", "type": "object", "x-stability-level": "beta" }, "AuthenticationError": { "additionalProperties": false, "examples": [ { "code": "authentication", "message": "\ud83d\udea8 Error! Sound the alarm! \ud83d\udea8" } ], "properties": { "code": { "const": "authentication", "description": "Error code", "type": "string" }, "message": { "description": "Error message", "type": "string" } }, "required": [ "code", "message" ], "title": "AuthenticationError", "type": "object" }, "AuthorizationError": { "additionalProperties": false, "examples": [ { "code": "authorization", "message": "\ud83d\udea8 Error! Sound the alarm! \ud83d\udea8" } ], "properties": { "code": { "const": "authorization", "description": "Error code", "type": "string" }, "message": { "description": "Error message", "type": "string" } }, "required": [ "code", "message" ], "title": "AuthorizationError", "type": "object" }, "AuthorizationErrors": { "additionalProperties": false, "description": "AuthorizationErrors model", "examples": [ { "errors": [ { "code": "authorization", "message": "\ud83d\udea8 Error! Sound the alarm! \ud83d\udea8" }, { "code": "authorization", "message": "\ud83d\udea8 Error! Sound the alarm! \ud83d\udea8" } ] } ], "properties": { "errors": { "description": "AuthorizationError errors", "items": { "$ref": "#/components/schemas/AuthorizationError" }, "type": "array" } }, "required": [ "errors" ], "title": "AuthorizationErrors", "type": "object" }, "BadRequestError": { "additionalProperties": false, "examples": [ { "code": "bad-request", "message": "\ud83d\udea8 Error! Sound the alarm! \ud83d\udea8" } ], "properties": { "code": { "const": "bad-request", "description": "Error code", "type": "string" }, "message": { "description": "Error message", "type": "string" } }, "required": [ "code", "message" ], "title": "BadRequestError", "type": "object" }, "ChatMessage": { "additionalProperties": false, "properties": { "direction": { "description": "The direction of the chat message", "enum": [ "received", "sent" ], "examples": [ "sent" ], "type": "string" }, "id": { "description": "The chat message's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "manualCreator": { "$ref": "#/components/schemas/PersonData" }, "participants": { "description": "The participants of the chat", "items": { "$ref": "#/components/schemas/PersonData" }, "type": "array" }, "sentAt": { "description": "The time the chat message was sent", "examples": [ "2023-01-01T00:00:00Z" ], "format": "date-time", "type": "string" }, "type": { "const": "chat-message", "description": "The type of interaction", "examples": [ "chat-message" ], "type": "string" } }, "required": [ "direction", "id", "manualCreator", "participants", "sentAt", "type" ], "title": "ChatMessage", "type": "object" }, "CompaniesValue": { "additionalProperties": false, "properties": { "data": { "description": "The values for many companies", "items": { "$ref": "#/components/schemas/CompanyData" }, "maxItems": 100, "type": [ "array", "null" ] }, "type": { "const": "company-multi", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "CompaniesValue", "type": "object" }, "CompaniesValueUpdate": { "additionalProperties": false, "properties": { "data": { "description": "The values for many companies", "items": { "$ref": "#/components/schemas/CompanyReference" }, "maxItems": 100, "type": [ "array", "null" ] }, "type": { "const": "company-multi", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "CompaniesValueUpdate", "type": "object" }, "Company": { "additionalProperties": false, "description": "Company model", "examples": [ { "domain": "acme.co", "domains": [ "acme.co" ], "fields": [ { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-description", "name": "Description", "type": "enriched", "value": { "data": "A leading provider of innovative solutions", "type": "text" } } ], "id": 1, "isGlobal": true, "name": "Acme" } ], "properties": { "domain": { "description": "The company's primary domain", "examples": [ "acme.co" ], "format": "hostname", "type": [ "string", "null" ] }, "domains": { "description": "All of the company's domains", "examples": [ [ "acme.co" ] ], "items": { "format": "hostname", "type": "string" }, "type": "array" }, "fields": { "description": "The fields associated with the company", "items": { "$ref": "#/components/schemas/Field" }, "type": "array" }, "id": { "description": "The company's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "isGlobal": { "description": "Whether or not the company is tenant specific", "examples": [ true ], "type": "boolean" }, "name": { "description": "The company's name", "examples": [ "Acme" ], "type": "string" } }, "required": [ "domain", "domains", "id", "isGlobal", "name" ], "title": "Company", "type": "object" }, "CompanyData": { "additionalProperties": false, "properties": { "domain": { "description": "The company's primary domain", "examples": [ "acme.co" ], "format": "hostname", "type": [ "string", "null" ] }, "id": { "description": "The company's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "name": { "description": "The company's name", "examples": [ "Acme" ], "type": "string" } }, "required": [ "domain", "id", "name" ], "title": "CompanyData", "type": "object" }, "CompanyDataPaged": { "additionalProperties": false, "description": "CompanyDataPaged model", "examples": [ { "data": [ { "domain": "acme.co", "id": 1, "name": "Acme" }, { "domain": "acme.co", "id": 1, "name": "Acme" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw" } } ], "properties": { "data": { "description": "A page of Company results", "items": { "$ref": "#/components/schemas/CompanyData" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "data", "pagination" ], "title": "CompanyDataPaged", "type": "object", "x-stability-level": "beta" }, "CompanyListEntry": { "additionalProperties": false, "properties": { "createdAt": { "description": "The date that the list entry was created", "examples": [ "2023-01-01T00:00:00Z" ], "format": "date-time", "type": "string" }, "creatorId": { "description": "The ID of the user that created this list entry", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": [ "integer", "null" ] }, "entity": { "$ref": "#/components/schemas/Company" }, "id": { "description": "The list entry's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "listId": { "description": "The ID of the list that this list entry belongs to", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "type": { "const": "company", "description": "The entity type for this list entry", "examples": [ "company" ], "type": "string" } }, "required": [ "createdAt", "creatorId", "entity", "id", "listId", "type" ], "title": "CompanyListEntry", "type": "object" }, "CompanyMergeRequest": { "additionalProperties": false, "description": "Request body for initiating a company merge", "properties": { "duplicateCompanyId": { "description": "The ID of the company profile that will be merged and then deleted. All data from this company will be transferred to the primary company.", "examples": [ 67890 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "primaryCompanyId": { "description": "The ID of the company profile that will be kept after the merge. All data from the duplicate company will be merged into this company.", "examples": [ 12345 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" } }, "required": [ "primaryCompanyId", "duplicateCompanyId" ], "title": "CompanyMergeRequest", "type": "object" }, "CompanyMergeResponse": { "additionalProperties": false, "description": "Response body for initiating a company merge", "properties": { "taskUrl": { "description": "URL to check the status of the merge task", "examples": [ "https://api.affinit.com/tasks/company-merges/123e4567-e89b-12d3-a456-426614174000" ], "format": "uri", "type": "string" } }, "required": [ "taskUrl" ], "title": "CompanyMergeResponse", "type": "object" }, "CompanyMergeState": { "additionalProperties": false, "description": "Entity representing the state of an individual company merge", "properties": { "completedAt": { "description": "Timestamp when the merge completed (success or failure)", "examples": [ "2025-06-03T10:32:15Z", null ], "format": "date-time", "type": [ "string", "null" ] }, "duplicateCompanyId": { "description": "ID of the duplicate company that was merged into the primary company", "examples": [ 67890 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "errorMessage": { "description": "Error message if the merge failed", "examples": [ "Primary company not found", null ], "type": [ "string", "null" ] }, "id": { "description": "The unique identifier for the merge", "examples": [ 12345 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "primaryCompanyId": { "description": "ID of the primary company that other profiles were merged into", "examples": [ 12345 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "startedAt": { "description": "Timestamp when the merge started", "examples": [ "2025-06-03T10:30:00Z" ], "format": "date-time", "type": "string" }, "status": { "description": "Current status of the merge", "enum": [ "in-progress", "success", "failed" ], "examples": [ "success" ], "type": "string" }, "taskId": { "description": "Identifier for the task this merge belongs to", "examples": [ "789e0123-e45b-67c8-d901-234567890123" ], "format": "uuid", "type": "string" } }, "required": [ "id", "status", "taskId", "startedAt", "primaryCompanyId", "duplicateCompanyId", "completedAt", "errorMessage" ], "title": "CompanyMergeState", "type": "object" }, "CompanyMergeStatePaged": { "additionalProperties": false, "description": "Paginated list of company merge states", "properties": { "data": { "description": "Array of company merge states", "items": { "$ref": "#/components/schemas/CompanyMergeState" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "data", "pagination" ], "title": "CompanyMergeStatePaged", "type": "object" }, "CompanyMergeTask": { "additionalProperties": false, "description": "Company merge task details and status for batch operations", "properties": { "id": { "description": "The unique identifier for this merge task", "examples": [ "123e4567-e89b-12d3-a456-426614174000" ], "format": "uuid", "type": "string" }, "resultsSummary": { "additionalProperties": false, "description": "Summary of merges in this batch task", "properties": { "failed": { "description": "Number of failed merges", "examples": [ 1 ], "format": "int32", "maximum": 2147483647, "minimum": 0, "type": "integer" }, "inProgress": { "description": "Number of merges currently in progress", "examples": [ 2 ], "format": "int32", "maximum": 2147483647, "minimum": 0, "type": "integer" }, "success": { "description": "Number of successfully completed merges", "examples": [ 2 ], "format": "int32", "maximum": 2147483647, "minimum": 0, "type": "integer" }, "total": { "description": "Total number of merges in the batch", "examples": [ 5 ], "format": "int32", "maximum": 2147483647, "minimum": 0, "type": "integer" } }, "required": [ "total", "inProgress", "success", "failed" ], "type": "object" }, "status": { "description": "The current status of the batch operation", "enum": [ "in-progress", "success", "failed" ], "examples": [ "in-progress" ], "type": "string" } }, "required": [ "id", "status", "resultsSummary" ], "title": "CompanyMergeTask", "type": "object" }, "CompanyMergeTaskPaged": { "additionalProperties": false, "description": "Paginated list of company merge tasks", "properties": { "data": { "description": "Array of company merge tasks", "examples": [ [ { "id": "123e4567-e89b-12d3-a456-426614174000", "resultsSummary": { "failed": 0, "inProgress": 0, "success": 1, "total": 1 }, "status": "success" }, { "id": "456e7890-e12b-34c5-d678-901234567890", "resultsSummary": { "failed": 1, "inProgress": 0, "success": 0, "total": 1 }, "status": "failed" } ] ], "items": { "$ref": "#/components/schemas/CompanyMergeTask" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "data", "pagination" ], "title": "CompanyMergeTaskPaged", "type": "object" }, "CompanyPaged": { "additionalProperties": false, "description": "CompanyPaged model", "examples": [ { "data": [ { "domain": "acme.co", "domains": [ "acme.co" ], "fields": [ { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-description", "name": "Description", "type": "enriched", "value": { "data": "A leading provider of innovative solutions", "type": "text" } } ], "id": 1, "isGlobal": true, "name": "Acme" }, { "domain": "umbrella.co", "domains": [ "umbrella.co" ], "fields": [ { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "Raccoon City", "continent": "North America", "country": "United States", "state": "Ohio", "streetAddress": "200 Corporate Blvd" }, "type": "location" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-description", "name": "Description", "type": "enriched", "value": { "data": "Pharmaceutical and biotechnology company", "type": "text" } } ], "id": 2, "isGlobal": true, "name": "Umbrella Corporation" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw" } } ], "properties": { "data": { "description": "A page of Company results", "items": { "$ref": "#/components/schemas/Company" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "data", "pagination" ], "title": "CompanyPaged", "type": "object" }, "CompanyReference": { "additionalProperties": false, "properties": { "id": { "description": "The company's unique identifier", "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" } }, "required": [ "id" ], "title": "CompanyReference", "type": "object" }, "CompanyValue": { "additionalProperties": false, "properties": { "data": { "oneOf": [ { "$ref": "#/components/schemas/CompanyData" }, { "type": "null" } ] }, "type": { "const": "company", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "CompanyValue", "type": "object" }, "CompanyValueUpdate": { "additionalProperties": false, "properties": { "data": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/CompanyReference" } ] }, "type": { "const": "company", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "CompanyValueUpdate", "type": "object" }, "ConflictError": { "additionalProperties": false, "examples": [ { "code": "conflict", "message": "\ud83d\udea8 Error! Sound the alarm! \ud83d\udea8" } ], "properties": { "code": { "const": "conflict", "description": "Error code", "type": "string" }, "message": { "description": "Error message", "type": "string" } }, "required": [ "code", "message" ], "title": "ConflictError", "type": "object" }, "DateValue": { "additionalProperties": false, "properties": { "data": { "description": "The value for a date", "format": "date-time", "type": [ "string", "null" ] }, "type": { "const": "datetime", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "DateValue", "type": "object" }, "Dropdown": { "additionalProperties": false, "properties": { "dropdownOptionId": { "description": "Dropdown item's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "text": { "description": "Dropdown item text", "examples": [ "first" ], "type": "string" } }, "required": [ "dropdownOptionId", "text" ], "title": "Dropdown", "type": "object" }, "DropdownReference": { "additionalProperties": false, "properties": { "dropdownOptionId": { "description": "Dropdown item's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" } }, "required": [ "dropdownOptionId" ], "title": "DropdownReference", "type": "object" }, "DropdownValue": { "additionalProperties": false, "properties": { "data": { "oneOf": [ { "$ref": "#/components/schemas/Dropdown" }, { "type": "null" } ] }, "type": { "const": "dropdown", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "DropdownValue", "type": "object" }, "DropdownValueUpdate": { "properties": { "data": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/DropdownReference" } ] }, "type": { "const": "dropdown", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "DropdownValueUpdate", "type": "object" }, "DropdownsValue": { "additionalProperties": false, "properties": { "data": { "description": "The value for many dropdown items", "items": { "$ref": "#/components/schemas/Dropdown" }, "type": [ "array", "null" ] }, "type": { "const": "dropdown-multi", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "DropdownsValue", "type": "object" }, "DropdownsValueUpdate": { "additionalProperties": false, "properties": { "data": { "description": "The value for many dropdown items", "items": { "$ref": "#/components/schemas/DropdownReference" }, "type": [ "array", "null" ] }, "type": { "const": "dropdown-multi", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "DropdownsValueUpdate", "type": "object" }, "Email": { "additionalProperties": false, "properties": { "cc": { "description": "The cc recipients of the email", "items": { "$ref": "#/components/schemas/Attendee" }, "type": "array" }, "from": { "$ref": "#/components/schemas/Attendee" }, "id": { "description": "The email's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "sentAt": { "description": "The time the email was sent", "examples": [ "2023-01-01T00:00:00Z" ], "format": "date-time", "type": "string" }, "subject": { "description": "The subject of the email", "examples": [ "Acme Upsell $10k" ], "type": [ "string", "null" ] }, "to": { "description": "The recipients of the email", "items": { "$ref": "#/components/schemas/Attendee" }, "type": "array" }, "type": { "const": "email", "description": "The type of interaction", "examples": [ "email" ], "type": "string" } }, "required": [ "cc", "from", "id", "sentAt", "subject", "to", "type" ], "title": "Email", "type": "object" }, "Error": { "discriminator": { "mapping": { "authentication": "#/components/schemas/AuthenticationError", "authorization": "#/components/schemas/AuthorizationError", "bad-request": "#/components/schemas/BadRequestError", "conflict": "#/components/schemas/ConflictError", "method-not-allowed": "#/components/schemas/MethodNotAllowedError", "not-acceptable": "#/components/schemas/NotAcceptableError", "not-found": "#/components/schemas/NotFoundError", "not-implemented": "#/components/schemas/NotImplementedError", "rate-limit": "#/components/schemas/RateLimitError", "server": "#/components/schemas/ServerError", "unprocessable-entity": "#/components/schemas/UnprocessableEntityError", "unsupported-media-type": "#/components/schemas/UnsupportedMediaTypeError", "validation": "#/components/schemas/ValidationError" }, "propertyName": "code" }, "oneOf": [ { "$ref": "#/components/schemas/AuthenticationError" }, { "$ref": "#/components/schemas/AuthorizationError" }, { "$ref": "#/components/schemas/BadRequestError" }, { "$ref": "#/components/schemas/ConflictError" }, { "$ref": "#/components/schemas/MethodNotAllowedError" }, { "$ref": "#/components/schemas/NotAcceptableError" }, { "$ref": "#/components/schemas/NotFoundError" }, { "$ref": "#/components/schemas/NotImplementedError" }, { "$ref": "#/components/schemas/RateLimitError" }, { "$ref": "#/components/schemas/ServerError" }, { "$ref": "#/components/schemas/UnprocessableEntityError" }, { "$ref": "#/components/schemas/UnsupportedMediaTypeError" }, { "$ref": "#/components/schemas/ValidationError" } ], "title": "Error" }, "Errors": { "additionalProperties": false, "properties": { "errors": { "description": "Errors", "items": { "$ref": "#/components/schemas/Error" }, "type": "array" } }, "required": [ "errors" ], "title": "Errors", "type": "object" }, "Field": { "additionalProperties": false, "examples": [ { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } } ], "properties": { "enrichmentSource": { "description": "The source of the data in this Field (if it is enriched)", "enum": [ "affinity-data", "dealroom", null ], "examples": [ "affinity-data" ], "type": [ "string", "null" ] }, "id": { "description": "The field's unique identifier", "examples": [ "affinity-data-location", "field-1234" ], "type": "string" }, "name": { "description": "The field's name", "examples": [ "Location" ], "type": "string" }, "type": { "description": "The field's type", "enum": [ "enriched", "global", "list", "relationship-intelligence" ], "examples": [ "enriched" ], "type": "string" }, "value": { "$ref": "#/components/schemas/FieldValue" } }, "required": [ "enrichmentSource", "id", "name", "type", "value" ], "title": "Field", "type": "object" }, "FieldMetadata": { "additionalProperties": false, "examples": [ { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "valueType": "location" } ], "properties": { "enrichmentSource": { "description": "The source of the data in this Field (if it is enriched)", "enum": [ "affinity-data", "dealroom", null ], "examples": [ "affinity-data" ], "type": [ "string", "null" ] }, "id": { "description": "The field's unique identifier", "examples": [ "affinity-data-location", "field-1234" ], "type": "string" }, "name": { "description": "The field's name", "examples": [ "Location" ], "type": "string" }, "type": { "description": "The field's type", "enum": [ "enriched", "global", "list", "relationship-intelligence" ], "examples": [ "enriched" ], "type": "string" }, "valueType": { "description": "The type of the data in this Field", "enum": [ "person", "person-multi", "company", "company-multi", "filterable-text", "filterable-text-multi", "number", "number-multi", "datetime", "location", "location-multi", "text", "ranked-dropdown", "dropdown", "dropdown-multi", "formula-number", "interaction" ], "examples": [ "location" ], "type": "string" } }, "required": [ "enrichmentSource", "id", "name", "type", "valueType" ], "title": "FieldMetadata", "type": "object" }, "FieldMetadataPaged": { "additionalProperties": false, "description": "FieldMetadataPaged model", "properties": { "data": { "description": "A page of FieldMetadata results", "items": { "$ref": "#/components/schemas/FieldMetadata" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "data", "pagination" ], "title": "FieldMetadataPaged", "type": "object" }, "FieldPaged": { "description": "FieldPaged model", "properties": { "data": { "description": "A page of Field results", "items": { "$ref": "#/components/schemas/Field" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "data", "pagination" ], "title": "FieldPaged", "type": "object" }, "FieldUpdate": { "additionalProperties": false, "examples": [ { "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } } ], "properties": { "value": { "$ref": "#/components/schemas/FieldValueUpdate" } }, "title": "FieldUpdate", "type": "object" }, "FieldValue": { "discriminator": { "mapping": { "company": "#/components/schemas/CompanyValue", "company-multi": "#/components/schemas/CompaniesValue", "datetime": "#/components/schemas/DateValue", "dropdown": "#/components/schemas/DropdownValue", "dropdown-multi": "#/components/schemas/DropdownsValue", "filterable-text": "#/components/schemas/TextValue", "filterable-text-multi": "#/components/schemas/TextsValue", "formula-number": "#/components/schemas/FormulaValue", "interaction": "#/components/schemas/InteractionValue", "location": "#/components/schemas/LocationValue", "location-multi": "#/components/schemas/LocationsValue", "number": "#/components/schemas/FloatValue", "number-multi": "#/components/schemas/FloatsValue", "person": "#/components/schemas/PersonValue", "person-multi": "#/components/schemas/PersonsValue", "ranked-dropdown": "#/components/schemas/RankedDropdownValue", "text": "#/components/schemas/TextValue" }, "propertyName": "type" }, "examples": [ { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } ], "oneOf": [ { "$ref": "#/components/schemas/CompaniesValue" }, { "$ref": "#/components/schemas/CompanyValue" }, { "$ref": "#/components/schemas/DateValue" }, { "$ref": "#/components/schemas/DropdownsValue" }, { "$ref": "#/components/schemas/DropdownValue" }, { "$ref": "#/components/schemas/FloatsValue" }, { "$ref": "#/components/schemas/FloatValue" }, { "$ref": "#/components/schemas/FormulaValue" }, { "$ref": "#/components/schemas/InteractionValue" }, { "$ref": "#/components/schemas/LocationsValue" }, { "$ref": "#/components/schemas/LocationValue" }, { "$ref": "#/components/schemas/PersonsValue" }, { "$ref": "#/components/schemas/PersonValue" }, { "$ref": "#/components/schemas/RankedDropdownValue" }, { "$ref": "#/components/schemas/TextsValue" }, { "$ref": "#/components/schemas/TextValue" } ], "title": "FieldValue" }, "FieldValueUpdate": { "discriminator": { "mapping": { "company": "#/components/schemas/CompanyValueUpdate", "company-multi": "#/components/schemas/CompaniesValueUpdate", "datetime": "#/components/schemas/DateValue", "dropdown": "#/components/schemas/DropdownValueUpdate", "dropdown-multi": "#/components/schemas/DropdownsValueUpdate", "filterable-text": "#/components/schemas/TextValue", "filterable-text-multi": "#/components/schemas/TextsValue", "location": "#/components/schemas/LocationValue", "location-multi": "#/components/schemas/LocationsValue", "number": "#/components/schemas/FloatValue", "number-multi": "#/components/schemas/FloatsValue", "person": "#/components/schemas/PersonValueUpdate", "person-multi": "#/components/schemas/PersonsValueUpdate", "ranked-dropdown": "#/components/schemas/RankedDropdownValueUpdate", "text": "#/components/schemas/TextValue" }, "propertyName": "type" }, "examples": [ { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } ], "oneOf": [ { "$ref": "#/components/schemas/CompaniesValueUpdate" }, { "$ref": "#/components/schemas/CompanyValueUpdate" }, { "$ref": "#/components/schemas/DateValue" }, { "$ref": "#/components/schemas/DropdownValueUpdate" }, { "$ref": "#/components/schemas/DropdownsValueUpdate" }, { "$ref": "#/components/schemas/FloatValue" }, { "$ref": "#/components/schemas/FloatsValue" }, { "$ref": "#/components/schemas/LocationValue" }, { "$ref": "#/components/schemas/LocationsValue" }, { "$ref": "#/components/schemas/PersonValueUpdate" }, { "$ref": "#/components/schemas/PersonsValueUpdate" }, { "$ref": "#/components/schemas/RankedDropdownValueUpdate" }, { "$ref": "#/components/schemas/TextValue" }, { "$ref": "#/components/schemas/TextsValue" } ], "title": "FieldValueUpdate" }, "FloatValue": { "additionalProperties": false, "properties": { "data": { "description": "The value for a number", "type": [ "number", "null" ] }, "type": { "const": "number", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "FloatValue", "type": "object" }, "FloatsValue": { "additionalProperties": false, "properties": { "data": { "description": "The value for many numbers", "items": { "type": "number" }, "type": [ "array", "null" ] }, "type": { "const": "number-multi", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "FloatsValue", "type": "object" }, "FormulaNumber": { "additionalProperties": false, "properties": { "calculatedValue": { "description": "Calculated value", "type": [ "number", "null" ] } }, "title": "FormulaNumber", "type": "object" }, "FormulaValue": { "additionalProperties": false, "properties": { "data": { "oneOf": [ { "$ref": "#/components/schemas/FormulaNumber" }, { "type": "null" } ] }, "type": { "const": "formula-number", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "FormulaValue", "type": "object" }, "Grant": { "additionalProperties": false, "examples": [ { "createdAt": "2023-01-01T00:00:00Z", "scopes": [ "api" ], "type": "api-key" } ], "properties": { "createdAt": { "description": "When the grant was created", "examples": [ "2023-01-01T00:00:00Z" ], "format": "date-time", "type": "string" }, "scopes": { "description": "The scopes available to the current grant", "examples": [ [ "api" ] ], "items": { "type": "string" }, "type": "array" }, "type": { "description": "The type of grant used to authenticate", "enum": [ "api-key", "access-token" ], "examples": [ "api-key" ], "type": "string" } }, "required": [ "createdAt", "scopes", "type" ], "title": "Grant", "type": "object" }, "Interaction": { "discriminator": { "mapping": { "call": "#/components/schemas/PhoneCall", "chat-message": "#/components/schemas/ChatMessage", "email": "#/components/schemas/Email", "meeting": "#/components/schemas/Meeting" }, "propertyName": "type" }, "oneOf": [ { "$ref": "#/components/schemas/ChatMessage" }, { "$ref": "#/components/schemas/Email" }, { "$ref": "#/components/schemas/Meeting" }, { "$ref": "#/components/schemas/PhoneCall" } ], "title": "Interaction" }, "InteractionValue": { "additionalProperties": false, "properties": { "data": { "oneOf": [ { "$ref": "#/components/schemas/Interaction" }, { "type": "null" } ] }, "type": { "const": "interaction", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "InteractionValue", "type": "object" }, "List": { "additionalProperties": false, "examples": [ { "creatorId": 1, "id": 1, "isPublic": false, "name": "All companies", "ownerId": 1 } ], "properties": { "creatorId": { "description": "The ID of the user that created this list", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "id": { "description": "The unique identifier for the list", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "isPublic": { "description": "Whether or not the list is public", "examples": [ false ], "type": "boolean" }, "name": { "description": "The name of the list", "examples": [ "All companies" ], "type": "string" }, "ownerId": { "description": "The ID of the user that owns this list", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" } }, "required": [ "creatorId", "id", "isPublic", "name", "ownerId" ], "title": "List", "type": "object" }, "ListEntry": { "additionalProperties": false, "examples": [ { "createdAt": "2023-01-01T00:00:00Z", "creatorId": 1, "fields": [ { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } } ], "id": 1, "listId": 1 } ], "properties": { "createdAt": { "description": "The date that the list entry was created", "examples": [ "2023-01-01T00:00:00Z" ], "format": "date-time", "type": "string" }, "creatorId": { "description": "The ID of the user that created this list entry", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": [ "integer", "null" ] }, "fields": { "description": "The fields associated with the list entry", "items": { "$ref": "#/components/schemas/Field" }, "type": "array" }, "id": { "description": "The list entry's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "listId": { "description": "The ID of the list that this list entry belongs to", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" } }, "required": [ "createdAt", "creatorId", "fields", "id", "listId" ], "title": "ListEntry", "type": "object" }, "ListEntryBatchOperationRequest": { "discriminator": { "mapping": { "update-fields": "#/components/schemas/ListEntryBatchOperationUpdateFields" }, "propertyName": "operation" }, "oneOf": [ { "$ref": "#/components/schemas/ListEntryBatchOperationUpdateFields" } ], "title": "ListEntryBatchOperationRequest" }, "ListEntryBatchOperationResponse": { "properties": { "operation": { "$ref": "#/components/schemas/ListEntryBatchOperations" } }, "title": "ListEntryBatchOperationResponse", "type": "object" }, "ListEntryBatchOperationUpdateFields": { "description": "Update multiple field values.", "properties": { "operation": { "const": "update-fields", "type": "string" }, "updates": { "items": { "properties": { "id": { "description": "The field's unique identifier.", "examples": [ "field-105" ], "type": "string" }, "value": { "$ref": "#/components/schemas/FieldValueUpdate" } }, "required": [ "id" ], "type": "object" }, "maxItems": 100, "type": "array" } }, "required": [ "operation", "updates" ], "title": "ListEntryBatchOperationUpdateFields", "type": "object" }, "ListEntryBatchOperations": { "enum": [ "update-fields" ], "title": "ListEntryBatchOperations", "type": "string" }, "ListEntryPaged": { "additionalProperties": false, "description": "ListEntryPaged model", "examples": [ { "data": [ { "createdAt": "2023-01-01T00:00:00Z", "creatorId": 1, "fields": [ { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } } ], "id": 1, "listId": 1 }, { "createdAt": "2023-01-01T00:00:00Z", "creatorId": 1, "fields": [ { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } } ], "id": 1, "listId": 1 } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw" } } ], "properties": { "data": { "description": "A page of ListEntry results", "items": { "$ref": "#/components/schemas/ListEntry" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "data", "pagination" ], "title": "ListEntryPaged", "type": "object" }, "ListEntryWithEntity": { "discriminator": { "mapping": { "company": "#/components/schemas/CompanyListEntry", "opportunity": "#/components/schemas/OpportunityListEntry", "person": "#/components/schemas/PersonListEntry" }, "propertyName": "type" }, "oneOf": [ { "$ref": "#/components/schemas/CompanyListEntry" }, { "$ref": "#/components/schemas/OpportunityListEntry" }, { "$ref": "#/components/schemas/PersonListEntry" } ], "title": "ListEntryWithEntity" }, "ListEntryWithEntityPaged": { "additionalProperties": false, "description": "ListEntryWithEntityPaged model", "properties": { "data": { "description": "A page of ListEntryWithEntity results", "items": { "$ref": "#/components/schemas/ListEntryWithEntity" }, "maxItems": 100, "type": [ "array", "null" ] }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "data", "pagination" ], "title": "ListEntryWithEntityPaged", "type": "object" }, "ListPaged": { "additionalProperties": false, "description": "ListPaged model", "examples": [ { "data": [ { "creatorId": 1, "id": 1, "isPublic": false, "name": "All companies", "ownerId": 1 }, { "creatorId": 1, "id": 1, "isPublic": false, "name": "All companies", "ownerId": 1 } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw" } } ], "properties": { "data": { "description": "A page of List results", "items": { "$ref": "#/components/schemas/List" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "data", "pagination" ], "title": "ListPaged", "type": "object" }, "ListWithType": { "additionalProperties": false, "description": "ListWithType model", "properties": { "creatorId": { "description": "The ID of the user that created this list", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "id": { "description": "The unique identifier for the list", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "isPublic": { "description": "Whether or not the list is public", "examples": [ false ], "type": "boolean" }, "name": { "description": "The name of the list", "examples": [ "All companies" ], "type": "string" }, "ownerId": { "description": "The ID of the user that owns this list", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "type": { "description": "The entity type for this list", "enum": [ "company", "opportunity", "person" ], "examples": [ "company" ], "type": "string" } }, "required": [ "creatorId", "id", "isPublic", "name", "ownerId", "type" ], "title": "ListWithType", "type": "object" }, "ListWithTypePaged": { "additionalProperties": false, "description": "ListWithTypePaged model", "properties": { "data": { "description": "A page of ListWithType results", "items": { "$ref": "#/components/schemas/ListWithType" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "data", "pagination" ], "title": "ListWithTypePaged", "type": "object" }, "Location": { "additionalProperties": false, "examples": [ { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" } ], "properties": { "city": { "description": "City", "examples": [ "San Francisco" ], "type": [ "string", "null" ] }, "continent": { "description": "Continent", "examples": [ "North America" ], "type": [ "string", "null" ] }, "country": { "description": "Country", "examples": [ "United States" ], "type": [ "string", "null" ] }, "state": { "description": "State", "examples": [ "California" ], "type": [ "string", "null" ] }, "streetAddress": { "description": "Street address", "examples": [ "1 Main Street" ], "type": [ "string", "null" ] } }, "required": [ "city", "continent", "country", "state", "streetAddress" ], "title": "Location", "type": "object" }, "LocationValue": { "additionalProperties": false, "properties": { "data": { "oneOf": [ { "$ref": "#/components/schemas/Location" }, { "type": "null" } ] }, "type": { "const": "location", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "LocationValue", "type": "object" }, "LocationsValue": { "additionalProperties": false, "properties": { "data": { "description": "The values for many locations", "items": { "$ref": "#/components/schemas/Location" }, "type": [ "array", "null" ] }, "type": { "const": "location-multi", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "LocationsValue", "type": "object" }, "Meeting": { "additionalProperties": false, "properties": { "allDay": { "description": "Whether the meeting is an all-day event", "examples": [ false ], "type": "boolean" }, "attendees": { "description": "People attending the meeting", "items": { "$ref": "#/components/schemas/Attendee" }, "type": "array" }, "endTime": { "description": "The meeting end time", "examples": [ "2023-02-03T05:00:00Z" ], "format": "date-time", "type": [ "string", "null" ] }, "id": { "description": "The meeting's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "startTime": { "description": "The meeting start time", "examples": [ "2023-02-03T04:00:00Z" ], "format": "date-time", "type": "string" }, "title": { "description": "The meeting's title", "examples": [ "Acme Upsell $10k" ], "type": [ "string", "null" ] }, "type": { "const": "meeting", "description": "The type of interaction", "examples": [ "meeting" ], "type": "string" } }, "required": [ "allDay", "attendees", "endTime", "id", "startTime", "title", "type" ], "title": "Meeting", "type": "object" }, "MethodNotAllowedError": { "additionalProperties": false, "examples": [ { "code": "method-not-allowed", "message": "\ud83d\udea8 Error! Sound the alarm! \ud83d\udea8" } ], "properties": { "code": { "const": "method-not-allowed", "description": "Error code", "type": "string" }, "message": { "description": "Error message", "type": "string" } }, "required": [ "code", "message" ], "title": "MethodNotAllowedError", "type": "object" }, "NotAcceptableError": { "additionalProperties": false, "examples": [ { "code": "not-acceptable", "message": "\ud83d\udea8 Error! Sound the alarm! \ud83d\udea8" } ], "properties": { "code": { "const": "not-acceptable", "description": "Error code", "type": "string" }, "message": { "description": "Error message", "type": "string" } }, "required": [ "code", "message" ], "title": "NotAcceptableError", "type": "object" }, "NotFoundError": { "additionalProperties": false, "examples": [ { "code": "not-found", "message": "\ud83d\udea8 Error! Sound the alarm! \ud83d\udea8" } ], "properties": { "code": { "const": "not-found", "description": "Error code", "type": "string" }, "message": { "description": "Error message", "type": "string" } }, "required": [ "code", "message" ], "title": "NotFoundError", "type": "object" }, "NotFoundErrors": { "additionalProperties": false, "description": "NotFoundErrors model", "examples": [ { "errors": [ { "code": "not-found", "message": "\ud83d\udea8 Error! Sound the alarm! \ud83d\udea8" }, { "code": "not-found", "message": "\ud83d\udea8 Error! Sound the alarm! \ud83d\udea8" } ] } ], "properties": { "errors": { "description": "NotFoundError errors", "items": { "$ref": "#/components/schemas/NotFoundError" }, "type": "array" } }, "required": [ "errors" ], "title": "NotFoundErrors", "type": "object" }, "NotImplementedError": { "additionalProperties": false, "examples": [ { "code": "not-implemented", "message": "\ud83d\udea8 Error! Sound the alarm! \ud83d\udea8" } ], "properties": { "code": { "const": "not-implemented", "description": "Error code", "type": "string" }, "message": { "description": "Error message", "type": "string" } }, "required": [ "code", "message" ], "title": "NotImplementedError", "type": "object" }, "Opportunity": { "additionalProperties": false, "description": "Opportunity model", "examples": [ { "id": 1, "listId": 1, "name": "Acme Upsell $10k" } ], "properties": { "id": { "description": "The unique identifier for the opportunity", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "listId": { "description": "The ID of the list that the opportunity belongs to", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "name": { "description": "The name of the opportunity", "examples": [ "Acme Upsell $10k" ], "type": "string" } }, "required": [ "id", "listId", "name" ], "title": "Opportunity", "type": "object" }, "OpportunityListEntry": { "additionalProperties": false, "properties": { "createdAt": { "description": "The date that the list entry was created", "examples": [ "2023-01-01T00:00:00Z" ], "format": "date-time", "type": "string" }, "creatorId": { "description": "The ID of the user that created this list entry", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": [ "integer", "null" ] }, "entity": { "$ref": "#/components/schemas/OpportunityWithFields" }, "id": { "description": "The list entry's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "listId": { "description": "The ID of the list that this list entry belongs to", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "type": { "const": "opportunity", "description": "The entity type for this list entry", "examples": [ "opportunity" ], "type": "string" } }, "required": [ "createdAt", "creatorId", "entity", "id", "listId", "type" ], "title": "OpportunityListEntry", "type": "object" }, "OpportunityPaged": { "additionalProperties": false, "description": "OpportunityPaged model", "examples": [ { "data": [ { "id": 1, "listId": 1, "name": "Acme Upsell $10k" }, { "id": 1, "listId": 1, "name": "Acme Upsell $10k" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw" } } ], "properties": { "data": { "description": "A page of Opportunity results", "items": { "$ref": "#/components/schemas/Opportunity" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "data", "pagination" ], "title": "OpportunityPaged", "type": "object" }, "OpportunityWithFields": { "additionalProperties": false, "properties": { "fields": { "description": "The fields associated with the opportunity", "items": { "$ref": "#/components/schemas/Field" }, "type": "array" }, "id": { "description": "The unique identifier for the opportunity", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "listId": { "description": "The ID of the list that the opportunity belongs to", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "name": { "description": "The name of the opportunity", "examples": [ "Acme Upsell $10k" ], "type": "string" } }, "required": [ "id", "listId", "name" ], "title": "OpportunityWithFields", "type": "object" }, "Pagination": { "examples": [ { "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw" } ], "properties": { "nextUrl": { "description": "URL for the next page", "examples": [ "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA" ], "format": "uri", "type": [ "string", "null" ] }, "prevUrl": { "description": "URL for the previous page", "examples": [ "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw" ], "format": "uri", "type": [ "string", "null" ] } }, "title": "Pagination", "type": "object" }, "PaginationWithTotalCount": { "allOf": [ { "$ref": "#/components/schemas/Pagination" } ], "properties": { "totalCount": { "description": "The total count of the collection. Only included if requested via the totalCount query string parameter.", "format": "int64", "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "title": "PaginationWithTotalCount", "type": "object" }, "Person": { "additionalProperties": false, "description": "Person model", "examples": [ { "emailAddresses": [ "jane.doe@acme.co", "janedoe@gmail.com" ], "fields": [ { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } } ], "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" } ], "properties": { "emailAddresses": { "description": "All of the person's email addresses", "examples": [ [ "jane.doe@acme.co", "janedoe@gmail.com" ] ], "items": { "format": "email", "type": "string" }, "type": "array" }, "fields": { "description": "The fields associated with the person", "items": { "$ref": "#/components/schemas/Field" }, "type": "array" }, "firstName": { "description": "The person's first name", "examples": [ "Jane" ], "type": "string" }, "id": { "description": "The persons's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "lastName": { "description": "The person's last name", "examples": [ "Doe" ], "type": [ "string", "null" ] }, "primaryEmailAddress": { "description": "The person's primary email address", "examples": [ "jane.doe@acme.co" ], "format": "email", "type": [ "string", "null" ] }, "type": { "description": "The person's type", "enum": [ "internal", "external" ], "examples": [ "internal" ], "type": "string" } }, "required": [ "emailAddresses", "firstName", "id", "lastName", "primaryEmailAddress", "type" ], "title": "Person", "type": "object" }, "PersonData": { "additionalProperties": false, "properties": { "firstName": { "description": "The person's first name", "examples": [ "Jane" ], "type": [ "string", "null" ] }, "id": { "description": "The persons's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "lastName": { "description": "The person's last name", "examples": [ "Doe" ], "type": [ "string", "null" ] }, "primaryEmailAddress": { "description": "The person's primary email address", "examples": [ "jane.doe@acme.co" ], "format": "email", "type": [ "string", "null" ] }, "type": { "description": "The person's type", "enum": [ "internal", "external", "collaborator" ], "examples": [ "internal" ], "type": "string" } }, "required": [ "firstName", "id", "lastName", "primaryEmailAddress", "type" ], "title": "PersonData", "type": "object" }, "PersonDataPaged": { "additionalProperties": false, "description": "PersonDataPaged model", "examples": [ { "data": [ { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, { "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw" } } ], "properties": { "data": { "description": "A page of Person results", "items": { "$ref": "#/components/schemas/PersonData" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "data", "pagination" ], "title": "PersonDataPaged", "type": "object", "x-stability-level": "beta" }, "PersonListEntry": { "additionalProperties": false, "properties": { "createdAt": { "description": "The date that the list entry was created", "examples": [ "2023-01-01T00:00:00Z" ], "format": "date-time", "type": "string" }, "creatorId": { "description": "The ID of the user that created this list entry", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": [ "integer", "null" ] }, "entity": { "$ref": "#/components/schemas/Person" }, "id": { "description": "The list entry's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "listId": { "description": "The ID of the list that this list entry belongs to", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "type": { "const": "person", "description": "The entity type for this list entry", "examples": [ "person" ], "type": "string" } }, "required": [ "createdAt", "creatorId", "entity", "id", "listId", "type" ], "title": "PersonListEntry", "type": "object" }, "PersonMergeRequest": { "additionalProperties": false, "description": "Request body for initiating a person merge", "properties": { "duplicatePersonId": { "description": "The ID of the person profile that will be merged and then deleted. All data from this person will be transferred to the primary person.", "examples": [ 67890 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "primaryPersonId": { "description": "The ID of the person profile that will be kept after the merge. All data from the duplicate person will be merged into this person.", "examples": [ 12345 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" } }, "required": [ "primaryPersonId", "duplicatePersonId" ], "title": "PersonMergeRequest", "type": "object", "x-stability-level": "beta" }, "PersonMergeResponse": { "additionalProperties": false, "description": "Response body for initiating a person merge", "properties": { "taskUrl": { "description": "URL to check the status of the merge task", "examples": [ "https://api.affinit.com/tasks/person-merges/123e4567-e89b-12d3-a456-426614174000" ], "format": "uri", "type": "string" } }, "required": [ "taskUrl" ], "title": "PersonMergeResponse", "type": "object", "x-stability-level": "beta" }, "PersonMergeState": { "additionalProperties": false, "description": "Entity representing the state of an individual person merge", "properties": { "completedAt": { "description": "Timestamp when the merge completed (success or failure)", "examples": [ "2025-06-03T10:32:15Z", null ], "format": "date-time", "type": [ "string", "null" ] }, "duplicatePersonId": { "description": "ID of the duplicate person that was merged into the primary person", "examples": [ 67890 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "errorMessage": { "description": "Error message if the merge failed", "examples": [ "Primary person not found", null ], "type": [ "string", "null" ] }, "id": { "description": "The unique identifier for the merge", "examples": [ 12345 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "primaryPersonId": { "description": "ID of the primary person that other profiles were merged into", "examples": [ 12345 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "startedAt": { "description": "Timestamp when the merge started", "examples": [ "2025-06-03T10:30:00Z" ], "format": "date-time", "type": "string" }, "status": { "description": "Current status of the merge", "enum": [ "in-progress", "success", "failed" ], "examples": [ "success" ], "type": "string" }, "taskId": { "description": "Identifier for the task this merge belongs to", "examples": [ "789e0123-e45b-67c8-d901-234567890123" ], "format": "uuid", "type": "string" } }, "required": [ "id", "status", "taskId", "startedAt", "primaryPersonId", "duplicatePersonId", "completedAt", "errorMessage" ], "title": "PersonMergeState", "type": "object", "x-stability-level": "beta" }, "PersonMergeStatePaged": { "additionalProperties": false, "description": "Paginated person merge states", "properties": { "data": { "description": "Array of person merge states", "items": { "$ref": "#/components/schemas/PersonMergeState" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "data", "pagination" ], "title": "PersonMergeStatePaged", "type": "object", "x-stability-level": "beta" }, "PersonMergeTask": { "additionalProperties": false, "description": "Person merge task details and status for batch operations", "properties": { "id": { "description": "The unique identifier for this merge task", "examples": [ "123e4567-e89b-12d3-a456-426614174000" ], "format": "uuid", "type": "string" }, "resultsSummary": { "additionalProperties": false, "description": "Summary of merges in this batch task", "properties": { "failed": { "description": "Number of failed merges", "examples": [ 1 ], "format": "int32", "maximum": 2147483647, "minimum": 0, "type": "integer" }, "inProgress": { "description": "Number of merges currently in progress", "examples": [ 2 ], "format": "int32", "maximum": 2147483647, "minimum": 0, "type": "integer" }, "success": { "description": "Number of successfully completed merges", "examples": [ 2 ], "format": "int32", "maximum": 2147483647, "minimum": 0, "type": "integer" }, "total": { "description": "Total number of merges in the batch", "examples": [ 5 ], "format": "int32", "maximum": 2147483647, "minimum": 0, "type": "integer" } }, "required": [ "total", "inProgress", "success", "failed" ], "type": "object" }, "status": { "description": "The current status of the batch operation", "enum": [ "in-progress", "success", "failed" ], "examples": [ "in-progress" ], "type": "string" } }, "required": [ "id", "status", "resultsSummary" ], "title": "PersonMergeTask", "type": "object", "x-stability-level": "beta" }, "PersonMergeTaskPaged": { "additionalProperties": false, "description": "Paginated person merge tasks", "properties": { "data": { "description": "Array of person merge tasks", "examples": [ [ { "id": "123e4567-e89b-12d3-a456-426614174000", "resultsSummary": { "failed": 0, "inProgress": 0, "success": 1, "total": 1 }, "status": "success" }, { "id": "456e7890-e12b-34c5-d678-901234567890", "resultsSummary": { "failed": 1, "inProgress": 0, "success": 0, "total": 1 }, "status": "failed" } ] ], "items": { "$ref": "#/components/schemas/PersonMergeTask" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "data", "pagination" ], "title": "PersonMergeTaskPaged", "type": "object", "x-stability-level": "beta" }, "PersonPaged": { "additionalProperties": false, "description": "PersonPaged model", "examples": [ { "data": [ { "emailAddresses": [ "jane.doe@acme.co", "janedoe@gmail.com" ], "fields": [ { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } } ], "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" }, { "emailAddresses": [ "jane.doe@acme.co", "janedoe@gmail.com" ], "fields": [ { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } }, { "enrichmentSource": "affinity-data", "id": "affinity-data-location", "name": "Location", "type": "enriched", "value": { "data": { "city": "San Francisco", "continent": "North America", "country": "United States", "state": "California", "streetAddress": "1 Main Street" }, "type": "location" } } ], "firstName": "Jane", "id": 1, "lastName": "Doe", "primaryEmailAddress": "jane.doe@acme.co", "type": "internal" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw" } } ], "properties": { "data": { "description": "A page of Person results", "items": { "$ref": "#/components/schemas/Person" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "data", "pagination" ], "title": "PersonPaged", "type": "object" }, "PersonReference": { "additionalProperties": false, "properties": { "id": { "description": "The persons's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" } }, "required": [ "id" ], "title": "PersonReference", "type": "object" }, "PersonValue": { "additionalProperties": false, "properties": { "data": { "oneOf": [ { "$ref": "#/components/schemas/PersonData" }, { "type": "null" } ] }, "type": { "const": "person", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "PersonValue", "type": "object" }, "PersonValueUpdate": { "additionalProperties": false, "properties": { "data": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/PersonReference" } ] }, "type": { "const": "person", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "PersonValueUpdate", "type": "object" }, "PersonsValue": { "additionalProperties": false, "properties": { "data": { "description": "The values for many persons", "items": { "$ref": "#/components/schemas/PersonData" }, "maxItems": 100, "type": [ "array", "null" ] }, "type": { "const": "person-multi", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "PersonsValue", "type": "object" }, "PersonsValueUpdate": { "additionalProperties": false, "properties": { "data": { "description": "The values for many persons", "items": { "$ref": "#/components/schemas/PersonReference" }, "maxItems": 100, "type": [ "array", "null" ] }, "type": { "const": "person-multi", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "PersonsValueUpdate", "type": "object" }, "PhoneCall": { "additionalProperties": false, "properties": { "attendees": { "description": "People attending the call", "items": { "$ref": "#/components/schemas/Attendee" }, "type": "array" }, "id": { "description": "The phon_call's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "startTime": { "description": "The call start time", "examples": [ "2023-02-03T04:00:00Z" ], "format": "date-time", "type": "string" }, "type": { "const": "call", "description": "The type of interaction", "examples": [ "call" ], "type": "string" } }, "required": [ "attendees", "id", "startTime", "type" ], "title": "PhoneCall", "type": "object" }, "RankedDropdown": { "additionalProperties": false, "properties": { "color": { "description": "Dropdown item color", "examples": [ "white" ], "type": [ "string", "null" ] }, "dropdownOptionId": { "description": "Dropdown item's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "rank": { "description": "Dropdown item rank", "examples": [ 0 ], "format": "int64", "maximum": 9007199254740991, "minimum": 0, "type": "integer" }, "text": { "description": "Dropdown item text", "examples": [ "first" ], "type": "string" } }, "required": [ "color", "dropdownOptionId", "rank", "text" ], "title": "RankedDropdown", "type": "object" }, "RankedDropdownReference": { "additionalProperties": false, "properties": { "dropdownOptionId": { "description": "Ranked Dropdown item's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" } }, "required": [ "dropdownOptionId" ], "title": "RankedDropdownReference", "type": "object" }, "RankedDropdownValue": { "additionalProperties": false, "properties": { "data": { "oneOf": [ { "$ref": "#/components/schemas/RankedDropdown" }, { "type": "null" } ] }, "type": { "const": "ranked-dropdown", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "RankedDropdownValue", "type": "object" }, "RankedDropdownValueUpdate": { "properties": { "data": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/RankedDropdownReference" } ] }, "type": { "const": "ranked-dropdown", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "RankedDropdownValueUpdate", "type": "object" }, "RateLimitError": { "additionalProperties": false, "examples": [ { "code": "rate-limit", "message": "\ud83d\udea8 Error! Sound the alarm! \ud83d\udea8" } ], "properties": { "code": { "const": "rate-limit", "description": "Error code", "type": "string" }, "message": { "description": "Error message", "type": "string" } }, "required": [ "code", "message" ], "title": "RateLimitError", "type": "object" }, "SavedView": { "additionalProperties": false, "description": "SavedView model", "examples": [ { "createdAt": "2023-01-01T00:00:00Z", "id": 28, "name": "my interesting companies", "type": "sheet" } ], "properties": { "createdAt": { "description": "The date that the saved view was created", "examples": [ "2023-01-01T00:00:00Z" ], "format": "date-time", "type": "string" }, "id": { "description": "The saved view's unique identifier", "examples": [ 28 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "name": { "description": "The saved view's name", "examples": [ "my interesting companies" ], "type": "string" }, "type": { "description": "The type for this saved view", "enum": [ "sheet", "board", "dashboard" ], "examples": [ "sheet" ], "type": "string" } }, "required": [ "createdAt", "id", "name", "type" ], "title": "SavedView", "type": "object" }, "SavedViewPaged": { "additionalProperties": false, "description": "SavedViewPaged model", "examples": [ { "data": [ { "createdAt": "2023-01-01T00:00:00Z", "id": 28, "name": "my interesting companies", "type": "sheet" }, { "createdAt": "2023-01-01T00:00:00Z", "id": 28, "name": "my interesting companies", "type": "sheet" } ], "pagination": { "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA", "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw" } } ], "properties": { "data": { "description": "A page of SavedView results", "items": { "$ref": "#/components/schemas/SavedView" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/Pagination" } }, "required": [ "data", "pagination" ], "title": "SavedViewPaged", "type": "object" }, "ServerError": { "additionalProperties": false, "examples": [ { "code": "server", "message": "\ud83d\udea8 Error! Sound the alarm! \ud83d\udea8" } ], "properties": { "code": { "const": "server", "description": "Error code", "type": "string" }, "message": { "description": "Error message", "type": "string" } }, "required": [ "code", "message" ], "title": "ServerError", "type": "object" }, "Tenant": { "additionalProperties": false, "examples": [ { "id": 1, "name": "Contoso Ltd.", "subdomain": "contoso" } ], "properties": { "id": { "description": "The tenant's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "name": { "description": "The name of the tenant", "examples": [ "Contoso Ltd." ], "type": "string" }, "subdomain": { "description": "The tenant's subdomain under affinity.co", "examples": [ "contoso" ], "format": "hostname", "type": "string" } }, "required": [ "id", "name", "subdomain" ], "title": "Tenant", "type": "object" }, "TextValue": { "additionalProperties": false, "properties": { "data": { "description": "The value for a string", "type": [ "string", "null" ] }, "type": { "description": "The type of value", "enum": [ "filterable-text", "text" ], "examples": [ "filterable-text" ], "type": "string" } }, "required": [ "data", "type" ], "title": "TextValue", "type": "object" }, "TextsValue": { "additionalProperties": false, "properties": { "data": { "description": "The value for many strings", "items": { "type": "string" }, "type": [ "array", "null" ] }, "type": { "const": "filterable-text-multi", "description": "The type of value", "type": "string" } }, "required": [ "data", "type" ], "title": "TextsValue", "type": "object" }, "UnprocessableEntityError": { "additionalProperties": false, "examples": [ { "code": "unprocessable-entity", "message": "\ud83d\udea8 Error! Sound the alarm! \ud83d\udea8" } ], "properties": { "code": { "const": "unprocessable-entity", "description": "Error code", "type": "string" }, "message": { "description": "Error message", "type": "string" } }, "required": [ "code", "message" ], "title": "UnprocessableEntityError", "type": "object" }, "UnsupportedMediaTypeError": { "additionalProperties": false, "examples": [ { "code": "unsupported-media-type", "message": "\ud83d\udea8 Error! Sound the alarm! \ud83d\udea8" } ], "properties": { "code": { "const": "unsupported-media-type", "description": "Error code", "type": "string" }, "message": { "description": "Error message", "type": "string" } }, "required": [ "code", "message" ], "title": "UnsupportedMediaTypeError", "type": "object" }, "User": { "additionalProperties": false, "examples": [ { "emailAddress": "john.smith@contoso.com", "firstName": "John", "id": 1, "lastName": "Smith" } ], "properties": { "emailAddress": { "description": "The user's email address", "examples": [ "john.smith@contoso.com" ], "format": "email", "type": "string" }, "firstName": { "description": "The user's first name", "examples": [ "John" ], "type": "string" }, "id": { "description": "The user's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "lastName": { "description": "The user's last name", "examples": [ "Smith" ], "type": [ "string", "null" ] } }, "required": [ "emailAddress", "firstName", "id", "lastName" ], "title": "User", "type": "object" }, "ValidationError": { "additionalProperties": false, "examples": [ { "code": "validation", "message": "\ud83d\udea8 Error! Sound the alarm! \ud83d\udea8", "param": "limit" } ], "properties": { "code": { "const": "validation", "description": "Error code", "type": "string" }, "message": { "description": "Error message", "type": "string" }, "param": { "description": "Param the error refers to", "type": "string" } }, "required": [ "code", "message", "param" ], "title": "ValidationError", "type": "object" }, "WhoAmI": { "additionalProperties": false, "description": "WhoAmI model", "examples": [ { "grant": { "createdAt": "2023-01-01T00:00:00Z", "scopes": [ "api" ], "type": "api-key" }, "tenant": { "id": 1, "name": "Contoso Ltd.", "subdomain": "contoso" }, "user": { "emailAddress": "john.smith@contoso.com", "firstName": "John", "id": 1, "lastName": "Smith" } } ], "properties": { "grant": { "$ref": "#/components/schemas/Grant" }, "tenant": { "$ref": "#/components/schemas/Tenant" }, "user": { "$ref": "#/components/schemas/User" } }, "required": [ "grant", "tenant", "user" ], "title": "WhoAmI", "type": "object" }, "interactions.Email": { "additionalProperties": false, "properties": { "ccParticipantsPreview": { "$ref": "#/components/schemas/AttendeesPreview", "description": "A preview of the participants who are cc'ed in the email" }, "createdAt": { "description": "The timestamp of when the email was created", "examples": [ "2023-01-01T00:00:00Z" ], "format": "date-time", "type": "string" }, "direction": { "description": "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.", "enum": [ "sent", "received" ], "examples": [ "received" ], "type": "string" }, "from": { "$ref": "#/components/schemas/Attendee", "description": "The participant who sent the email" }, "id": { "description": "The email's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "loggingType": { "const": "automated", "description": "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'.", "examples": [ "automated" ], "type": "string" }, "sentAt": { "description": "The timestamp of when the email was sent", "examples": [ "2023-01-01T00:00:00Z" ], "format": "date-time", "type": "string" }, "subject": { "description": "The email's subject", "examples": [ "Example subject" ], "type": [ "string", "null" ] }, "toParticipantsPreview": { "$ref": "#/components/schemas/AttendeesPreview", "description": "A preview of the participants in the 'To' field of the email" }, "updatedAt": { "description": "The timestamp of when the email was updated", "examples": [ "2023-01-01T00:00:00Z" ], "format": "date-time", "type": [ "string", "null" ] } }, "required": [ "id", "sentAt", "loggingType", "direction", "subject", "createdAt", "updatedAt", "from", "toParticipantsPreview", "ccParticipantsPreview" ], "title": "interactions.Email", "type": "object", "x-stability-level": "beta" }, "interactions.EmailPaged": { "additionalProperties": false, "description": "EmailPaged model", "properties": { "data": { "description": "A page of Email results", "items": { "$ref": "#/components/schemas/interactions.Email" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/PaginationWithTotalCount" } }, "required": [ "data", "pagination" ], "title": "interactions.EmailPaged", "type": "object", "x-stability-level": "beta" }, "interactions.Meeting": { "additionalProperties": false, "properties": { "allDay": { "description": "Whether the meeting is all day", "examples": [ false ], "type": "boolean" }, "attendeesPreview": { "$ref": "#/components/schemas/AttendeesPreview", "description": "A preview of the attendees in the meeting" }, "createdAt": { "description": "The timestamp of when the meeting was created", "examples": [ "2023-01-01T00:00:00Z" ], "format": "date-time", "type": "string" }, "creator": { "description": "The person who created the meeting", "oneOf": [ { "$ref": "#/components/schemas/Attendee" }, { "type": "null" } ] }, "endTime": { "description": "The timestamp of when the meeting ends", "examples": [ "2023-01-01T00:00:00Z" ], "format": "date-time", "type": [ "string", "null" ] }, "id": { "description": "The meeting's unique identifier", "examples": [ 1 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "loggingType": { "description": "Indicates how the interaction was added to Affinity: either manually by a user ('manual') or automatically through Affinity's capture process ('automated').", "enum": [ "automated", "manual" ], "examples": [ "automated" ], "type": "string" }, "organizer": { "description": "The person who organized the meeting", "oneOf": [ { "$ref": "#/components/schemas/Attendee" }, { "type": "null" } ] }, "startTime": { "description": "The timestamp of when the meeting starts", "examples": [ "2023-01-01T00:00:00Z" ], "format": "date-time", "type": "string" }, "title": { "description": "The meeting's title", "examples": [ "Example title" ], "type": [ "string", "null" ] }, "updatedAt": { "description": "The timestamp of when the meeting was updated", "examples": [ "2023-01-01T00:00:00Z" ], "format": "date-time", "type": [ "string", "null" ] } }, "required": [ "id", "loggingType", "title", "startTime", "endTime", "allDay", "creator", "organizer", "createdAt", "updatedAt", "attendeesPreview" ], "title": "interactions.Meeting", "type": "object", "x-stability-level": "beta" }, "interactions.MeetingPaged": { "additionalProperties": false, "description": "MeetingPaged model", "properties": { "data": { "description": "A page of Meeting results", "items": { "$ref": "#/components/schemas/interactions.Meeting" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/PaginationWithTotalCount" } }, "required": [ "data", "pagination" ], "title": "interactions.MeetingPaged", "type": "object", "x-stability-level": "beta" }, "notes.AiNotetakerReplyNote": { "allOf": [ { "$ref": "#/components/schemas/notes.BaseReply" } ], "description": "A reply to a Note, created by an AI Notetaker", "properties": { "interaction": { "$ref": "#/components/schemas/notes.MeetingInteraction", "description": "The meeting this AI Notetaker was invited to." }, "type": { "const": "ai-notetaker-reply", "description": "The type of the note", "type": "string" } }, "required": [ "type" ], "title": "notes.AiNotetakerReplyNote", "type": "object", "x-stability-level": "beta" }, "notes.AiNotetakerRootNote": { "allOf": [ { "$ref": "#/components/schemas/notes.BaseRootNote" } ], "description": "A Root Note object created by the AI Notetaker", "properties": { "interaction": { "$ref": "#/components/schemas/notes.MeetingInteraction", "description": "The meeting this AI Notetaker was invited to." }, "type": { "const": "ai-notetaker", "description": "The type of the note", "type": "string" } }, "required": [ "type" ], "title": "notes.AiNotetakerRootNote", "x-stability-level": "beta" }, "notes.BaseNote": { "description": "An abstract base class for notes", "properties": { "content": { "$ref": "#/components/schemas/notes.Content" }, "createdAt": { "description": "The date and time the note was created", "format": "date-time", "type": "string" }, "creator": { "$ref": "#/components/schemas/PersonData" }, "id": { "description": "The id of the note", "format": "int32", "maximum": 2147483647, "minimum": 1, "type": "integer" }, "mentions": { "description": "The mentions in the note", "items": { "$ref": "#/components/schemas/notes.Mention" }, "maxItems": 100, "type": "array" }, "updatedAt": { "description": "The date and time the note was last updated", "format": "date-time", "type": [ "string", "null" ] } }, "required": [ "id", "content", "creator", "mentions", "createdAt", "updatedAt" ], "title": "notes.BaseNote", "type": "object", "x-stability-level": "beta" }, "notes.BaseReply": { "allOf": [ { "$ref": "#/components/schemas/notes.BaseNote" } ], "description": "An abstract base class for note replies, either of a UserNoteReply or AiNotetakerNoteReply", "properties": { "parent": { "properties": { "id": { "description": "The id of the parent note", "format": "int32", "maximum": 2147483647, "minimum": 1, "type": "integer" } }, "required": [ "id" ], "type": "object" } }, "required": [ "parent" ], "title": "notes.BaseReply", "type": "object", "x-stability-level": "beta" }, "notes.BaseRootNote": { "allOf": [ { "$ref": "#/components/schemas/notes.BaseNote" } ], "description": "A root note", "properties": { "companiesPreview": { "$ref": "#/components/schemas/notes.CompaniesPreview" }, "opportunitiesPreview": { "$ref": "#/components/schemas/notes.OpportunitiesPreview" }, "permissions": { "$ref": "#/components/schemas/notes.PermissionSettings" }, "personsPreview": { "$ref": "#/components/schemas/notes.PersonsPreview" }, "repliesCount": { "description": "The number of replies to this note. This is only included if the `repliesCount` parameter is passed in the `includes` in the request and the note is not a reply itself.", "format": "int32", "maximum": 2147483647, "minimum": 0, "type": "integer" } }, "title": "notes.BaseRootNote", "x-stability-level": "beta" }, "notes.CallInteraction": { "description": "This is a Call (Event) object attached to a note", "properties": { "id": { "description": "The id of the Call (Event)", "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "type": { "const": "call", "description": "The type of the Interaction", "type": "string" } }, "required": [ "id", "type" ], "title": "notes.CallInteraction", "type": "object", "x-stability-level": "beta" }, "notes.ChatMessageInteraction": { "description": "A ChatMessage object attached to a note", "properties": { "id": { "description": "The id of the ChatMessage", "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "type": { "const": "chat-message", "description": "The type of the Interaction", "type": "string" } }, "required": [ "id", "type" ], "title": "notes.ChatMessageInteraction", "type": "object", "x-stability-level": "beta" }, "notes.CompaniesPreview": { "description": "A preview for attached Companies on a Note", "properties": { "data": { "description": "Preview of attached Companies for a Note", "items": { "$ref": "#/components/schemas/CompanyData" }, "maxItems": 100, "type": "array" }, "totalCount": { "description": "The total count of the collection parameter.", "format": "int64", "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "title": "notes.CompaniesPreview", "type": "object", "x-stability-level": "beta" }, "notes.Content": { "description": "A note content", "properties": { "html": { "description": "The HTML content of the note", "type": [ "string", "null" ] } }, "required": [ "html" ], "title": "notes.Content", "type": "object", "x-stability-level": "beta" }, "notes.EmailInteraction": { "description": "This is an Email object attached to a note", "properties": { "id": { "description": "The id of the Email", "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "type": { "const": "email", "description": "The type of the Interaction", "type": "string" } }, "required": [ "id", "type" ], "title": "notes.EmailInteraction", "type": "object", "x-stability-level": "beta" }, "notes.EntitiesNote": { "allOf": [ { "$ref": "#/components/schemas/notes.BaseRootNote" } ], "description": "A Note object attached to an entity (Person, Company, Opportunity)", "properties": { "type": { "const": "entities", "description": "The type of the note", "type": "string" } }, "required": [ "type" ], "title": "notes.EntitiesNote", "x-stability-level": "beta" }, "notes.Interaction": { "description": "An interaction attached to a Note. It can be a Meeting, a Call or an ChatMessage.", "discriminator": { "mapping": { "call": "#/components/schemas/notes.CallInteraction", "chat-message": "#/components/schemas/notes.ChatMessageInteraction", "email": "#/components/schemas/notes.EmailInteraction", "meeting": "#/components/schemas/notes.MeetingInteraction" }, "propertyName": "type" }, "oneOf": [ { "$ref": "#/components/schemas/notes.MeetingInteraction" }, { "$ref": "#/components/schemas/notes.CallInteraction" }, { "$ref": "#/components/schemas/notes.ChatMessageInteraction" }, { "$ref": "#/components/schemas/notes.EmailInteraction" } ], "title": "notes.NoteInteraction", "x-stability-level": "beta" }, "notes.InteractionNote": { "allOf": [ { "$ref": "#/components/schemas/notes.BaseRootNote" } ], "description": "A Note object attached to an interaction (Email, Meeting, Call, ChatMessage)", "properties": { "interaction": { "$ref": "#/components/schemas/notes.Interaction" }, "type": { "const": "interaction", "description": "The type of the note", "type": "string" } }, "required": [ "type", "interaction" ], "title": "notes.InteractionNote", "x-stability-level": "beta" }, "notes.MeetingInteraction": { "description": "This is a Meeting (Event) object attached to a note", "properties": { "id": { "description": "The id of the Meeting (Event)", "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" }, "type": { "const": "meeting", "description": "The type of the Interaction", "type": "string" } }, "required": [ "id", "type" ], "title": "notes.MeetingInteraction", "type": "object", "x-stability-level": "beta" }, "notes.Mention": { "description": "A mention in a note.", "discriminator": { "mapping": { "person": "#/components/schemas/notes.PersonMention" }, "propertyName": "type" }, "oneOf": [ { "$ref": "#/components/schemas/notes.PersonMention" } ], "title": "notes.Mention", "x-stability-level": "beta" }, "notes.Note": { "description": "Note model", "discriminator": { "mapping": { "ai-notetaker": "#/components/schemas/notes.AiNotetakerRootNote", "ai-notetaker-reply": "#/components/schemas/notes.AiNotetakerReplyNote", "entities": "#/components/schemas/notes.EntitiesNote", "interaction": "#/components/schemas/notes.InteractionNote", "user-reply": "#/components/schemas/notes.UserReplyNote" }, "propertyName": "type" }, "oneOf": [ { "$ref": "#/components/schemas/notes.EntitiesNote" }, { "$ref": "#/components/schemas/notes.InteractionNote" }, { "$ref": "#/components/schemas/notes.AiNotetakerRootNote" }, { "$ref": "#/components/schemas/notes.UserReplyNote" }, { "$ref": "#/components/schemas/notes.AiNotetakerReplyNote" } ], "title": "notes.Note", "x-stability-level": "beta" }, "notes.NotesPaged": { "description": "NotesPaged model", "properties": { "data": { "description": "A page of Note objects", "items": { "$ref": "#/components/schemas/notes.Note" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/PaginationWithTotalCount" } }, "required": [ "data", "pagination" ], "title": "notes.NotesPaged", "type": "object", "x-stability-level": "beta" }, "notes.OpportunitiesPreview": { "description": "A preview for attached Opportunities on a Note", "properties": { "data": { "description": "Preview of attached Opportunities for a Note", "items": { "$ref": "#/components/schemas/Opportunity" }, "maxItems": 100, "type": "array" }, "totalCount": { "description": "The total count of the collection parameter.", "format": "int64", "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "title": "notes.OpportunitiesPreview", "type": "object", "x-stability-level": "beta" }, "notes.PermissionSettings": { "description": "The permission settings of a note", "properties": { "owner": { "$ref": "#/components/schemas/PersonData" }, "sharingType": { "description": "The sharing type of the note", "enum": [ "private", "public", "custom" ], "type": "string" } }, "required": [ "sharingType", "owner" ], "title": "notes.PermissionSettings", "type": "object", "x-stability-level": "beta" }, "notes.PersonMention": { "description": "A person mentioned in a note.", "properties": { "id": { "description": "The id of the mention", "format": "int32", "maximum": 2147483647, "minimum": 1, "type": "integer" }, "person": { "$ref": "#/components/schemas/PersonData" }, "type": { "const": "person", "description": "The type of mention", "type": "string" } }, "required": [ "id", "type", "person" ], "title": "notes.PersonMention", "type": "object", "x-stability-level": "beta" }, "notes.PersonsPreview": { "description": "A preview for attached Persons on a Note", "properties": { "data": { "description": "Preview of attached Persons for a Note", "items": { "$ref": "#/components/schemas/PersonData" }, "maxItems": 100, "type": "array" }, "totalCount": { "description": "The total count of the collection parameter.", "format": "int64", "maximum": 9007199254740991, "minimum": 0, "type": "integer" } }, "title": "notes.PersonsPreview", "type": "object", "x-stability-level": "beta" }, "notes.RepliesPaged": { "description": "Replies for a Note", "properties": { "data": { "description": "A page of Note Replies", "items": { "$ref": "#/components/schemas/notes.Reply" }, "maxItems": 100, "type": "array" }, "pagination": { "$ref": "#/components/schemas/PaginationWithTotalCount" } }, "required": [ "data", "pagination" ], "title": "notes.RepliesPaged", "type": "object", "x-stability-level": "beta" }, "notes.Reply": { "description": "A Reply to a Note, created by a User or AI Notetaker.", "discriminator": { "mapping": { "ai-notetaker-reply": "#/components/schemas/notes.AiNotetakerReplyNote", "user-reply": "#/components/schemas/notes.UserReplyNote" }, "propertyName": "type" }, "oneOf": [ { "$ref": "#/components/schemas/notes.UserReplyNote" }, { "$ref": "#/components/schemas/notes.AiNotetakerReplyNote" } ], "title": "notes.Reply", "x-stability-level": "beta" }, "notes.UserReplyNote": { "allOf": [ { "$ref": "#/components/schemas/notes.BaseReply" } ], "description": "A reply to a note created by a user", "properties": { "type": { "const": "user-reply", "description": "The type of the note", "type": "string" } }, "required": [ "type" ], "title": "notes.UserReplyNote", "type": "object", "x-stability-level": "beta" } }, "securitySchemes": { "bearerAuth": { "scheme": "bearer", "type": "http" } } }, "info": { "contact": { "email": "support@affinity.co", "name": "Affinity Support", "url": "https://support.affinity.co" }, "description": "# Introduction\n\nWelcome to Affinity API v2! This API provides a RESTful interface for building internal apps,\nautomated workflows, 3rd party integrations, and for connecting Affinity to the rest of your tech\nstack.\n\nThe legacy Affinity v1 API can be found [here](https://api-docs.affinity.co/). The v2 API is not at\nfeature parity with v1 - we are continuing to develop new v2 APIs to support all v1 functionality\nover time.\n\n**The Affinity APIs are only available on select license types.** See\n[this Help Center article](https://support.affinity.co/hc/en-us/articles/5563700459533-Getting-started-with-the-Affinity-API-FAQs)\nor contact your Customer Success Manager for more information.\n\n# Getting Started\n\nAll Affinity API endpoints use the base URL `https://api.affinity.co`. All v2 endpoint paths start\nwith `/v2`. Requests must be sent over HTTPS.\n\nThe first few sections of these docs cover general information on the API. Each subsequent section\ncovers a set of API endpoints.\n\nEach endpoint is documented with its accepted request parameters, expected response shapes, and a\nsample request and response. The shape of a given response can vary depending on what \"type\" of\nobject or data is being returned. When this is the case, the response documentation will include a\ndropdown that can be used to select the \"type\" for which to display the response shape.\n\n## Authentication\n\nAffinity API v2 uses API keys and **bearer authentication** (this is an important difference from\nAffinity API v1's use of basic authentication).\n\nTo generate an API key, navigate to the Settings page in the Affinity web app. You will need the\n\"Generate an API key\" role-based permission controlled by your Affinity admin. See\n[this Help Center article](https://support.affinity.co/hc/en-us/articles/360032633992-How-to-obtain-your-API-Key)\nfor full instructions on API key generation, and\n[this article](https://support.affinity.co/hc/en-us/articles/360015976732-Account-Level-Permissions)\nfor more information on role-based permissions in Affinity.\n\nProvide your API key as your bearer authentication token to start making calls to Affinity API v2.\n\nWe support one API key per user in your Affinity account. Your API key is able to read data and\nperform actions in Affinity on your behalf, so keep it safe as you would a password.\n\n## Permissions\n\n### Overall Requirements\n\nYou must have the \"Generate an API key\" permission to be able to work with the Affinity API. Most\nusers in Affinity have this by default \u2014 Contact your Affinity admin if you are not able to generate\nan API key, and see\n[this article](https://support.affinity.co/hc/en-us/articles/360015976732-Account-Level-Permissions)\nfor more information on role-based permissions in Affinity.\n\n### Resource-Level Permissions\n\nThe Affinity API respects sharing permissions that are set in-product. For example, if a given user\ndoes not have access to a list, note, or interaction in-product, they will not be able to see or\nmodify it via API.\n\n### Endpoint-Level Permissions\n\nMany API endpoints require endpoint-specific permissions in-product. These permissions, along with\nthe \"Generate an API key\" permission, are managed by your Affinity admin in the Settings page. In\nthe description of each endpoint you will see the required permissions needed.\n\n## Rate Limits\n\nThe Affinity API sets a limit on the number of calls that a user can make per minute, and that all\nthe users on an account can make per month. It also sets a reasonable limit on the number of\nconcurrent requests it will support from an account at one time.\n\nRequests to **both** Affinity API versions will count toward the one pool of requests allowed for a\nuser or account. Once a per-minute, monthly, or concurrent rate limit is hit, subsequent requests\nwill return an error code of 429. **We highly recommend designing your application to handle 429\nerrors.**\n\n### Per-Minute Limits (User-Level)\n\nTo help protect our systems, API requests will be halted at **900 per user, per minute.** We may\nalso lower this limit on a temporary basis to manage API availability.\n\n### Concurrent Request Limits (Account-Level)\n\nTo protect our systems and manage availability across customers, we set a reasonable limit on\nconcurrent requests at the account level. Customers should not expect to hit this limit unless they\nare hitting the API with heavy operations from many concurrent threads at once.\n\n### Monthly Plan Tier Limits (Account-Level)\n\nThe overall number of requests you can make per month will depend on your account's plan tier.\n**This monthly account-level limit resets at the end of each calendar month.** Current rate limits\nby plan tier are:\n\n| Plan Tier | Calls Per Month |\n| ---------- | --------------- |\n| Essentials | None |\n| Scale | 100k |\n| Advanced | 100k |\n| Enterprise | Unlimited\\* |\n\n\\*Per-Minute and Concurrent Request Limits still apply.\n\n### Rate Limit Headers\n\nAll API calls will return the following response headers with information about per-minute and\nmonthly limits:\n\n| Header | Description |\n| -------------------------------- | ------------------------------------------------------- |\n| X-Ratelimit-Limit-User | Number of requests allowed per minute for the user |\n| X-Ratelimit-Limit-User-Remaining | Number of requests remaining for the user |\n| X-Ratelimit-Limit-User-Reset | Time in seconds before the limit resets for the user |\n| X-Ratelimit-Limit-Org | Number of requests allowed per month for the account |\n| X-Ratelimit-Limit-Org-Remaining | Number of requests remaining for the account |\n| X-Ratelimit-Limit-Org-Reset | Time in seconds before the limit resets for the account |\n\n## Pagination\n\nWhen an endpoint is expected to return multiple results, we break the results into pages to make\nthem easier to handle. To cycle forward through multiple pages of data, look for the `nextUrl`\nproperty in the `pagination` portion of an API response, and use it for your next request. See\nendpoint documentation for more information.\n\n## Filtering\n\nSome endpoints support a filtering language for flexible and powerful queries. This allows for the\ncreation of complex filter expressions using different operators and boolean logic in a single\nfilter string. The description of each endpoint will contain information on which filter properties\nand operators are supported.\n\n### Rules\n\n- Spaces are insignificant by default. For example, `field = hello` and `field=hello` are both\n valid.\n- If spaces are significant, they need to be inside double quotes, for example,\n `field = \"hello world\"`\n- Special characters need to be escaped with a backslash: `field=\"hello\\\" world\"`
Full list of\n special characters: `\\ * ~ ! & = > < $ ^ | \" ' ( ) ] [ /`\n- Use `&` and `|` for boolean operations: `foo = 1 | baz = 2 & bar = 3`. Boolean Algebra Logic is\n assumed: `&` takes precedence over `|`. When evaluating the condition above, `baz = 2 & bar = 3`\n will be computed first, and then the result will be `or`'ed with `foo=1`\n- Parentheses can be used to specify the order of operations. In the example above, to make sure\n that `foo = 1 | baz = 2` is evaluated first, parentheses must be placed\n `(foo = 1 | baz = 2) & bar = 3`\n\n### Grammar\n\n#### Simple Types\n\n| Definition | Property Type | Operator | Example |\n| ------------------------ | ---------------------------------------------------- | -------- | ----------------------------------------------------------------------------------------- |\n| exact match | all | = | content = \u201chello world\u201d
content=hello |\n| starts with | text | =^ | content =^ he |\n| ends with | text | =$ | content =$ llo |\n| contains | text | =~ | content =~ lo |\n| greater than | int32, int64, float, double, decimal, date, datetime | \\> | count > 1 |\n| greater than or equal to | int32, int64, float, double, decimal, date, datetime | \\>= | content >= 1 |\n| less than | int32, int64, float, double, decimal, date, datetime | \\< | count < 1 |\n| less than or equal to | int32, int64, float, double, decimal, date, datetime | \\<= | content <= 1 |\n| is NULL | all | != \\* | content != \\* |\n| is not NULL | all | =\\* | content = \\* |\n| is empty | text | =\"\" | content = \"\" |\n| negation | all | ! | content != \u201dhello world\u201d
!(content = \u201dhello world\u201d)
!(content =^ \u201chello world\u201d) |\n\n#### Collections (all types)\n\n| Definition | Operator | Example |\n| ------------------------- | -------- | ------------------------------------ |\n| exact match with ordering | = | industries = [Healthcare,Fintech] |\n| contains all | =~ | industries =~ [Healthcare,Fintech] |\n| empty | =[] | industries =[] |\n| negation | ! | !(industries = [Healthcare,Fintech]) |\n\n## Error Codes\n\nHere is a list of the error codes the API will return if something goes wrong (see endpoint\ndocumentation for endpoint-specific errors):\n\n| Error Code | Meaning |\n| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| 400 | Bad Request \u2014 See endpoint documentation for more information. |\n| 401 | Unauthorized \u2014 Your API key is invalid. |\n| 403 | Forbidden \u2014 Insufficient rights to a resource. |\n| 404 | Not Found \u2014 Requested resource does not exist. See endpoint documentation for more information. |\n| 405 | Method Not Allowed \u2014 The method being used is not supported for this resource. |\n| 422 | Unprocessable Entity \u2014 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. |\n| 429 | Too Many Requests \u2014 You have exceeded the rate limit. |\n| 500 | Internal Server Error \u2014 We had a problem with our server. Try again later. |\n| 503 | Service Unavailable \u2014 This shouldn't generally happen. Contact us if you encounter this error. |\n\n## Beta Endpoints\n\nYou\u2019ll notice in our documentation that some endpoints will be marked as BETA. These endpoints are\nnewly released and will eventually progress to General Availability (GA). While an endpoint is in\nBETA there are some important things to consider:\n\n- The development of this endpoint may still be in progress. This means new capabilities, request\n parameters, response data, and performance improvements may be adjusted over time. Because of\n this, breaking changes may occur to the endpoint WITHOUT notice or versioning.\n- As this is an early release, bug fixes may still be ongoing as well, and we encourage you to\n report bugs to [support@affinity.co](mailto:support@affinity.co).\n- In addition, your feedback around the capabilities of the endpoint are highly valuable, please\n reach out to your CSM to provide feedback to our product team.\n\n# Data Model\n\n## The Basics\n\nThe three top-level objects in Affinity are **Persons, Companies, and Opportunities**. (Note:\nCompanies are called Organizations in the Affinity web app.) These have profiles in the Affinity web\napp and can be added to Lists.\n\nA **List** is a spreadsheet-like collection of rows tied to Persons, Companies, or Opportunities.\n\n- Each row on a List is a **List Entry**. A List Entry contains data and metadata about a given\n Person, Company, or Opportunity in the context of a List. This includes list-specific field data,\n and information about who added the row to the List and when.\n- A given entity can be added to a List more than once. These List Entries can have different\n List-specific field data and List Entry-level metadata.\n\nEach column on a List maps to a **Field**. Fields show up within Affinity profile pages, extensions,\nand integrations. There are two categories of fields:\n\n- **List-specific fields** are scoped to a single List. In the API, their data can only be accessed\n through the List Entry resource.\n- **Global fields** belong to entities directly. These can include default fields, fields created by\n you, enrichment fields, or relationship intelligence fields. They can be accessed through the\n Person/Company/Opportunity resources and the List Entry resource.\n\n## Working with Field Data\n\n### Field Types and IDs\n\nHere is a deeper look at the types of Fields in Affinity, differentiated by the scope and source of\ntheir data:\n\n| Field Type | Description | Example Fields | Field ID Pattern |\n| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |\n| `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\" | A string representing the enrichment source, followed by the field name, e.g. `affinity-data-description` or `dealroom-number-of-employees`. |\n| `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` |\n| `global` | Fields that persist across an Affinity account and are not list-specific. | \"My Firm's Founder Scoring Column\" | `field-`, followed by a unique integer, e.g. `field-1234` |\n| `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` |\n\n### Field Value Types\n\nField data can take a variety of shapes. These value types are described in the Affinity Help Center\n[here](https://support.affinity.co/hc/en-us/articles/115001608232-How-to-create-a-new-column-in-a-list).\nHere is a list of the same value types, as represented in this API. Notice how array types end with\n`-multi`:\n\n| Single Type | Array Type |\n| ------------------- | ------------------------- |\n| `text` | Not supported in Affinity |\n| `number` | `number-multi` |\n| `datetime` | Not supported in Affinity |\n| `location` | `location-multi` |\n| `dropdown` | `dropdown-multi` |\n| `ranked-dropdown` | Not supported in Affinity |\n| `person` | `person-multi` |\n| `company` | `company-multi` |\n| `filterable-text`\\* | `filterable-text-multi`\\* |\n\n\\*Note that `filterable-text` and `filterable-text-multi` are special types that operate similarly\nto `dropdown` and `dropdown-multi`. They are reserved for Affinity-populated Fields, and users\ncannot create Fields with these types.\n\nWhen an array-typed value has no data in it, the API will return `null` (rather than an empty\narray).\n\n### Retrieving Field Data\n\nTo retrieve field data on companies, persons, or opportunities, call GET `/v2/companies`, GET\n`/v2/persons`, or one of our GET `*/list-entries` endpoints. (Note that Opportunities only have\nlist-specific Fields, so all their field data will live on the `*/list-entries` endpoints.) For most\nof these endpoints, you will need to specify the Fields for which you want data returned via the\n`fieldIds` or `fieldTypes` parameter \u2014 Otherwise, entities will be returned without any field data\nattached.\n\nThe GET `/v2/companies` and `/v2/persons` endpoints can return entities with enriched, global, and\nrelationship intelligence field data attached, but do not support list-specific field data. **To get\ncomprehensive field data including list-specific field data on Companies and Persons, use the GET\n`*/list-entries` endpoints.**\n\n### Specifying Desired Fields (Field Selection)\n\nAs mentioned above, you will need to specify the Fields (either by ID or by Type) for which you want\ndata returned when using the following endpoints:\n\n- GET `/v2/companies`\n- GET `/v2/companies/{id}`\n- GET `/v2/persons`\n- GET `/v2/persons/{id}`\n- GET `/v2/lists/{listId}/list-entries`\n\nEach of these endpoints has a `fieldIds` parameter that accepts an array of Field IDs, and a\n`fieldTypes` parameter that accepts an array of Field Types. Use the GET `*/fields` endpoints to get\nField IDs, Field Types, and other Field-level metadata:\n\n- Call GET `/v2/companies/fields` and `/v2/persons/fields` to get a list of the enriched, global,\n and relationship intelligence (AKA non-list-specific) Fields that exist on Companies and Persons,\n respectively. These are the Fields whose values are available to pull via GET `/v2/companies`, GET\n `/v2/companies/{id}`, GET `/v2/persons`, and `/v2/persons/{id}`.\n- Call GET `/v2/lists/{listId}/fields` to get a list of the enriched, global, relationship\n intelligence, **and list-specific** Fields for a given List. These are the Fields whose values are\n available to pull via GET `/v2/lists/{listId}/list-entries`.\n\nThe following endpoints don't require field selection:\n\n- GET `/v2/lists/{listId}/saved-views/{viewId}/list-entries` \u2014 See below. This endpoint returns just\n the field data that has been pulled into the given Saved View via UI.\n- GET `/v2/companies/{id}/list-entries` and GET `/v2/persons/{id}/list-entries` \u2014 These endpoints\n return comprehensive field data for the given person or company in the context of each List Entry.\n\n### Saved Views\n\nA Saved View allows a user to configure the Fields they want to see in the UI for a given List, and\nset filters and sorts on the rows on that List. A List can have multiple Saved Views. In the context\nof this API, Saved Views can be useful for specifying the exact Fields for which data is needed. The\n`*/saved-views/{viewId}/list-entries` endpoint also respects the filters that have been set on the\ngiven Saved View in the Affinity web app. (It does not, however, respect sorts just yet.)\n\n### Partner Data Restrictions\n\nThis API supports pulling data from\n[Affinity Data](https://support.affinity.co/hc/en-us/articles/360058255052-Affinity-Data) fields and\nselect\n[Dealroom fields](https://support.affinity.co/hc/en-us/articles/6106558518797-Dealroom-co-data-in-Affinity#h_01G2N22SVH7TJR3DJV3NQDE9HQ).\nDue the agreements we have with some of our data partners, the API does not expose data from the\nfollowing sources:\n\n- Crunchbase, including Crunchbase UUID\n- Pitchbook\n- [Dealroom \"exclusive\" fields](https://support.affinity.co/hc/en-us/articles/6106558518797-Dealroom-co-data-in-Affinity#h_01G2N22YEAZJ5TC1X9ENKZFWF5)\n\n## Nested Associations\n\nSome GET endpoints return \"association\" data under `fields`. For example, the Persons GET endpoints\nreturn data about which Companies a Person is associated with in Affinity. The Opportunities GET\nendpoints return similar data about associated Companies and Persons. The List Entries GET endpoints\nalso return this data for Person and Opportunity List Entries.\n\nThe API truncates these nested arrays of Persons or Companies **at 100 entries**. For example, if an\nOpportunity is associated with 200 Persons in Affinity, only 100 of those Persons will be returned\nby the GET `/opportunities` or `/opportunities/{id}` endpoint.\n\n# User Guides\n\n## A Tour of Our GET Endpoints\n\n| Desired Data | Relevant Endpoints | Notes |\n| ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |\n| Company/Person/Opportunity rows from a List | Grab the List\u2019s ID from its URL in the Affinity web app, then hit GET `/v2/lists/{listId}/list-entries` | Data returned will be restricted to the rows on the requested List |\n| Company/Person/Opportunity rows from a Saved View | In the Affinity web app, navigate to a List and [create a Saved View](https://support.affinity.co/hc/en-us/articles/115001508572-How-to-leverage-saved-views-within-a-list) with the desired field data and filters on it. Grab the List and Saved View IDs from the web app URL, then hit GET `/v2/lists/{listId}/saved-views/{viewId}/list-entries` | Data returned will be restricted to the rows and columns on the requested Saved View |\n| Full rolodex of Companies or Persons in Affinity | GET `/v2/companies`, GET `/v2/persons` | Data from list-specific Fields will not be returned |\n| All the rows for a given Company or Person across all Lists | GET `/v2/companies/{id}/list-entries`, GET `/v2/persons/{id}/list-entries` | |\n| Metadata on Fields, including Field IDs | GET `/v2/companies/fields`, GET `/v2/persons/fields`, GET `/v2/lists/{listId}/fields` | Metadata on list-specific Fields will only be returned by GET `/v2/lists/{listId}/fields` |\n| Metadata on Lists or Saved Views | GET `/v2/lists`, GET `/v2/lists/{listId}/saved-views` | |\n| Opportunity data | GET `/v2/opportunities` will only return Opportunity names and List IDs. For comprehensive Opportunity data, hit GET `/v2/lists/{listId}/list-entries` for an Opportunity List | |\n\nTip: The ID for a List, Saved View, Person, Company, or Opportunity can always be found in its\nAffinity web app URL.\n\n# Changelog\n\n## May 14th, 2025\n\n- Renamed all path parameters named simply \"id\" to a more descriptive name (eg. \"personId\"). This\n will not have any effect on the API at runtime, but may impact code relying on the OpenAPI spec\n doing type generation.\n\n## April 9th, 2025\n\n- The following endpoints are no longer in BETA:\n\n| Method | URL | Summary |\n| ------ | ---------------------------------------------------------------- | ------------------------------------------------- |\n| GET | `/v2/lists/{listId}/list-entries/{listEntryId}` | Get a single List Entry on a List |\n| GET | `/v2/lists/{listId}/list-entries/{listEntryId}/fields` | Get field values on a single List Entry |\n| PATCH | `/v2/lists/{listId}/list-entries/{listEntryId}/fields` | Perform batch operations on a list entry's fields |\n| GET | `/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}` | Get a single field value |\n| POST | `/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}` | Update a single field value on a List Entry |\n\n## March 31st, 2025\n\n- The following beta endpoints now support updating association fields.\n\n| Method | URL | Summary |\n| ------ | ---------------------------------------------------------------- | ------------------------------------------------- |\n| PATCH | `/v2/lists/{listId}/list-entries/{listEntryId}/fields` | Perform batch operations on a list entry's fields |\n| POST | `/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}` | Update a single field value on a List Entry |\n\n## February 28th, 2025\n\n- Added the following endpoints in BETA:\n\n| Method | URL | Summary |\n| ------ | ---------------------------------------------------------------- | ------------------------------------------------- |\n| GET | `/v2/lists/{listId}/list-entries/{listEntryId}` | Get a single List Entry on a List |\n| GET | `/v2/lists/{listId}/list-entries/{listEntryId}/fields` | Get field values on a single List Entry |\n| PATCH | `/v2/lists/{listId}/list-entries/{listEntryId}/fields` | Perform batch operations on a list entry's fields |\n| GET | `/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}` | Get a single field value |\n| POST | `/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}` | Update a single field value on a List Entry |\n\n## January 17th, 2025\n\n- Document `X-Ratelimit` headers in the schema for all endpoints.\n\n## January 15th, 2025\n\n- Add default responses to all endpoints to document all possible error codes that can be returned\n by the API.\n- Updated 400 error responses to correctly include the `bad-request` error code as a possible error.\n\n## December 3rd, 2024\n\n- Properly document `listId` property on `CompanyListEntry`, `PersonListEntry`, and\n `OpportunityListEntry` schemas.\n\n## September 25th, 2024\n\n- Upgrade schema to OpenAPI 3.1\n\n## August 5, 2024\n\n- Correct `opp` to `opportunity` to match documentation for the `List` `type` property.\n\n## July 24, 2024\n\n- More accurate documentation for response properties that are enums \u2014 Enums with `null` as a\n possible value will have it listed as one.\n\n## March 25, 2024\n\n- Added the ability to retrieve the date and other details of your firm's \"First Email\", \"Last\n Email\", \"First Event\", \"Last Event\", \"Next Event\", \"First Chat Message\", \"Last Chat Message\", and\n \"Last Contact\" with a given entity. Use these timestamps to add relationship context to your\n applications, and to identify founders and companies that need investors' attention.\n- Endpoints that previously required a `fieldIds` parameter to return field data, now accept either\n `fieldIds` or `fieldTypes`, and will return field data accordingly. See the\n [Specifying Desired Fields (Field Selection)](#section/Data-Model/Working-with-Field-Data) section\n of these docs for more information. The new `fieldTypes` parameter should make field data\n retrieval easier for users looking to pull data from many similar Fields at a time.\n\n## January 4, 2023\n\n- Most endpoints that return field data now require the user to use the `fieldIds` parameter to\n specify which Fields they want data for. Without `fieldIds` specified, these endpoints will return\n basic entity data but not field data.\n\n## December 12, 2023\n\n- Added the ability to retrieve metadata (e.g. ID, name, type, enrichment source, and data type) on\n Fields. See the [Retrieving Field Metadata](#section/Data-Model/Working-with-Field-Data) section\n of these docs for more information.\n", "license": { "name": "Proprietary", "url": "https://www.affinity.co/legal/terms-of-use" }, "termsOfService": "https://www.affinity.co/legal/terms-of-use", "title": "Affinity API v2", "version": "", "x-affinity-api-version": "2024-01-01", "x-logo": { "altText": "Affinity logo", "url": "https://s3.us-west-2.amazonaws.com/assets.affinity.co/img/logos/full-color-svg.svg" } }, "openapi": "3.1.1", "paths": { "/v2/auth/whoami": { "get": { "description": "Returns information about the authenticated user, their current organization, and API key permissions.\nUse this endpoint to verify your authentication and understand your available API access levels.", "operationId": "v2_auth_whoami__GET", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WhoAmI" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get current user", "tags": [ "auth" ] } }, "/v2/companies": { "get": { "description": "Paginate through Companies in Affinity.\nReturns basic information and non-list-specific field data on each Company.\n\nTo retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter\nto specify the Fields for which you want data returned.\nThese Field IDs and Types can be found using the GET `/v2/companies/fields` endpoint.\nWhen no `fieldIds` or `fieldTypes` are provided, Companies will be returned without any field data attached.\nTo supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this:\n`?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`.\n\nRequires the \"Export All Organizations directory\" [permission](#section/Getting-Started/Permissions).", "operationId": "v2_companies__GET", "parameters": [ { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "examples": [ 100 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } }, { "description": "Company IDs", "example": [ 1, 2 ], "explode": true, "in": "query", "name": "ids", "schema": { "items": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" }, "type": "array" }, "style": "form" }, { "description": "Field IDs for which to return field data", "example": [ "field-1", "field-2" ], "explode": true, "in": "query", "name": "fieldIds", "schema": { "examples": [ [ "field-1" ] ], "items": { "type": "string" }, "type": "array" }, "style": "form" }, { "description": "Field Types for which to return field data", "example": [ "enriched", "global" ], "explode": true, "in": "query", "name": "fieldTypes", "schema": { "items": { "enum": [ "enriched", "global", "relationship-intelligence" ], "type": "string" }, "type": "array" }, "style": "form" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get all Companies", "tags": [ "companies" ] } }, "/v2/companies/fields": { "get": { "description": "Returns metadata on non-list-specific Company Fields.\n\nUse the returned Field IDs to request field data from the GET `/v2/companies` and GET `/v2/companies/{id}` endpoints.", "operationId": "v2_companies_fields__GET", "parameters": [ { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "examples": [ 100 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FieldMetadataPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get metadata on Company Fields", "tags": [ "companies" ] } }, "/v2/companies/{companyId}": { "get": { "description": "Returns basic information and non-list-specific field data on the requested Company.\n\nTo retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter\nto specify the Fields for which you want data returned.\nThese Field IDs and Types can be found using the GET `/v2/companies/fields` endpoint.\nWhen no `fieldIds` or `fieldTypes` are provided, Companies will be returned without any field data attached.\nTo supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this:\n`?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`.\n\nRequires the \"Export All Organizations directory\" [permission](#section/Getting-Started/Permissions).", "operationId": "v2_companies_companyId__GET", "parameters": [ { "description": "Company ID", "in": "path", "name": "companyId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Field IDs for which to return field data", "example": [ "field-1", "field-2" ], "explode": true, "in": "query", "name": "fieldIds", "schema": { "examples": [ [ "field-1" ] ], "items": { "type": "string" }, "type": "array" }, "style": "form" }, { "description": "Field Types for which to return field data", "example": [ "enriched", "global" ], "explode": true, "in": "query", "name": "fieldTypes", "schema": { "items": { "enum": [ "enriched", "global", "relationship-intelligence" ], "type": "string" }, "type": "array" }, "style": "form" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Company" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get a single Company", "tags": [ "companies" ] } }, "/v2/companies/{companyId}/list-entries": { "get": { "description": "Paginate through the List Entries (AKA rows) for the given Company across all Lists.\nEach List Entry includes field data for the Company, including list-specific field data.\nEach List Entry also includes metadata about its creation, i.e., when it was added to the List and by whom.\n\nRequires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).", "operationId": "v2_companies_companyId_list-entries__GET", "parameters": [ { "description": "Company ID", "in": "path", "name": "companyId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "examples": [ 100 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListEntryPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get a Company's List Entries", "tags": [ "companies" ] } }, "/v2/companies/{companyId}/lists": { "get": { "description": "Paginate through all Lists where the given Company appears as an entry and that you have access to view.\nReturns basic List information for each List that contains this Company.", "operationId": "v2_companies_companyId_lists__GET", "parameters": [ { "description": "Company ID", "in": "path", "name": "companyId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "examples": [ 100 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get a Company's Lists", "tags": [ "companies" ] } }, "/v2/companies/{companyId}/notes": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\nReturns relevant notes for a given company which includes directly attached notes and notes attached to persons on this company.\n\nYou can filter notes using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties.\n| **Property Name** | **Description** | **Type** | **Allowed Operators** | **Examples** |\n|-----------------------------|-----------------------------------------------------------------|------------|--------------------------------------|---------------------------------|\n| `creator.id` | Filter notes by the creator of the note | `int32` | `=` | `creator.id=1` |\n| `createdAt` | Filter notes by when it was created | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-02-04T10:48:24Z` |\n| `updatedAt` | Filter notes by when it was updated | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-02-03T10:48:24Z`|\n", "operationId": "v2_companies_companyId_notes__GET", "parameters": [ { "description": "Company's ID", "in": "path", "name": "companyId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Filter options", "in": "query", "name": "filter", "schema": { "type": "string" } }, { "description": "Cursor for the next or previous page", "in": "query", "name": "cursor", "schema": { "type": "string" } }, { "description": "Number of items to include in the page", "in": "query", "name": "limit", "schema": { "default": 20, "format": "int32", "maximum": 100, "minimum": 0, "type": "integer" } }, { "description": "Include total count of the collection in the pagination response", "in": "query", "name": "totalCount", "schema": { "default": false, "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/notes.NotesPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get Notes for a Company", "tags": [ "companies" ], "x-stability-level": "beta" } }, "/v2/company-merges": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\n\nRetrieve paginated company merges for the organization.\n\n\nReturns all company merges initiated by users in your organization, including their current\nstatus, 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:\n\n\n| Property | Type | Operators | Values | Examples |\n|----------|------|-----------|--------|----------|\n| `status` | `enum` | `=` | `in-progress`, `success`, `failed` | `status=failed` |\n| `taskId` | `string` | `=` | | `taskId=789e0123-e45b-67c8-d901-234567890123` |\n\n\nCompany merges are returned in reverse chronological order (most recent first).\n\n\nRequires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and\norganization admin role.\n", "operationId": "v2_company-merges__GET", "parameters": [ { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } }, { "description": "Filter company merges using Affinity Filtering Language", "example": "status=failed | taskId=789e0123-e45b-67c8-d901-234567890123", "in": "query", "name": "filter", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "merges-list": { "$ref": "#/components/examples/merges-list" } }, "schema": { "$ref": "#/components/schemas/CompanyMergeStatePaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get All Company Merges", "tags": [ "companyMerges" ], "x-stability-level": "beta" }, "post": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\nInitiate a company merge to combine a duplicate company profile into a primary company profile.\n\nThis 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](#tag/companyMerges/operation/v2_tasks_company-merges_taskId__GET).\n\nRequires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.", "operationId": "v2_company-merges__POST", "requestBody": { "content": { "application/json": { "examples": { "merge-companies": { "$ref": "#/components/examples/merge-companies" } }, "schema": { "$ref": "#/components/schemas/CompanyMergeRequest" } } }, "required": true }, "responses": { "202": { "content": { "application/json": { "examples": { "merge-initiated": { "$ref": "#/components/examples/merge-initiated" } }, "schema": { "$ref": "#/components/schemas/CompanyMergeResponse" } } }, "description": "Accepted", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Initiate Company Merge", "tags": [ "companyMerges" ], "x-stability-level": "beta" } }, "/v2/company-merges/{mergeId}": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\nRetrieve the status and details of a specific company merge.\n\nReturns information about the company merge including its current status, the companies involved, timestamps, and any error information if the merge failed.\n\nThe `mergeId` can be obtained from the response of the [Get All Company Merges](#tag/companyMerges/operation/v2_company-merges__GET) endpoint, or by filtering company merges by task ID using `/v2/company-merges?filter=taskId={taskId}` after initiating a merge.\n\nRequires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.", "operationId": "v2_company-merges_mergeId__GET", "parameters": [ { "description": "Company merge ID", "in": "path", "name": "mergeId", "required": true, "schema": { "examples": [ 12345 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "completed-merge": { "$ref": "#/components/examples/succeeded-merge" }, "failed-merge": { "$ref": "#/components/examples/failed-merge" }, "in-progress-merge": { "$ref": "#/components/examples/in-progress-merge" } }, "schema": { "$ref": "#/components/schemas/CompanyMergeState" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get Company Merge", "tags": [ "companyMerges" ], "x-stability-level": "beta" } }, "/v2/emails": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\nPaginate through all emails in Affinity. Returns basic information about the email interaction\nand its participants. Will only return emails or subject lines that the current authenticated\nuser has permission to see. This endpoint is currently in a Closed Beta; to get access reach\nout to your Affinity CSM.\n", "operationId": "v2_emails__GET", "parameters": [ { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "examples": [ 100 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } }, { "description": "Filter options", "example": "id=1234", "in": "query", "name": "filter", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/interactions.EmailPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get metadata on all Emails", "tags": [ "emails" ], "x-stability-level": "beta" } }, "/v2/lists": { "get": { "description": "Paginate through all Lists in your organization that you have access to view.\nReturns basic information about each List, including name, owner, and privacy settings.", "operationId": "v2_lists__GET", "parameters": [ { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "examples": [ 100 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "success": { "$ref": "#/components/examples/success" } }, "schema": { "$ref": "#/components/schemas/ListWithTypePaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get metadata on all Lists", "tags": [ "lists" ] } }, "/v2/lists/{listId}": { "get": { "description": "Retrieve detailed information about a specific List you have access to view.\nReturns List configuration including name, owner, privacy settings, and creation details.", "operationId": "v2_lists_listId__GET", "parameters": [ { "description": "List ID", "in": "path", "name": "listId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "company-list": { "$ref": "#/components/examples/company-list" }, "opportunity-list": { "$ref": "#/components/examples/opportunity-list" }, "person-list": { "$ref": "#/components/examples/person-list" } }, "schema": { "$ref": "#/components/schemas/ListWithType" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get metadata on a single List", "tags": [ "lists" ] } }, "/v2/lists/{listId}/fields": { "get": { "description": "Returns metadata on the Fields available on a single List.\n\nUse the returned Field IDs to request field data from the GET `/v2/lists/{listId}/list-entries` endpoint.", "operationId": "v2_lists_listId_fields__GET", "parameters": [ { "description": "List ID", "in": "path", "name": "listId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "examples": [ 100 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "company-list": { "$ref": "#/components/examples/company-list-2" }, "opportunity-list": { "$ref": "#/components/examples/opportunity-list-2" }, "person-list": { "$ref": "#/components/examples/person-list-2" } }, "schema": { "$ref": "#/components/schemas/FieldMetadataPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get metadata on a single List's Fields", "tags": [ "lists" ] } }, "/v2/lists/{listId}/list-entries": { "get": { "description": "Paginate through the List Entries (AKA rows) on a given List.\nReturns basic information and field data, including list-specific\nfield data, on each Company, Person, or Opportunity on the List.\nList Entries also include metadata about their creation,\ni.e., when they were added to the List and by whom.\n\nTo retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter\nto specify the Fields for which you want data returned.\nThese Field IDs and Types can be found using the GET `/v2/lists/{listId}/fields` endpoint.\nWhen no `fieldIds` or `fieldTypes` are provided, List Entries will be returned without any field data attached.\nTo supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this:\n`?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`.\n\nRequires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).", "operationId": "v2_lists_listId_list-entries__GET", "parameters": [ { "description": "List ID", "in": "path", "name": "listId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "examples": [ 100 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } }, { "description": "Field IDs for which to return field data", "example": [ "field-1", "field-2" ], "explode": true, "in": "query", "name": "fieldIds", "schema": { "examples": [ [ "field-1" ] ], "items": { "type": "string" }, "type": "array" }, "style": "form" }, { "description": "Field Types for which to return field data", "example": [ "enriched", "global" ], "explode": true, "in": "query", "name": "fieldTypes", "schema": { "items": { "enum": [ "enriched", "global", "list", "relationship-intelligence" ], "type": "string" }, "type": "array" }, "style": "form" } ], "responses": { "200": { "content": { "application/json": { "examples": { "company-list-enriched": { "$ref": "#/components/examples/company-list-enriched" }, "company-list-global-and-list": { "$ref": "#/components/examples/company-list-global-and-list" }, "company-list-relationship-intelligence": { "$ref": "#/components/examples/company-list-relationship-intelligence" } }, "schema": { "$ref": "#/components/schemas/ListEntryWithEntityPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get all List Entries on a List", "tags": [ "lists" ] } }, "/v2/lists/{listId}/list-entries/{listEntryId}": { "get": { "description": "Retrieve a single list entry.\nReturns basic information and field data, including list-specific field data.\n\nTo retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter\nto specify the Fields for which you want data returned.\nThese Field IDs and Types can be found using the GET `/v2/lists/{listId}/fields` endpoint.\nWhen no `fieldIds` or `fieldTypes` are provided, the List Entry will be returned without any field data attached.\nTo supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this:\n`?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`.\n\nRequires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).", "operationId": "v2_lists_listId_list-entries_listEntryId__GET", "parameters": [ { "description": "List ID", "in": "path", "name": "listId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "List Entry ID", "in": "path", "name": "listEntryId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Field IDs for which to return field data", "example": [ "field-1", "field-2" ], "explode": true, "in": "query", "name": "fieldIds", "schema": { "examples": [ [ "field-1" ] ], "items": { "type": "string" }, "type": "array" }, "style": "form" }, { "description": "Field Types for which to return field data", "example": [ "enriched", "global" ], "explode": true, "in": "query", "name": "fieldTypes", "schema": { "items": { "enum": [ "enriched", "global", "list", "relationship-intelligence" ], "type": "string" }, "type": "array" }, "style": "form" } ], "responses": { "200": { "content": { "application/json": { "examples": { "company-list-enriched": { "$ref": "#/components/examples/company-list-enriched-2" }, "company-list-global-and-list": { "$ref": "#/components/examples/company-list-global-and-list-2" }, "company-list-relationship-intelligence": { "$ref": "#/components/examples/company-list-relationship-intelligence-2" } }, "schema": { "$ref": "#/components/schemas/ListEntryWithEntity" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get a single List Entry on a List", "tags": [ "lists" ] } }, "/v2/lists/{listId}/list-entries/{listEntryId}/fields": { "get": { "description": "Paginate through all field values on a single list entry.\n\nAll fields will be included by default. The `ids` and `types` parameters can be used to filter the collection.\n\nRequires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).", "operationId": "v2_lists_listId_list-entries_listEntryId_fields__GET", "parameters": [ { "description": "List ID", "in": "path", "name": "listId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "List Entry ID", "in": "path", "name": "listEntryId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Field IDs for which to return field data", "example": [ "field-1", "field-2" ], "explode": true, "in": "query", "name": "ids", "schema": { "examples": [ [ "field-1" ] ], "items": { "type": "string" }, "type": "array" }, "style": "form" }, { "description": "Field Types for which to return field data", "example": [ "enriched", "global" ], "explode": true, "in": "query", "name": "types", "schema": { "items": { "enum": [ "enriched", "global", "list", "relationship-intelligence" ], "type": "string" }, "type": "array" }, "style": "form" }, { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 20, "in": "query", "name": "limit", "schema": { "default": 20, "examples": [ 20 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "company-list-enriched": { "$ref": "#/components/examples/company-list-enriched-3" }, "company-list-global-and-list": { "$ref": "#/components/examples/company-list-global-and-list-3" }, "company-list-relationship-intelligence": { "$ref": "#/components/examples/company-list-relationship-intelligence-3" } }, "schema": { "$ref": "#/components/schemas/FieldPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get field values on a single List Entry", "tags": [ "lists" ] }, "patch": { "description": "Perform batch operations on a list entry's fields.\n\nCurrently 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](#operation/v2_lists_listId_list-entries_listEntryId_fields_fieldId__POST) endpoint multiple times. \n\nRequires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).", "operationId": "v2_lists_listId_list-entries_listEntryId_fields__PATCH", "parameters": [ { "description": "List ID", "in": "path", "name": "listId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "List Entry ID", "in": "path", "name": "listEntryId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } } ], "requestBody": { "content": { "application/json": { "examples": { "update-fields": { "$ref": "#/components/examples/update-fields" } }, "schema": { "$ref": "#/components/schemas/ListEntryBatchOperationRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "examples": { "update-fields": { "$ref": "#/components/examples/update-fields-2" } }, "schema": { "$ref": "#/components/schemas/ListEntryBatchOperationResponse" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Perform batch operations on a list entry's fields", "tags": [ "lists" ] } }, "/v2/lists/{listId}/list-entries/{listEntryId}/fields/{fieldId}": { "get": { "description": "Returns a single field value on a list entry.\n\nRequires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).", "operationId": "v2_lists_listId_list-entries_listEntryId_fields_fieldId__GET", "parameters": [ { "description": "List ID", "in": "path", "name": "listId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "List Entry ID", "in": "path", "name": "listEntryId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Field ID", "example": "field-1234", "in": "path", "name": "fieldId", "required": true, "schema": { "examples": [ "affinity-data-location", "field-1234" ], "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "company": { "$ref": "#/components/examples/company" }, "company-multi": { "$ref": "#/components/examples/company-multi" }, "datetime": { "$ref": "#/components/examples/datetime" }, "dropdown": { "$ref": "#/components/examples/dropdown" }, "dropdown-multi": { "$ref": "#/components/examples/dropdown-multi" }, "filterable-text": { "$ref": "#/components/examples/filterable-text" }, "filterable-text-multi": { "$ref": "#/components/examples/filterable-text-multi" }, "formula-number": { "$ref": "#/components/examples/formula-number" }, "interaction": { "$ref": "#/components/examples/interaction" }, "location": { "$ref": "#/components/examples/location" }, "location-multi": { "$ref": "#/components/examples/location-multi" }, "number": { "$ref": "#/components/examples/number" }, "number-multi": { "$ref": "#/components/examples/number-multi" }, "person": { "$ref": "#/components/examples/person" }, "person-multi": { "$ref": "#/components/examples/person-multi" }, "ranked-dropdown": { "$ref": "#/components/examples/ranked-dropdown" }, "text": { "$ref": "#/components/examples/text" } }, "schema": { "$ref": "#/components/schemas/Field" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get a single field value", "tags": [ "lists" ] }, "post": { "description": "Update a single field value.\n \nRequires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).", "operationId": "v2_lists_listId_list-entries_listEntryId_fields_fieldId__POST", "parameters": [ { "description": "List ID", "in": "path", "name": "listId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "List Entry ID", "in": "path", "name": "listEntryId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Field ID", "in": "path", "name": "fieldId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "examples": { "company": { "$ref": "#/components/examples/company-2" }, "company-multi": { "$ref": "#/components/examples/company-multi-2" }, "datetime": { "$ref": "#/components/examples/datetime-2" }, "dropdown": { "$ref": "#/components/examples/dropdown-2" }, "dropdown-multi": { "$ref": "#/components/examples/dropdown-multi-2" }, "filterable-text": { "$ref": "#/components/examples/filterable-text-2" }, "filterable-text-multi": { "$ref": "#/components/examples/filterable-text-multi-2" }, "location": { "$ref": "#/components/examples/location-2" }, "location-multi": { "$ref": "#/components/examples/location-multi-2" }, "number": { "$ref": "#/components/examples/number-2" }, "number-multi": { "$ref": "#/components/examples/number-multi-2" }, "person": { "$ref": "#/components/examples/person-2" }, "person-multi": { "$ref": "#/components/examples/person-multi-2" }, "ranked-dropdown": { "$ref": "#/components/examples/ranked-dropdown-2" }, "text": { "$ref": "#/components/examples/text-2" } }, "schema": { "$ref": "#/components/schemas/FieldUpdate" } } }, "required": true }, "responses": { "204": { "description": "No Content", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Update a single field value on a List Entry", "tags": [ "lists" ] } }, "/v2/lists/{listId}/saved-views": { "get": { "description": "Paginate through all Saved Views you have access to view for a specific List.\nReturns Saved View configurations including name, column settings, and owner information.", "operationId": "v2_lists_listId_saved-views__GET", "parameters": [ { "description": "List ID", "in": "path", "name": "listId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "examples": [ 100 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedViewPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get metadata on Saved Views", "tags": [ "lists" ] } }, "/v2/lists/{listId}/saved-views/{viewId}": { "get": { "description": "Retrieve detailed information about a specific Saved View you have access to view.\nReturns complete Saved View configuration including name, sorting, and column visibility settings.", "operationId": "v2_lists_listId_saved-views_viewId__GET", "parameters": [ { "description": "List ID", "in": "path", "name": "listId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Saved view ID", "in": "path", "name": "viewId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SavedView" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get metadata on a single Saved View", "tags": [ "lists" ] } }, "/v2/lists/{listId}/saved-views/{viewId}/list-entries": { "get": { "description": "Paginate through the List Entries (AKA rows) on a given Saved View.\nUse this endpoint when you need to filter entities or only want **some**\nfield data to be returned: This endpoint respects the filters set on a Saved View\nvia web app, and only returns field data corresponding to the columns that have been\npulled into the Saved View via web app.\n\nThough this endpoint respects the Saved View's filters and column/Field selection,\nit does not yet preserve sort order. This endpoint also only supports **sheet-type\nSaved Views**, and not board- or dashboard-type Saved Views.\n\nSee the [Data Model](#section/Data-Model) section for more information about Saved Views.\n\nRequires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).", "operationId": "v2_lists_listId_saved-views_viewId_list-entries__GET", "parameters": [ { "description": "List ID", "in": "path", "name": "listId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Saved view ID", "in": "path", "name": "viewId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "examples": [ 100 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListEntryWithEntityPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get all List Entries on a Saved View", "tags": [ "lists" ] } }, "/v2/meetings": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\nPaginate through all Meetings you have access to view in your organization. Returns information\nabout meetings including title, start/end times, organizer, and attendee previews.\n", "operationId": "v2_meetings__GET", "parameters": [ { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "examples": [ 100 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } }, { "description": "Filter options", "example": "id=1234", "in": "query", "name": "filter", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/interactions.MeetingPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get metadata on all Meetings [COMING SOON]", "tags": [ "meetings" ], "x-stability-level": "beta" } }, "/v2/notes": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\nReturns all notes, with the exception of replies.\nYou can filter notes using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties.\n| **Property Name** | **Description** | **Type** | **Allowed Operators** | **Examples** |\n|-----------------------------|-----------------------------------------------------------------|------------|--------------------------------------|---------------------------------|\n| `id` | Filter notes by id | `int32` | `=` | `id=1` |\n| `creator.id` | Filter notes by the creator of the note | `int32` | `=` | `creator.id=1` |\n| `createdAt` | Filter notes by when it was created | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-02-04T10:48:24Z` |\n| `updatedAt` | Filter notes by when it was updated | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-02-03T10:48:24Z`|\n", "operationId": "v2_notes__GET", "parameters": [ { "description": "Include total count of the collection in the pagination response", "in": "query", "name": "totalCount", "schema": { "default": false, "type": "boolean" } }, { "description": "Cursor for the next or previous page", "in": "query", "name": "cursor", "required": false, "schema": { "type": "string" } }, { "description": "Number of items to include in the page", "in": "query", "name": "limit", "required": false, "schema": { "default": 20, "format": "int32", "maximum": 100, "minimum": 0, "type": "integer" } }, { "description": "Filter options", "in": "query", "name": "filter", "schema": { "type": "string" } }, { "$ref": "#/components/parameters/notes.includes" } ], "responses": { "200": { "content": { "application/json": { "examples": { "ai-notetaker": { "$ref": "#/components/examples/ai-notetaker" }, "entities": { "$ref": "#/components/examples/entities" }, "interaction": { "$ref": "#/components/examples/interaction-2" } }, "schema": { "$ref": "#/components/schemas/notes.NotesPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get all Notes", "tags": [ "notes" ], "x-stability-level": "beta" } }, "/v2/notes/{noteId}": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\nGet a Note with a given id\n", "operationId": "v2_notes_noteId__GET", "parameters": [ { "description": "The id of the Note", "in": "path", "name": "noteId", "required": true, "schema": { "format": "int32", "maximum": 2147483647, "minimum": 1, "type": "integer" } }, { "$ref": "#/components/parameters/note.includes" } ], "responses": { "200": { "content": { "application/json": { "examples": { "ai-notetaker": { "$ref": "#/components/examples/ai-notetaker-2" }, "ai-notetaker-reply": { "$ref": "#/components/examples/ai-notetaker-reply" }, "entities": { "$ref": "#/components/examples/entities-2" }, "interaction": { "$ref": "#/components/examples/interaction-3" }, "user-reply": { "$ref": "#/components/examples/user-reply" } }, "schema": { "$ref": "#/components/schemas/notes.Note" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get a single Note", "tags": [ "notes" ], "x-stability-level": "beta" } }, "/v2/notes/{noteId}/attached-companies": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\nReturns directly attached companies for a given Note.\n", "operationId": "v2_notes_noteId_attached-companies__GET", "parameters": [ { "description": "The id of the Note to get attached Companies", "in": "path", "name": "noteId", "required": true, "schema": { "format": "int32", "maximum": 2147483647, "minimum": 1, "type": "integer" } }, { "description": "Include total count of the collection in the pagination response", "in": "query", "name": "totalCount", "schema": { "default": false, "type": "boolean" } }, { "description": "Cursor for the next or previous page", "in": "query", "name": "cursor", "required": false, "schema": { "type": "string" } }, { "description": "Number of items to include in the page", "in": "query", "name": "limit", "required": false, "schema": { "default": 20, "format": "int32", "maximum": 100, "minimum": 0, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyDataPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get Companies attached to a Note", "tags": [ "notes" ], "x-stability-level": "beta" } }, "/v2/notes/{noteId}/attached-opportunities": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\nReturns directly attached opportunities for a given Note.\n", "operationId": "v2_notes_noteId_attached-opportunities__GET", "parameters": [ { "description": "The id of the Note to get attached Opportunities", "in": "path", "name": "noteId", "required": true, "schema": { "format": "int32", "maximum": 2147483647, "minimum": 1, "type": "integer" } }, { "description": "Include total count of the collection in the pagination response", "in": "query", "name": "totalCount", "schema": { "default": false, "type": "boolean" } }, { "description": "Cursor for the next or previous page", "in": "query", "name": "cursor", "required": false, "schema": { "type": "string" } }, { "description": "Number of items to include in the page", "in": "query", "name": "limit", "required": false, "schema": { "default": 20, "format": "int32", "maximum": 100, "minimum": 0, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "success": { "$ref": "#/components/examples/success-2" } }, "schema": { "$ref": "#/components/schemas/OpportunityPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get Opportunities attached to a Note", "tags": [ "notes" ], "x-stability-level": "beta" } }, "/v2/notes/{noteId}/attached-persons": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\nReturns directly attached persons for a given Note.\n", "operationId": "v2_notes_noteId_attached-persons__GET", "parameters": [ { "description": "The id of the Note to get attached Persons", "in": "path", "name": "noteId", "required": true, "schema": { "format": "int32", "maximum": 2147483647, "minimum": 1, "type": "integer" } }, { "description": "Include total count of the collection in the pagination response", "in": "query", "name": "totalCount", "schema": { "default": false, "type": "boolean" } }, { "description": "Cursor for the next or previous page", "in": "query", "name": "cursor", "required": false, "schema": { "type": "string" } }, { "description": "Number of items to include in the page", "in": "query", "name": "limit", "required": false, "schema": { "default": 20, "format": "int32", "maximum": 100, "minimum": 0, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonDataPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get Persons attached to a Note", "tags": [ "notes" ], "x-stability-level": "beta" } }, "/v2/notes/{noteId}/replies": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\nThis endpoint returns reply notes for a given note id.\nYou can filter replies using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties.\n| **Property Name** | **Description** | **Type** | **Allowed Operators** | **Examples** |\n|-----------------------------|-----------------------------------------------------------------|------------|--------------------------------------|---------------------------------|\n| `creator.id` | Filter notes by the creator of the note | `int32` | `=` | `creator.id=1` |\n| `createdAt` | Filter notes by when it was created | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-02-04T10:48:24Z` |\n| `updatedAt` | Filter notes by when it was updated | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-02-03T10:48:24Z`|\n", "operationId": "v2_notes_noteId_replies__GET", "parameters": [ { "description": "Note ID", "in": "path", "name": "noteId", "required": true, "schema": { "format": "int32", "maximum": 2147483647, "minimum": 1, "type": "integer" } }, { "description": "Filter options", "in": "query", "name": "filter", "schema": { "type": "string" } }, { "description": "Cursor for the next or previous page", "in": "query", "name": "cursor", "schema": { "type": "string" } }, { "description": "Number of items to include in the page", "in": "query", "name": "limit", "schema": { "default": 20, "format": "int32", "maximum": 100, "minimum": 0, "type": "integer" } }, { "description": "Include total count of the collection in the pagination response", "in": "query", "name": "totalCount", "schema": { "default": false, "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "ai-notetaker-reply": { "$ref": "#/components/examples/ai-notetaker-reply-2" }, "user-reply": { "$ref": "#/components/examples/user-reply-2" } }, "schema": { "$ref": "#/components/schemas/notes.RepliesPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get replies for a Note", "tags": [ "notes" ], "x-stability-level": "beta" } }, "/v2/opportunities": { "get": { "description": "Paginate through Opportunities in Affinity.\nReturns basic information but **not** field data on each Opportunity.\n\nTo access field data on Opportunities, use the `/lists/{list_id}/list-entries`\nor the `/v2/lists/{list_id}/saved-views/{view_id}/list-entries` GET endpoint.\n\nRequires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).", "operationId": "v2_opportunities__GET", "parameters": [ { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "examples": [ 100 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } }, { "description": "Opportunity IDs", "example": [ 1, 2 ], "explode": true, "in": "query", "name": "ids", "schema": { "items": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" }, "type": "array" }, "style": "form" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpportunityPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get all Opportunities", "tags": [ "opportunities" ] } }, "/v2/opportunities/{opportunityId}": { "get": { "description": "Returns basic information but **not** field data on the requested Opportunity.\n\nTo access field data on Opportunities, use the `/lists/{list_id}/list-entries`\nor the `/v2/lists/{list_id}/saved-views/{view_id}/list-entries` GET endpoint.\n\nRequires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).", "operationId": "v2_opportunities_opportunityId__GET", "parameters": [ { "description": "Opportunity ID", "in": "path", "name": "opportunityId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Opportunity" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get a single Opportunity", "tags": [ "opportunities" ] } }, "/v2/opportunities/{opportunityId}/notes": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\nReturns Notes for a given Opportunity which includes directly attached notes and those attached to persons on this Opportunity.\n\nYou can filter notes using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties.\n| **Property Name** | **Description** | **Type** | **Allowed Operators** | **Examples** |\n|-----------------------------|-----------------------------------------------------------------|------------|--------------------------------------|---------------------------------|\n| `creator.id` | Filter notes by the creator of the note | `int32` | `=` | `creator.id=1` |\n| `createdAt` | Filter notes by when it was created | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-02-04T10:48:24Z` |\n| `updatedAt` | Filter notes by when it was updated | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-02-03T10:48:24Z`|\n", "operationId": "v2_opportunities_opportunityId_notes__GET", "parameters": [ { "description": "Opportunity ID", "in": "path", "name": "opportunityId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Filter options", "in": "query", "name": "filter", "schema": { "type": "string" } }, { "description": "Cursor for the next or previous page", "in": "query", "name": "cursor", "schema": { "type": "string" } }, { "description": "Number of items to include in the page", "in": "query", "name": "limit", "schema": { "default": 20, "format": "int32", "maximum": 100, "minimum": 0, "type": "integer" } }, { "description": "Include total count of the collection in the pagination response", "in": "query", "name": "totalCount", "schema": { "default": false, "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "ai-notetaker": { "$ref": "#/components/examples/ai-notetaker-3" }, "entities": { "$ref": "#/components/examples/entities-3" }, "interaction": { "$ref": "#/components/examples/interaction-4" } }, "schema": { "$ref": "#/components/schemas/notes.NotesPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get Notes for an Opportunity", "tags": [ "opportunities" ], "x-stability-level": "beta" } }, "/v2/person-merges": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\n\nRetrieve paginated person merges for the organization.\n\n\nReturns all person merges initiated by users in your organization, including their current\nstatus, 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:\n\n\n| Property | Type | Operators | Values | Examples |\n|----------|------|-----------|--------|----------|\n| `status` | `enum` | `=` | `in-progress`, `success`, `failed` | `status=failed` |\n| `taskId` | `string` | `=` | | `taskId=789e0123-e45b-67c8-d901-234567890123` |\n\n\nPerson merges are returned in reverse chronological order (most recent first).\n\n\nRequires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and\norganization admin role.\n", "operationId": "v2_person-merges__GET", "parameters": [ { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "type": "string" } }, { "description": "Number of items to include in the page", "example": 25, "in": "query", "name": "limit", "schema": { "default": 25, "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } }, { "description": "Filter person merges using Affinity Filtering Language", "example": "status=failed | taskId=789e0123-e45b-67c8-d901-234567890123", "in": "query", "name": "filter", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "merges-list": { "$ref": "#/components/examples/merges-list-2" } }, "schema": { "$ref": "#/components/schemas/PersonMergeStatePaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get All Person Merges", "tags": [ "personMerges" ], "x-stability-level": "beta" }, "post": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\nInitiate a person merge to combine a duplicate person profile into a primary person profile.\n\nThis 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](#tag/personMerges/operation/v2_tasks_person-merges_taskId__GET).\n\nRequires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.", "operationId": "v2_person-merges__POST", "requestBody": { "content": { "application/json": { "examples": { "merge-persons": { "$ref": "#/components/examples/merge-persons" } }, "schema": { "$ref": "#/components/schemas/PersonMergeRequest" } } }, "required": true }, "responses": { "202": { "content": { "application/json": { "examples": { "merge-initiated": { "$ref": "#/components/examples/merge-initiated-2" } }, "schema": { "$ref": "#/components/schemas/PersonMergeResponse" } } }, "description": "Accepted", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Initiate Person Merge", "tags": [ "personMerges" ], "x-stability-level": "beta" } }, "/v2/person-merges/{mergeId}": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\nRetrieve the status and details of a specific person merge.\n\nReturns information about the person merge including its current status, the persons involved, timestamps, and any error information if the merge failed.\n\nThe `mergeId` can be obtained from the response of the [Get All Person Merges](#tag/personMerges/operation/v2_person-merges__GET) endpoint, or by filtering person merges by task ID using `/v2/person-merges?filter=taskId={taskId}` after initiating a merge.\n\nRequires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.", "operationId": "v2_person-merges_mergeId__GET", "parameters": [ { "description": "Person merge ID", "in": "path", "name": "mergeId", "required": true, "schema": { "examples": [ 12345 ], "format": "int64", "maximum": 9007199254740991, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "completed-merge": { "$ref": "#/components/examples/succeeded-merge-2" }, "failed-merge": { "$ref": "#/components/examples/failed-merge-2" }, "in-progress-merge": { "$ref": "#/components/examples/in-progress-merge-2" } }, "schema": { "$ref": "#/components/schemas/PersonMergeState" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get Person Merge", "tags": [ "personMerges" ], "x-stability-level": "beta" } }, "/v2/persons": { "get": { "description": "Paginate through Persons in Affinity.\nReturns basic information and non-list-specific field data on each Person.\n\nTo retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter\nto specify the Fields for which you want data returned.\nThese Field IDs and Types can be found using the GET `/v2/persons/fields` endpoint.\nWhen no `fieldIds` or `fieldTypes` are provided, Persons will be returned without any field data attached.\nTo supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this:\n`?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`.\n\nRequires the \"Export All People directory\" [permission](#section/Getting-Started/Permissions).", "operationId": "v2_persons__GET", "parameters": [ { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "examples": [ 100 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } }, { "description": "People IDs", "example": [ 1, 2 ], "explode": true, "in": "query", "name": "ids", "schema": { "items": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" }, "type": "array" }, "style": "form" }, { "description": "Field IDs for which to return field data", "example": [ "field-1", "field-2" ], "explode": true, "in": "query", "name": "fieldIds", "schema": { "examples": [ [ "field-1" ] ], "items": { "type": "string" }, "type": "array" }, "style": "form" }, { "description": "Field Types for which to return field data", "example": [ "enriched", "global" ], "explode": true, "in": "query", "name": "fieldTypes", "schema": { "items": { "enum": [ "enriched", "global", "relationship-intelligence" ], "type": "string" }, "type": "array" }, "style": "form" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get all Persons", "tags": [ "persons" ] } }, "/v2/persons/fields": { "get": { "description": "Returns metadata on non-list-specific Person Fields.\n\nUse the returned Field IDs to request field data from the GET `/v2/persons` and GET `/v2/persons/{id}` endpoints.", "operationId": "v2_persons_fields__GET", "parameters": [ { "description": "Cursor for the next or previous page", "in": "query", "name": "cursor", "schema": { "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "examples": [ 100 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FieldMetadataPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get metadata on Person Fields", "tags": [ "persons" ] } }, "/v2/persons/{personId}": { "get": { "description": "Returns basic information and non-list-specific field data on the requested Person.\n\nTo retrieve field data, you must use either the `fieldIds` or the `fieldTypes` parameter\nto specify the Fields for which you want data returned.\nThese Field IDs and Types can be found using the GET `/v2/persons/fields` endpoint.\nWhen no `fieldIds` or `fieldTypes` are provided, Persons will be returned without any field data attached.\nTo supply multiple `fieldIds` or `fieldTypes` parameters, generate a query string that looks like this:\n`?fieldIds=field-1234&fieldIds=affinity-data-location` or `?fieldTypes=enriched&fieldTypes=global`.\n\nRequires the \"Export All People directory\" [permission](#section/Getting-Started/Permissions).", "operationId": "v2_persons_personId__GET", "parameters": [ { "description": "Person ID", "in": "path", "name": "personId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Field IDs for which to return field data", "example": [ "field-1", "field-2" ], "explode": true, "in": "query", "name": "fieldIds", "schema": { "examples": [ [ "field-1" ] ], "items": { "type": "string" }, "type": "array" }, "style": "form" }, { "description": "Field Types for which to return field data", "example": [ "enriched", "global" ], "explode": true, "in": "query", "name": "fieldTypes", "schema": { "items": { "enum": [ "enriched", "global", "relationship-intelligence" ], "type": "string" }, "type": "array" }, "style": "form" } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Person" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get a single Person", "tags": [ "persons" ] } }, "/v2/persons/{personId}/list-entries": { "get": { "description": "Paginate through the List Entries (AKA rows) for the given Person across all Lists.\nEach List Entry includes field data for the Person, including list-specific field data.\nEach List Entry also includes metadata about its creation, i.e., when it was added to the List and by whom.\n\nRequires the \"Export data from Lists\" [permission](#section/Getting-Started/Permissions).", "operationId": "v2_persons_personId_list-entries__GET", "parameters": [ { "description": "Persons ID", "in": "path", "name": "personId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "examples": [ 100 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListEntryPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get a Person's List Entries", "tags": [ "persons" ] } }, "/v2/persons/{personId}/lists": { "get": { "description": "Paginate through all Lists where the given Person appears as an entry and that you have access to view.\nReturns basic List information for each List that contains this Person.", "operationId": "v2_persons_personId_lists__GET", "parameters": [ { "description": "Persons ID", "in": "path", "name": "personId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "examples": [ 100 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get a Person's Lists", "tags": [ "persons" ] } }, "/v2/persons/{personId}/notes": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\nReturns notes for a given person id which includes directly attached notes, notes on meetings this person attended, and notes where this person is mentioned.\n\nYou can filter notes using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties.\n| **Property Name** | **Description** | **Type** | **Allowed Operators** | **Examples** |\n|-----------------------------|-----------------------------------------------------------------|------------|--------------------------------------|---------------------------------|\n| `creator.id` | Filter notes by the creator of the note | `int32` | `=` | `creator.id=1` |\n| `createdAt` | Filter notes by when it was created | `datetime` | `>`, `<`, `>=`, `<=` | `createdAt<2025-02-04T10:48:24Z` |\n| `updatedAt` | Filter notes by when it was updated | `datetime` | `>`, `<`, `>=`, `<=` | `updatedAt>=2025-02-03T10:48:24Z`|\n", "operationId": "v2_persons_personId_notes__GET", "parameters": [ { "description": "Persons ID", "in": "path", "name": "personId", "required": true, "schema": { "format": "int64", "maximum": 9223372036854776000, "minimum": 1, "type": "integer" } }, { "description": "Filter options", "in": "query", "name": "filter", "schema": { "type": "string" } }, { "description": "Cursor for the next or previous page", "in": "query", "name": "cursor", "schema": { "type": "string" } }, { "description": "Number of items to include in the page", "in": "query", "name": "limit", "schema": { "default": 20, "format": "int32", "maximum": 100, "minimum": 0, "type": "integer" } }, { "description": "Include total count of the collection in the pagination response", "in": "query", "name": "totalCount", "schema": { "default": false, "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "ai-notetaker": { "$ref": "#/components/examples/ai-notetaker-3" }, "entities": { "$ref": "#/components/examples/entities-3" }, "interaction": { "$ref": "#/components/examples/interaction-4" } }, "schema": { "$ref": "#/components/schemas/notes.NotesPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get Notes for a Person", "tags": [ "persons" ], "x-stability-level": "beta" } }, "/v2/tasks/company-merges": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\n\nRetrieve paginated company merge tasks for the organization.\n\n\nReturns all merge tasks initiated by users in your organization, including their current status,\nthe companies involved, and task details.\n\n\nYou can filter tasks using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties:\n\n| Property | Type | Operators | Values | Examples |\n|----------|------|-----------|--------|----------|\n| `status` | `enum` | `=` | `in-progress`, `success`, `failed` | `status=failed` |\n\n\nTasks are returned in reverse chronological order (most recent first).\n\n\nRequires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and\norganization admin role.\n", "operationId": "v2_tasks_company-merges__GET", "parameters": [ { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 100, "in": "query", "name": "limit", "schema": { "default": 100, "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } }, { "description": "Filter tasks using Affinity Filtering Language", "example": "status=failed", "in": "query", "name": "filter", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "tasks-list": { "$ref": "#/components/examples/tasks-list-2" } }, "schema": { "$ref": "#/components/schemas/CompanyMergeTaskPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get All Company Merge Tasks", "tags": [ "companyMerges" ], "x-stability-level": "beta" } }, "/v2/tasks/company-merges/{taskId}": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\n\nRetrieve the status and details of a specific task for company merges.\n\n\nReturns information about the company merges for a specific task including its overall status,\nnumber of merges in-progress, completed, and failed.\n\n\nDetailed information about individual merges for this task can be found by querying:\n`/v2/company-merges?filter=taskId={taskId}` See [Company\nMerges](#tag/companyMerges/operation/v2_company-merges__GET) for more details.\n\n\nTask statuses:\n\n- `in-progress`: The merge task is currently being processed.\n- `success`: The merge task completed successfully.\n- `failed`: The merge task failed.\n\n\nRequires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and\norganization admin role.\n", "operationId": "v2_tasks_company-merges_taskId__GET", "parameters": [ { "description": "Company merge task ID", "in": "path", "name": "taskId", "required": true, "schema": { "examples": [ "123e4567-e89b-12d3-a456-426614174000" ], "format": "uuid", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "task-failed": { "$ref": "#/components/examples/task-failed" }, "task-in-progress": { "$ref": "#/components/examples/task-in-progress" }, "task-success": { "$ref": "#/components/examples/task-success-2" } }, "schema": { "$ref": "#/components/schemas/CompanyMergeTask" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get Company Merge Task", "tags": [ "companyMerges" ], "x-stability-level": "beta" } }, "/v2/tasks/person-merges": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\n\nRetrieve paginated person merge tasks for the organization.\n\n\nReturns all merge tasks initiated by users in your organization, including their current status,\nthe persons involved, and task details.\n\n\nYou can filter tasks using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties:\n\n| Property | Type | Operators | Values | Examples |\n|----------|------|-----------|--------|----------|\n| `status` | `enum` | `=` | `in-progress`, `success`, `failed` | `status=failed` |\n\n\nTasks are returned in reverse chronological order (most recent first).\n\n\nRequires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and\norganization admin role.\n", "operationId": "v2_tasks_person-merges__GET", "parameters": [ { "description": "Cursor for the next or previous page", "example": "ICAgICAgYmVmb3JlOjo6Nw", "in": "query", "name": "cursor", "schema": { "examples": [ "ICAgICAgYmVmb3JlOjo6Nw" ], "type": "string" } }, { "description": "Number of items to include in the page", "example": 25, "in": "query", "name": "limit", "schema": { "default": 25, "examples": [ 25 ], "format": "int32", "maximum": 100, "minimum": 1, "type": "integer" } }, { "description": "Filter tasks using Affinity Filtering Language", "example": "status=failed", "in": "query", "name": "filter", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "tasks-list": { "$ref": "#/components/examples/tasks-list" } }, "schema": { "$ref": "#/components/schemas/PersonMergeTaskPaged" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get All Person Merge Tasks", "tags": [ "personMerges" ], "x-stability-level": "beta" } }, "/v2/tasks/person-merges/{taskId}": { "get": { "description": "| \u26a0\ufe0f This endpoint is currently in BETA |\n|--|\n\n\nRetrieve the status and details of a specific task for person merges.\n\n\nReturns information about the person merges for a specific task including its overall status,\nnumber of merges in-progress, completed, and failed.\n\n\nDetailed information about individual merges for this task can be found by querying:\n`/v2/person-merges?filter=taskId={taskId}` See [Person\nMerges](#tag/personMerges/operation/v2_person-merges__GET) for more details.\n\n\nTask statuses:\n\n- `in-progress`: The merge task is currently being processed.\n- `success`: The merge task completed successfully.\n- `failed`: The merge task failed.\n\n\nRequires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and\norganization admin role.\n", "operationId": "v2_tasks_person-merges_taskId__GET", "parameters": [ { "description": "Person merge task ID", "in": "path", "name": "taskId", "required": true, "schema": { "examples": [ "123e4567-e89b-12d3-a456-426614174000" ], "format": "uuid", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "examples": { "task-failed": { "$ref": "#/components/examples/task-failed" }, "task-in-progress": { "$ref": "#/components/examples/task-in-progress" }, "task-success": { "$ref": "#/components/examples/task-success" } }, "schema": { "$ref": "#/components/schemas/PersonMergeTask" } } }, "description": "OK", "headers": { "X-Ratelimit-Limit-Org": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org" }, "X-Ratelimit-Limit-Org-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Remaining" }, "X-Ratelimit-Limit-Org-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-Org-Reset" }, "X-Ratelimit-Limit-User": { "$ref": "#/components/headers/X-Ratelimit-Limit-User" }, "X-Ratelimit-Limit-User-Remaining": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Remaining" }, "X-Ratelimit-Limit-User-Reset": { "$ref": "#/components/headers/X-Ratelimit-Limit-User-Reset" } } }, "400": { "$ref": "#/components/responses/400" }, "403": { "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" }, "default": { "$ref": "#/components/responses/default" } }, "summary": "Get Person Merge Task", "tags": [ "personMerges" ], "x-stability-level": "beta" } } }, "security": [ { "bearerAuth": [] } ], "servers": [ { "url": "https://api.affinity.co" } ], "tags": [ { "description": "Operations about auths", "name": "auth" }, { "description": "Operations about companies", "name": "companies" }, { "description": "Operations about company merges", "name": "companyMerges", "x-stability-level": "beta" }, { "description": "Operations about emails", "name": "emails", "x-stability-level": "beta" }, { "description": "Operations about lists", "name": "lists" }, { "description": "Operations about meetings", "name": "meetings", "x-stability-level": "beta" }, { "description": "Operations about notes", "name": "notes", "x-stability-level": "beta" }, { "description": "Operations about opportunities", "name": "opportunities" }, { "description": "Operations about person merges", "name": "personMerges", "x-stability-level": "beta" }, { "description": "Operations about persons", "name": "persons" } ] }