Skip to main content
How-to — task-oriented recipe.
To add an organization to an organization list in Affinity using the API, check out the API V1 option below. Note: If you’re currently trialing Affinity, you will not be able to access the Affinity API until you purchase one of the following subscription tiers (see the section titled “Who has access to Affinity API V1 and API V2?” within this article: Getting started with the Affinity API + FAQs): Scale, Advanced, or Enterprise.

Adding an organization to an organization list using API V1

In this example, we will add Affinity (affinity.co) to our “Deals” list using the API. The list_id is “9011” and the status option will be defaulted to “Identified.”
  1. First, search if the organization exists in your Affinity account. Api Org 1
  1. Seeing that this organization is in our Affinity account, we’ll make another search to see if it’s already added to any list.
    Api Org 2
  1. The organization is currently not in my desired list (list_id: 9011). I will now add Affinity as an entry to my “Deals” list. Api Org 3
  1. We can see that there is no default status option set for Affinity (affinity.co). Api Org 4
  1. Search the available statuses for this list. The status we want is “Identified”, or id: 60364. Api Org 5
  1. Now, we can associate Affinity (affinity.co) with the status option “Identified” on the “Deals” list. We’ll post this last part in Python (most commonly used). Api Org 6
Below is the same code (copy and paste friendly) in CURL. You can use online tools like https://postman.com to convert it to any other language you’ll be using.
curl "https://api.affinity.co/field-values" \
 -u :<API-KEY> \
 -d field_id=78001 \
 -d value="60364" \
 -d list_entry_id="18489757" \
 -d entity_id=2167322

Adding an organization to an organization list using API V2 (not supported at this time)

This functionality is not supported on API V2 at this time. Thank you for your patience and stay tuned for updates later this year.