Skip to content

Commit e1c9afb

Browse files
yaniv-golangithub-actions[bot]
authored andcommitted
chore: sync Affinity API docs
1 parent 688e476 commit e1c9afb

1 file changed

Lines changed: 30 additions & 24 deletions

File tree

docs/v1/affinity_api_docs.md

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This markdown version of the Affinity API v1 documentation was generated automat
2121
- **Direct raw access**
2222

2323
**Source:** Extracted from the live Affinity API documentation at https://api-docs.affinity.co/
24-
**Documentation Version:** This copy is based on the official documentation as it appeared on **November 06, 2025 at 16:49:04 UTC** (Last updated: 11/06/2025 16:49:04 UTC).
24+
**Documentation Version:** This copy is based on the official documentation as it appeared on **March 13, 2026 at 19:07:04 UTC** (Last updated: 03/13/2026 19:07:04 UTC).
2525
**Raw Markdown URL:** `https://raw.githubusercontent.com/yaniv-golan/affinity-api-docs/main/docs/v1/affinity_api_docs.md`
2626

2727
> **⚠️ Use at Your Own Risk**
@@ -38,7 +38,7 @@ This markdown version of the Affinity API v1 documentation was generated automat
3838

3939
## Table of Contents
4040

41-
- [Introduction](#introduction)
41+
- [Introduction to API V1](#introduction-to-api-v1)
4242
- [Getting Started](#getting-started)
4343
- [Authentication](#authentication)
4444
- [Requests & Responses](#requests--responses)
@@ -61,7 +61,6 @@ This markdown version of the Affinity API v1 documentation was generated automat
6161
- [Getting Field Value Changes for Status Fields](#getting-field-value-changes-for-status-fields)
6262
- [Getting the Strongest Relationship Strength Connection to an Organization on a List](#getting-the-strongest-relationship-strength-connection-to-an-organization-on-a-list)
6363
- [Useful Resources](#useful-resources)
64-
- [Partner With Us](#partner-with-us)
6564
- [Lists](#lists)
6665
- [The List Resource](#the-list-resource)
6766
- [List Types](#list-types)
@@ -191,9 +190,9 @@ This markdown version of the Affinity API v1 documentation was generated automat
191190
- [The Rate Limit Resource](#the-rate-limit-resource)
192191
- [Get Rate Limit Information](#get-rate-limit-information)
193192
- [Changelog](#changelog)
194-
# Introduction
193+
# Introduction to API V1
195194

196-
Welcome to the Affinity API! This API provides a RESTful interface for performing operations on the different objects that make up Affinity. If you are trying to accomplish an action through this API and are not sure on what endpoints to use, or if you have ideas on more endpoints we could create to make your workflow easier, please do not hesitate to contact us at [support@affinity.co](mailto:support@affinity.co).
195+
Welcome to the Affinity V1 API! This API provides a RESTful interface for performing operations on the different objects that make up Affinity. The latest Affinity API (v2) can be found at https://developer.affinity.co. The v2 API is not at feature parity with v1 - we are continuing to develop new v2 APIs to support all v1 functionality over time.
197196

198197
# Getting Started
199198

@@ -211,7 +210,7 @@ curl "https://api.affinity.co/api_endpoint" -u :$APIKEY
211210
curl "https://api.affinity.co/api_endpoint" -H "Authorization: Bearer ${APIKEY}"
212211
```
213212

214-
To use the API, you will need to generate an API secret key. This can be done easily through the Settings Panel that is accessible through the left sidebar on the Affinity web app. For more support, visit the [How to obtain your API Key](https://support.affinity.co/hc/en-us/articles/360032633992-How-to-obtain-your-API-Key) article in our Help Center.
213+
To use the API, you will need to generate an API secret key. This can be done easily through the Manage Apps Page in Affinity Settings. For more support, visit the [How to obtain your API Key](https://support.affinity.co/hc/en-us/articles/360032633992-How-to-obtain-your-API-Key) article in our Help Center.
215214

216215
Requests are authenticated using one of the following:
217216

@@ -220,7 +219,9 @@ Requests are authenticated using one of the following:
220219
| [HTTP Basic Auth](http://en.wikipedia.org/wiki/Basic_access_authentication) | Provide your API key as the basic auth password. You do not need to provide a username. |
221220
| [HTTP Bearer Auth](https://swagger.io/docs/specification/v3_0/authentication/bearer-authentication/) | Provide your API key as the bearer token. |
222221

223-
Currently, we support one key per user on your team. Once you have generated a key, you will need to pass in the key with every API request for us to process it successfully. Otherwise, an error with a code of `401` will be returned.
222+
Once you have generated a key, you will need to pass in the key with every API request for us to process it successfully. Otherwise, an error with a code of `401` will be returned.
223+
224+
To further secure an API key, you can define an IP Allowlist to limit which IP addresses or ranges can make API calls using that key.
224225

225226
#### Note
226227

@@ -240,7 +241,7 @@ Here is a list of all the error codes the Affinity API returns in case something
240241
| 403 | Forbidden -- Insufficient rights to a resource. |
241242
| 404 | Not Found -- Requested resource does not exist. |
242243
| 422 | Unprocessable Entity -- Malformed parameters supplied. This can also happen in cases the parameters supplied logically cannot complete the request. In this case, an appropriate error message is delivered. |
243-
| 429 | Too Many Requests -- You have exceed the rate limit. |
244+
| 429 | Too Many Requests -- You have exceeded the rate limit. |
244245
| 500 | Internal Server Error -- We had a problem with our server. Try again later. |
245246
| 503 | Service Unavailable -- This shouldn't generally happen. Either a deploy is in process, or Affinity services are down. |
246247

@@ -276,7 +277,7 @@ Your account plan tier will limit the overall number of requests you can make pe
276277
277278
#### Note
278279

279-
> Professional tier customers who signed up for Affinity before July 5, 2023 are alotted 40,000 calls per month.
280+
> Professional tier customers who signed up for Affinity before July 5, 2023 are allotted 40,000 calls per month.
280281
281282
This monthly account-level limit resets at the end of each calendar month.
282283

@@ -377,7 +378,7 @@ Use the common use cases below to learn how Affinity API endpoints work.
377378

378379
#### Helpful Tips
379380

380-
> - To reduce API calls, create any initial backfills with the REST API then use [Webhooks](#webhooks) to keep data synced. You may want to schedule occasional syncs via the REST API to fixed any inconsistencies
381+
> - To reduce API calls, create any initial backfills with the REST API then use [Webhooks](#webhooks) to keep data synced. You may want to schedule occasional syncs via the REST API to fix any inconsistencies
381382
> - Your instance may contain multiple fields with the same name (e.g. Last Funding Date). To confirm the field ID, manually make an edit to the field in question and inspect the request payload for the bulk request. The field ID will be listed as `entityAttributeId` ![](https://api-docs.affinity.co/images/request-payload-1136ff0a.png)
382383
> - The ID for a list, person, organization and opportunity can be found via the URL in the CRM. For a list `affinity.affinity.co/lists/[list_id]` and for a company profile `affinity.affinity.co/companies/[company_id]`
383384
> - For large lists, use `page_size` and `page_token` parameters in the [`GET /lists/list_id}/list-entries`](#get-all-list-entries) endpoint to improve performance
@@ -701,10 +702,6 @@ GET /relationships-strengths Response:
701702
- [Affinity Zapier Integrations](https://zapier.com/apps/affinity/integrations)
702703
- [Affinity Tray Connectors](https://tray.io/documentation/connectors/service/affinity)
703704

704-
# Partner With Us
705-
706-
If you're a developer interested in building an integration with Affinity's relationship intelligence platform for your customers, please [get in touch here](https://53mt2d9of77.typeform.com/to/LhEs2tzU).
707-
708705
# Lists
709706

710707
Lists are the primary data structure that you can interact with in Affinity. Each list manages a collection of either people, organizations or opportunities. We call people, organizations and opportunities "entities".
@@ -1836,27 +1833,30 @@ The action type specified below corresponds to the `action_type` of a field valu
18361833

18371834
`GET /field-value-changes`
18381835

1839-
Returns all field values changes attached to a specific field. Field value changes can be filtered by `action_type`, `person`, `organization`, `opportunity` or `list_entry` by passing in the appropriate parameter.
1836+
Returns all field values changes attached to a specific field. Field value changes can be filtered by `action_type`, `person`, `organization`, `opportunity`, `list_entry`, `changed_after` and `limit` by passing in the appropriate parameter.
18401837

18411838
### Query Parameters
18421839

18431840
| Parameter | Type | Required | Description |
18441841
| --- | --- | --- | --- |
18451842
| field_id | integer | true | A unique ID that represents a field object whose field values changes are to be retrieved. |
18461843
| action_type | integer | false | An integer that filters field value changes that were created with this specific action type (see above). |
1847-
| person_id | integer | custom* | A unique ID that represents a person object whose field value changes are to be retrieved. |
1848-
| organization_id | integer | custom* | A unique ID that represents an organization object whose field value changes are to be retrieved. |
1849-
| opportunity_id | integer | custom* | A unique ID that represents an opportunity object whose field value changes are to be retrieved. |
1850-
| list_entry_id | integer | custom* | A unique ID that represents a list entry object whose field value changes are to be retrieved. |
1844+
| person_id | integer | false | A unique ID that represents a person object whose field value changes are to be retrieved. |
1845+
| organization_id | integer | false | A unique ID that represents an organization object whose field value changes are to be retrieved. |
1846+
| opportunity_id | integer | false | A unique ID that represents an opportunity object whose field value changes are to be retrieved. |
1847+
| list_entry_id | integer | false | A unique ID that represents a list entry object whose field value changes are to be retrieved. |
1848+
| changed_after | datetime | false | A timestamp that filters field value changes created at or after that time. |
1849+
| limit | integer | false | An integer number that restricts the field value changes being returned. |
18511850

18521851
#### Returns
18531852

18541853
An array of all the field values changes associated with the supplied field and `person`, `organization`, `opportunity` or `list_entry` if specified.
18551854

18561855
#### Notes
18571856

1858-
> - Exactly one of `person_id`, `organization_id`, `opportunity_id`, or `list_entry_id` must be specified to the endpoint.
1859-
> - If a `person_id`, `organization_id`, or `opportunity_id` is specified, the endpoint returns all field value changes tied to these entities.
1857+
> - The response is default-sorted by `changed_at` in descending order, ensuring that the most recent field value changes are returned first.
1858+
> - The response may be filtered by providing at most one of the following parameters: `person_id`, `organization_id`, `opportunity_id`, or `list_entry_id`. If none are specified, the response encompasses all data for the given `field_id` across the organization. For fields with high volumes of data, organization-wide queries may be subject to timeouts; in these cases, the use of the `changed_after` and `limit` parameters is recommended.
1859+
> - If a `person_id`, `organization_id`, or `opportunity_id` is specified, the endpoint returns all field value changes for the provided `field_id` tied to these entities.
18601860
> - If a `list_entry_id` is specified, the result is filtered by the `person_id`, `organization_id` or `opportunity_id` which is tied to the specified `list_entry_id`.
18611861
18621862
#### Example Request
@@ -1919,13 +1919,13 @@ Dates of the most recent and upcoming interactions with a person are available i
19191919
| first_name | string | The first name of the person. |
19201920
| last_name | string | The last name of the person. |
19211921
| emails | string[] | The email addresses of the person. |
1922-
| primary_email | string | The email (automatically computed) that is most likely to the current active email address of the person. |
1922+
| primary_email | string | The email (automatically computed) that is most likely to be the current active email address of the person. |
19231923
| organization_ids | integer[] | An array of unique identifiers of organizations that the person is associated with. |
19241924
| opportunity_ids | integer[] | An array of unique identifiers of opportunities that the person is associated with. Only returned when `with_opportunities=true`. |
19251925
| current_organization_ids | integer[] | An array of unique identifiers of organizations that the person is currently associated with according to the Affinity Data: Current Organization in-app column. Only returned when `with_current_organizations=true`. |
19261926
| | | |
19271927
| list_entries | ListEntry[] | An array of list entry resources associated with the person, only returned as part of the [Get a Specific Person](#get-a-specific-person) endpoint. |
1928-
| interaction_dates | object | An object with seven string date fields representing the most recent and upcoming interactions with this person: `first_email_date`, `last_email_date`, `last_event_date`, `last_chat_message_date`, `last_interacton_date`, `first_event_date` and `next_event_date`. Only returned when passing `with_interaction_dates=true`. |
1928+
| interaction_dates | object | An object with seven string date fields representing the most recent and upcoming interactions with this person: `first_email_date`, `last_email_date`, `last_event_date`, `last_chat_message_date`, `last_interaction_date`, `first_event_date` and `next_event_date`. Only returned when passing `with_interaction_dates=true`. |
19291929
| interactions | object | An object with seven fields nested underneath. Each field corresponds to one of the seven interactions, and includes nested fields for `date` and `person_ids` which indicates the internal people associated with that event. Only returned when passing `with_interaction_dates=true`. |
19301930

19311931
### Person types
@@ -2388,7 +2388,7 @@ Dates of the most recent and upcoming interactions with an organization are avai
23882388
| opportunity_ids | integer[] | An array of unique identifiers of opportunities that are associated with the organization |
23892389
| global | boolean | Returns whether this organization is a part of Affinity's global dataset of organizations. This is always false if the organization was created by you. |
23902390
| list_entries | ListEntry[] | An array of list entry resources associated with the organization, only returned as part of the [Get a specific organization](#get-a-specific-organization) endpoint. |
2391-
| interaction_dates | object | An object with seven string date fields representing the most recent and upcoming interactions with this organization: `first_email_date`, `last_email_date`, `last_event_date`, `last_chat_message_date`, `last_interacton_date`, `first_event_date`, and `next_event_date`. Only returned when passing `with_interaction_dates=true`. |
2391+
| interaction_dates | object | An object with seven string date fields representing the most recent and upcoming interactions with this organization: `first_email_date`, `last_email_date`, `last_event_date`, `last_chat_message_date`, `last_interaction_date`, `first_event_date`, and `next_event_date`. Only returned when passing `with_interaction_dates=true`. |
23922392
| interactions | object | An object with seven fields nested underneath. Each field corresponds to one of the seven interactions, and includes nested fields for `date` and `person_ids` which indicates the internal people associated with that event (people only returned if passing `with_interaction_persons=true`). Only returned when passing `with_interaction_dates=true`. |
23932393

23942394
#### Example Response
@@ -5243,6 +5243,12 @@ curl "https://api.affinity.co/rate-limit" -u :$API_KEY
52435243
```
52445244
# Changelog
52455245

5246+
**2026-03-13**
5247+
5248+
- Added two new query parameters to GET /field-value-changes:
5249+
- changed_after (datetime): When provided, only field value changes with a changed_at timestamp greater than or equal to the given value are returned.
5250+
- limit (integer, min: 1): Restricts the number of field value changes returned.
5251+
52465252
**2025-11-05**
52475253

52485254
- Added support for bearer authentication

0 commit comments

Comments
 (0)