Skip to content

Commit b969299

Browse files
committed
Improve raw markdown accessibility in API documentation
- Add raw GitHub URL to documentation header - Add note about direct raw access for programmatic use - Fix minor formatting issue
1 parent 8f33f3a commit b969299

1 file changed

Lines changed: 39 additions & 11 deletions

File tree

docs/v1/affinity_api_docs.md

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ This markdown version of the Affinity API v1 documentation was created to provid
1818
- **Offline access** - Work with the documentation without an internet connection
1919
- **Text-based search** - Easier to search and navigate compared to interactive websites
2020
- **Version control** - Track changes and updates over time
21+
- **Direct raw access** - Accessible via GitHub raw URLs for programmatic use
2122

2223
**Source:** Extracted from the live Affinity API documentation at https://api-docs.affinity.co/
2324

25+
**Raw Markdown URL:** `https://raw.githubusercontent.com/yaniv-golan/affinity-api-docs/main/docs/v1/affinity_api_docs.md`
26+
2427
**Documentation Version:** This copy is based on the official documentation as it appeared on **November 6, 2025 at 18:49:04** (Last updated: 11/06/2025 18:49:04). The official documentation may have been updated since this copy was created.
2528

2629
> **⚠️ Use at Your Own Risk**
@@ -346,6 +349,7 @@ Use the common use cases below to learn how Affinity API endpoints work.
346349
>
347350
> - 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**]`
348351
> - For large lists, use `page_size` and `page_token` parameters in the [`GET /lists/{list_id}/list-entries`](#list-entries) endpoint to improve performance
352+
>
349353
## Getting Field Values for All List Entries on a List
350354

351355
1. Query [`GET /lists`](#list) to get all lists and filter results by list name to get the appropriate list ID
@@ -883,7 +887,7 @@ curl -X POST “https://api.affinity.co/lists/450/list-entries” \
883887
> **Note**
884888
> Person and company lists can contain the same entity multiple times. Depending on your use case, before you add an entry, you may want to verify whether or not it exists in the list already.
885889
886-
#### The list entry resource that was just created through this request.
890+
#### The list entry resource that was just created through this request
887891

888892
#### Delete a Specific List Entry
889893

@@ -962,6 +966,7 @@ curl "https://api.affinity.co/lists/450/list-entries/56517" \
962966
## GET /person/field
963967

964968
- Global field IDs for organizations are returned from GET /organization/field
969+
965970
#### Example Request
966971

967972
```bash
@@ -979,6 +984,7 @@ curl "https://api.affinity.co/persons/fields" -u :$APIKEY
979984
## GET /organization/field
980985

981986
- List-specific field IDs are also returned from GET /list/{list_id}
987+
982988
#### Example Request
983989

