Download OpenAPI specification:
MainBrainer CRM API for public
This endpoint is used to upsert a contact into the CRM, i.e., create a contact if it doesn't already exist or update it if it does. In an update, any fields omitted from the request will remain as they were. In case a new contact is created, a unique contact ID
is generated and assigned to the newly created contact. You can later use this contact ID to retrieve the details for a particular contact.
This endpoint is used to create a new contact or update an existing contact in the MainBrainer CRM.
listId | string or null <uuid> Specify the List ID of the CRM contact list under which you wish to upsert the contact. |
contactId | integer or null <int64> ContactID is the |
mobileCountryCode | integer or null <int32> The |
mobileNumber | integer or null <int64> The |
mobileOptIn | boolean or null The Mobile Opt-In status of the contact. |
string or null The email address of the contact you wish to create/update. | |
emailOptIn | boolean or null The Email Opt-In status of the contact you wish to create/update. |
Array of objects or null (PropertyFields) MainBrainer CRM stores information about the contacts under different Property Fields. Specify the property fields along with the corresponding contact details for the contacts you wish to create/update. |
{- "listId": "9fc6ad7d-902a-4834-b161-a4911b883d44",
- "contactId": 0,
- "mobileCountryCode": 0,
- "mobileNumber": 0,
- "mobileOptIn": true,
- "email": "string",
- "emailOptIn": true,
- "propertyFields": [
- {
- "propertyId": "8e8b8450-dc1b-4360-8109-7067337b42cb",
- "propertyName": "string",
- "propertyValue": "string"
}
]
}
{- "status": "Success",
- "message": "string",
- "data": {
- "contactId": "string",
- "status": 0,
- "message": "string",
- "invalidPropertiesList": [
- {
- "propertyId": "8e8b8450-dc1b-4360-8109-7067337b42cb",
- "propertyName": "string",
- "propertyValue": "string"
}
], - "invalidContactIdList": [
- "string"
], - "balance": { }
}
}
This endpoint is particularly useful for periodically syncing data from another database to the MainBrainer CRM
. While we support batch sizes of up to 1000 contacts per request, we recommend that you limit the batch size to 100 contacts or fewer per request to maximize the performance. and It can take a few minutes for the changes/updates to be applied to the records because the changes made through this endpoint are processed asynchronously.
This endpoint upserts (insert/ update) a batch of contacts to the MainBrainer CRM.
In an update, any fields omitted from the request will remain as they were.
listId | string or null <uuid> Specify the List ID of the CRM contact list under which you wish to upsert the contact. |
required | Array of objects (CreateUpdateContacts) |
webHookUrl | string or null The webhook URL where you want to receive updates for the contacts being created. For each batch, the update will specify the following: |
{- "listId": "9fc6ad7d-902a-4834-b161-a4911b883d44",
- "createUpdateContacts": [
- {
- "listId": "9fc6ad7d-902a-4834-b161-a4911b883d44",
- "contactId": 0,
- "mobileCountryCode": 0,
- "mobileNumber": 0,
- "mobileOptIn": true,
- "email": "string",
- "emailOptIn": true,
- "propertyFields": [
- {
- "propertyId": "8e8b8450-dc1b-4360-8109-7067337b42cb",
- "propertyName": "string",
- "propertyValue": "string"
}
]
}
], - "webHookUrl": "string"
}
{- "status": "Success",
- "message": "string",
- "data": {
- "batchId": "string",
- "processed": "string",
- "contactId": "string",
- "status": 0,
- "message": "string",
- "invalidPropertiesList": [
- {
- "propertyId": "8e8b8450-dc1b-4360-8109-7067337b42cb",
- "propertyName": "string",
- "propertyValue": "string"
}
], - "invalidContactIdList": [
- "string"
], - "balance": { }
}
}
This endpoint returns the update status for a contact batch upsert request placed using the endpoint Contact Insert and Update (Batch). Use the BatchID received in the response body from the endpoint Contact Insert and Update (Batch) as the input parameter ID to get the latest update status.
id required | string <uuid> The BatchID received in the response body from the endpoint Contact Insert and Update (Batch). |
{- "id": "string",
- "status": 0,
- "statusText": "string",
- "statusFailedReason": "string",
- "processedObj": {
- "inserted": {
- "count": 0,
- "contactIds": [
- 0
]
}, - "updated": {
- "count": 0,
- "contactIds": [
- 0
]
}, - "skipped": {
- "count": 0,
- "contactIds": [
- 0
]
}
}
}
In the MainBrainer CRM
, contacts can be grouped under various Lists. Each list is assigned a unique List ID that acts as a Unique identifier for the particular list. Use this endpoint to retrieve the list of all contact lists created under your MainBrainer account along with their corresponding ListIDs.
limit | integer or null <int32> Specify the number of contact lists that you want the endpoint to return. |
offset | integer or null <int32> Specify the offset point, i.e., the number of contact lists you wish to skip and the point from where you would like to begin displaying the results. |
[- {
- "id": "string",
- "name": "string",
- "description": "string",
- "created_at": "string",
- "updated_at": "string"
}
]
In the MainBrainer CRM, contact information is stored under a contact as the contact’s various properties. This endpoint returns the different property heads (property IDs along with the property names) under which contact information is stored for the specified contact list.
listid required | string <uuid> The contact list ID whose property fields you wish to retrieve. |
[- {
- "propertyId": "string",
- "propertyName": "string",
- "personalizationTag": "string"
}
]