How-to — task-oriented recipe.
Creating an organization using API V1
- Create a list, or decide which list you would like to add the organization to (done on the web).
-
Using the API, search for the organization first. Use domain if possible for best results and to prevent duplicates.
- Make sure the result is what you are searching for (ex. If you search for “affinity.co”, your result could be affinity.co and affinity.com). If you are able to find the organization, skip to Step 6.
-
If the search result didn’t find the organization you are looking for, create a new organization with the snippet below.
-
After the organization is created, below is what your response would look liked. You will get the same result if an organization is found as well.
-
Take the id, and add it to your list.
-
After adding it to a list, you can use the code below to create field values.