Affinity connects to a Nagent workspace with an API key. Once it is connected, agents can call 20 Affinity actions, such as "Get a company s list entries", "Get a company s lists" and "Get all companies". Nothing is enabled on connect: each action is allowed one at a time, and an action with side effects runs or waits for a person according to the agent's level.
Every operation an agent can call against Affinity, with input parameters and output schema.
AFFINITY_GET_A_COMPANY_S_LIST_ENTRIESSummarize company data across all lists, including list-specific fields and metadata like creation date and author. Access requires "Export data from Lists" permission.
Input parameters
Company ID
Number of items to include in the page
Cursor for the next or previous page
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_A_COMPANY_S_LISTSReturns metadata for all the Lists on which the given Company appears.
Input parameters
Company ID
Number of items to include in the page
Cursor for the next or previous page
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_ALL_COMPANIESAffinity API allows paginated access to company info and custom fields. Use `fieldIds` or `fieldTypes` to specify data in a request. Retrieve field IDs/Types via GET `/v2/companies/fields`. Export permission needed.
Input parameters
Company IDs
Number of items to include in the page
Cursor for the next or previous page
Field IDs for which to return field data
Field Types for which to return field data
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_ALL_LIST_ENTRIES_ON_A_LISTAccess and export essential data and metadata for Companies, Persons, or Opportunities from a List, specifying data via `fieldIds` or `fieldTypes`. "Export data from Lists" permission is necessary.
Input parameters
Number of items to include in the page
Cursor for the next or previous page
List ID
Field IDs for which to return field data
Field Types for which to return field data
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_ALL_LIST_ENTRIES_ON_A_SAVED_VIEWUse the endpoint to access rows in a Saved View with specific filters and selected fields from a web app. It doesn't maintain sort order, supports only sheet-type views, and requires export permissions.
Input parameters
Number of items to include in the page
Cursor for the next or previous page
List ID
Saved view ID
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_ALL_OPPORTUNITIESPagination through Opportunities in Affinity yields basic info but excludes field data. For field data, use specified GET endpoints. "Export data from Lists" permission needed.
Input parameters
Opportunity IDs
Number of items to include in the page
Cursor for the next or previous page
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_ALL_PERSONSThe Affinity API offers paginated access to Person data using `fieldIds` or `fieldTypes`. Bulk extraction needs special permissions and supports multiple parameters.
Input parameters
People IDs
Number of items to include in the page
Cursor for the next or previous page
Field IDs for which to return field data
Field Types for which to return field data
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_A_PERSON_S_LIST_ENTRIESSummary: Browse rows for a Person in all Lists, showing field data and entry metadata like creation time and author. Requires "Export data from Lists" permission.
Input parameters
Persons ID
Number of items to include in the page
Cursor for the next or previous page
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_A_PERSON_S_LISTSReturns metadata for all the Lists on which the given Person appears.
Input parameters
Persons ID
Number of items to include in the page
Cursor for the next or previous page
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_A_SINGLE_COMPANYRetrieve basic company info and specific field data by using `fieldIds` or `fieldTypes` parameters. Multiple fields can be queried. No field data if parameters aren't specified. Requires "Export All Organizations directory" permission.
Input parameters
Company ID
Field IDs for which to return field data
Field Types for which to return field data
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_A_SINGLE_OPPORTUNITYGet basic details about an Opportunity without field data via provided endpoints. Field data requires using specific list entry APIs and the "Export data from Lists" permission.
Input parameters
Opportunity ID
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_A_SINGLE_PERSONUse GET `/v2/persons/fields` with `fieldIds` or `fieldTypes` for detailed data; basic info by default. Request multiple fields at once. "Export All People" permission needed.
Input parameters
Person ID
Field IDs for which to return field data
Field Types for which to return field data
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_CURRENT_USERReturns metadata about the current user.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_METADATA_ON_ALL_LISTSReturns metadata on Lists.
Input parameters
Number of items to include in the page
Cursor for the next or previous page
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_METADATA_ON_A_SINGLE_LISTReturns metadata on a single List.
Input parameters
List ID
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_METADATA_ON_A_SINGLE_LIST_S_FIELDSReturns metadata on the Fields available on a single List. Use the returned Field IDs to request field data from the GET `/v2/lists/{listId}/list-entries` endpoint.
Input parameters
Number of items to include in the page
Cursor for the next or previous page
List ID
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_METADATA_ON_A_SINGLE_SAVED_VIEWReturns metadata on a single Saved View.
Input parameters
List ID
Saved view ID
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_METADATA_ON_COMPANY_FIELDSReturns metadata on non-list-specific Company Fields. Use the returned Field IDs to request field data from the GET `/v2/companies` and GET `/v2/companies/{id}` endpoints.
Input parameters
Number of items to include in the page
Cursor for the next or previous page
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_METADATA_ON_PERSON_FIELDSReturns metadata on non-list-specific Person Fields. Use the returned Field IDs to request field data from the GET `/v2/persons` and GET `/v2/persons/{id}` endpoints.
Input parameters
Number of items to include in the page
Cursor for the next or previous page
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
AFFINITY_GET_METADATA_ON_SAVED_VIEWSReturns metadata on the Saved Views on a List.
Input parameters
Number of items to include in the page
Cursor for the next or previous page
List ID
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
Agents can call 20 Affinity actions on Nagent, including "Get a company s list entries", "Get a company s lists" and "Get all companies". Get a company s list entries: Summarize company data across all lists, including list-specific fields and metadata like creation date and author. Each action is listed on this page with its input parameters and its output.
Affinity connects with an API key, under your workspace's own connection. Nothing is enabled on connect: each action is allowed one at a time and can be scoped to the agents that need it.
Get a company s list entries takes 1 required input: id. It also takes 2 optional inputs: limit and cursor. It returns data, error and successful.