984990
```bash
@@ -1061,7 +1067,7 @@ is_list_specific boolean false This determines whether the field object belongs
10611067

10621068
is_required boolean false This determines whether the field object is required.
10631069

1064-
| This determine whether multiple value can be added to a single cells for the field. | is _list_ specific | This determine whether the fields objects belongs to a specific list. If set to true, you must pass in the appropriate list_id. | is _required |
1070+
| This determine whether multiple value can be added to a single cells for the field. | is _list_ specific | This determine whether the fields objects belongs to a specific list. If set to true, you must pass in the appropriate list_id. | is_required |
10651071
#### Field Entity Type
10661072

10671073
#### Return
@@ -1106,6 +1112,7 @@ As an example for how a field value is created:
11061112
- A person X is added to this list. This action creates a list entry for this person.
11071113
- A value, 50,000, is entered in the cell corresponding to person X in the Deal Size column.
11081114
- 50,000 is now a field value tied to the list entry corresponding to person X, and the "Deal Size" field.
1115+
11091116
> **Note**
11101117
> By default, Affinity creates some fields for you automatically. These include Location, Industry, Job Title, and more. See the Default Fields section for more information.
11111118
@@ -1502,11 +1509,12 @@ An array of all the field value changes associated with the supplied field and p
15021509

15031510
The person API allows you to manage all the contacts of your organization. These people include anyone your team has ever been in email communication or meeting with, and all the people that your team has added to Affinity.
15041511

1505-
#### If you are looking to add or remove a person from a list, please check out the List Entries section of the API.
1512+
#### If you are looking to add or remove a person from a list, please check out the List Entries section of the API
15061513

15071514
List Entries
15081515

15091516
- If you are looking to modify a person's field value (one of the cells on Affinity's spreadsheet), please check out the Field Value section of the API.
1517+
15101518
#### The Person Resource
15111519

15121520
Each person resource is assigned a unique id and stores the name, type, and email addresses of the person. A person resource also has access to a Smart attribute called primary_email. The value of primary_email is automatically computed and represents the most likely current active email address for the person.
@@ -1776,7 +1784,7 @@ Update an existing person with person_id with the supplied parameters. Only attr
17761784

17771785
The person object that was just updated through this request.
17781786

1779-
#### If you are looking to add an existing person to a list, please check the List Entries section of the API.
1787+
#### If you are looking to add an existing person to a list, please check the List Entries section of the API
17801788

17811789
> **Note**
17821790
> If you are trying to add a new email or organization to a person, the existing values for email and organization_id must also be supplied as parameters.
@@ -1854,9 +1862,10 @@ An organization has many people associated with it - these are your team's point
18541862

18551863
To make the data quality as good as possible, we have our own proprietary database of organizations that we have developed through third-party partnerships and web scraping. We use this database to enrich organization data automatically.
18561864

1857-
#### If you are looking to add or remove an organization from a list, please check out the List Entries section of the API.
1865+
#### If you are looking to add or remove an organization from a list, please check out the List Entries section of the API
18581866

18591867
- If you are looking to modify a field value (one of the cells on Affinity' spreadsheet), please check out the Field Value section of the API.
1868+
18601869
#### The Organization Resource
18611870

18621871
Each organization object has a unique id. It also has a name, domain (the website of the organization), and people associated with it. The domain is an important attribute from an automation perspective, as it's used to automatically associate person objects with organizations.
@@ -2100,7 +2109,7 @@ Create a new organization with the supplied parameters.
21002109

21012110
The organization resource that was just created by a successful request.
21022111

2103-
#### If you are looking to add an existing organization to a list, please check the List Entries section of the API.
2112+
#### If you are looking to add an existing organization to a list, please check the List Entries section of the API
21042113

21052114
#### Update an Organization
21062115

@@ -2129,7 +2138,7 @@ Update an existing organization with organization_id with the supplied parameter
21292138

21302139
The organization resource that was just updated through a successful request.
21312140

2132-
#### If you are looking to add an existing organization to a list, please check the List Entries section of the API.
2141+
#### If you are looking to add an existing organization to a list, please check the List Entries section of the API
21332142

21342143
> **Note**
21352144
> If you are trying to add a person to an organization, the existing values for person_id must also be passed into the endpoint.
@@ -2474,7 +2483,7 @@ curl "https://api.affinity.co/opportunities/120611418" \
24742483

24752484
Return all interactions that meet the query parameters.
24762485

2477-
#### type integer true The type of interaction to be retrieved.
2486+
#### type integer true The type of interaction to be retrieved
24782487

24792488
logging_type integer false The logging type of interaction to be retrieved.
24802489

@@ -2506,15 +2515,16 @@ page_size number false How many results to return per page. (Default is the maxi
25062515
| end_time | string | A string (formatted according to ISO 8601) representing the end of the time range for the interaction to be retrieved. Must be after start_time. Date range must not exceed one year. | page_size | number | How many results to return per page. (Default is the maximum value of 100.) |
25072516
page_token string false The next_page_token from the previous response required to retrieve the next page of result.
25082517

2509-
#### One person_id, organization_id or opportunity_id must be specified per request.
2518+
#### One person_id, organization_id or opportunity_id must be specified per request
25102519

25112520
- Only one type of interaction can be specified per request.
25122521
- An error will be returned if an internal person is used in the person_id parameter.
2522+
25132523
#### Return
25142524

25152525
An array of all the interactions filtered by query parameters. next_page_token includes a token to be sent along with the next request as the page_token parameter to fetch the next page of results.
25162526

2517-
#### Interaction in the API response may not be visible on a CRM profile page if they have the exact same timestamp as another interaction.
2527+
#### Interaction in the API response may not be visible on a CRM profile page if they have the exact same timestamp as another interaction
25182528

25192529
#### Get a Specific Interaction
25202530

@@ -2671,7 +2681,7 @@ ISO 8601
26712681

26722682
The interaction created through this request.
26732683

2674-
#### When creating an interaction using the API, the users corresponding to the API token will be the creator by default.
2684+
#### When creating an interaction using the API, the users corresponding to the API token will be the creator by default
26752685

26762686
#### Update an Interaction
26772687

@@ -4045,6 +4055,7 @@ The rate limit resource, a JSON body of data including limit, calls remaining, s
40454055
#### 2025-11-05
40464056

40474057
- Added support for bearer authentication
4058+
40484059
#### 2024-07-17
40494060

40504061
- At least one associated person, company, opportunity, or parent note must be specified when creating a note.
@@ -4055,20 +4066,23 @@ creating a note
40554066
- /interaction now restricts the duration between start_time and end_time to a maximum of one year
40564067
- /interaction now ensures that the provided start_time is before the provided end_time
40574068
- /interaction now has a maximum page_size of 100
4069+
40584070
#### 2023-08-07
40594071

40604072
- Added associated_person_id, interaction_person_id, interaction_id, and interaction_type to the note resource. The person_id, associated_person_id, and interaction_person_id properties on a note have been updated. See [the note resource](#the-note-resource) for more details.
40614073

40624074
#### 2023-07-27
40634075

40644076
- Datetime values in webhook bodies and API responses are ISO 8601-formatted date strings. For example: "2023-06-21T16:00:28.315-07:00".
4077+
40654078
#### 2023-07-17
40664079

40674080
- Added information about notes with type 1. See [note with type 1](#the-note-resource) for more details.
40684081

40694082
#### 2023-07-03
40704083

40714084
- Updated API access information for Professional tier customers.
4085+
40724086
#### 2023-06-13
40734087

40744088
- The created_at parameter on the POST endpoint for notes no longer accepts timestamps in the future. See [POST /note](#post-note) for more details.
@@ -4103,28 +4117,36 @@ create a note within a thread
41034117
#### 2023-02-10
41044118

41054119
- Added Rate Limit Header section to the Rate Limit documentation.
4120+
41064121
#### 2023-02-08
41074122

41084123
- Added created_at and updated_at timestamp to Field Value.
41094124
- Added an updated_at timestamp to Note.
4125+
41104126
#### 2023-02-07
41114127

41124128
- Added the ability to retrieve Current Organization columns data on Person.
4129+
41134130
#### 2022-09-06
41144131

41154132
- Added Rate Limit endpoint and documentation. Moved from a daily to a per minute per user limit. Monthly per account limit remain the same.
4133+
41164134
#### 2022-09-02
41174135

41184136
- Added entity_type and exclude_dropdown_option documentation to Field.
4137+
41194138
#### 2022-05-05
41204139

41214140
- Added enrichment_source documentation to Field.
4141+
41224142
#### 2022-04-11
41234143

41244144
- Added Partner With Us section.
4145+
41254146
#### 2022-03-21
41264147

41274148
- Added opportunity_id fields to person and organization response.
4149+
41284150
#### 2022-02-23
41294151

41304152
- Added Interaction API documentation.
@@ -4151,6 +4173,7 @@ Reminder webhook
41514173

41524174
- Added organization.merged event to Webhook.
41534175
- Added mentioned_person_id and is_meeting fields to Note.
4176+
41544177
#### 2021-11-22
41554178

41564179
- Added link out to Help Center for webhook response
@@ -4164,10 +4187,12 @@ GET field value change
41644187
#### 2021-10-15
41654188

41664189
- Minor content update
4190+
41674191
#### 2021-10-04
41684192

41694193
- Update to Example Response.
41704194
- Responsive tweak.
4195+
41714196
#### 2021-09-07
41724197

41734198
- Revamped API documentation Added Common Use Case section. Added Rate Limit section. Update to PUT and POST cURL example.
@@ -4176,12 +4201,15 @@ Common Use Case
41764201

41774202
- Added Rate Limit section.
41784203
- Update to PUT and POST cURL example.
4204+
41794205
#### 2021-08-18
41804206

41814207
- Fixed typo in the API doc where entity_id and creator_id wa in path paramater when they should be inside the payload parameter for Create a New List Entry.
4208+
41824209
#### 2021-07-28
41834210

41844211
- Fixed typo in Relationship Strength section.
4212+
41854213
#### 2021-05-05
41864214

41874215
- Updated API rate limit information.

0 commit comments

Comments
 (0)