Skip to main content
All CollectionsAI AGENT™📝 Use Cases
Add Contacts to AI Agent using API
Add Contacts to AI Agent using API

🚀 Learn how to make use of auto-dialing through API

Updated over a month ago

2. For all requests API key should be included as an api-key query parameter. E.g.: https://api.ipmaxi.leadcm.com/api/v2/projects?api-key=%your-api-key%

3. Get a list of all projects through this endpoint: https://api.ipmaxi.leadcm.com/api/v2/projects Please note, that the Power Dialer project has a type parameter equal to 2. Alternatively, you can get one project through this endpoint: https://api.ipmaxi.leadcm.com/api/v2/project/{project_id}

4. Get the project ID from the id property from the project payload

5. Get phoneColumnId, nameColumnId and websiteColumnId properties from project payload

6. Get project columns through this endpoint: https://api.ipmaxi.leadcm.com/api/v1/project-columns/{project_id}

7. Prepare contacts payload:

  1. contacts —Array of contacts. Each contact should include:

    1. id with the null value

    2. data: Array of tuples with column id and its value. Column id should be at 0 index and the field value should be at 1 index

  2. addContacts — bool parameter. If true, contacts would be added to the project. If false contacts in the project would be replaced

  3. ifDuplicates —numeric value. it defines how duplicate contacts would be handled:

    1. 2 — keep duplicates

    2. 3 — discard duplicates

Payload example:

{
"contacts": [
{
"data": [
[{column_id}, {column_value}]
],
"id": null
}
],
"addContacts": true,
"ifDuplicates": 1
}

8. Send contact payload to this endpoint: https://api.ipmaxi.leadcm.com/api/v1/project-contacts/{project_id} using PUT method

Did this answer your question?