MainBrainer CRM API

Download OpenAPI specification:

MainBrainer CRM API for public

CRM

Contact Insert and Update

Create or Update a Single Contact in the MainBrainer CRM

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.

Authorizations:
Bearer
Request Body schema: application/json
required

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 unique identifier for a contact created in the MainBrainer CRM. When making an update request, we recommend that you always include the contactID in your request..

mobileCountryCode
integer or null <int32>

The country code of the contact you wish to create/update.

mobileNumber
integer or null <int64>

The mobile number of the contact you wish to create/update.

mobileOptIn
boolean or null

The Mobile Opt-In status of the contact.

email
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.

Responses

Request samples

Content type
application/json
{
  • "listId": "9fc6ad7d-902a-4834-b161-a4911b883d44",
  • "contactId": 0,
  • "mobileCountryCode": 0,
  • "mobileNumber": 0,
  • "mobileOptIn": true,
  • "email": "string",
  • "emailOptIn": true,
  • "propertyFields": [
    ]
}

Response samples

Content type
{
  • "status": "Success",
  • "message": "string",
  • "data": {
    }
}

Contacts Insert and Update (Batch)

Create or Update a Bulk of Contacts in the MainBrainer CRM

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.

Authorizations:
Bearer
Request Body schema: application/json
required

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:
• Number of Contacts inserted along with the Contact IDs.
• Number of Contacts updated along with the Contact IDs
• Number of Contacts skipped along with the Contact IDs

Responses

Request samples

Content type
application/json
{
  • "listId": "9fc6ad7d-902a-4834-b161-a4911b883d44",
  • "createUpdateContacts": [
    ],
  • "webHookUrl": "string"
}

Response samples

Content type
{
  • "status": "Success",
  • "message": "string",
  • "data": {
    }
}

Get Contact Batch Insert and Update Status

Retrieve the current status of a contact bulk upsert request

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.

Authorizations:
Bearer
path Parameters
id
required
string <uuid>

The BatchID received in the response body from the endpoint Contact Insert and Update (Batch).

Responses

Response samples

Content type
{
  • "id": "string",
  • "status": 0,
  • "statusText": "string",
  • "statusFailedReason": "string",
  • "processedObj": {
    }
}

Get Your List Name and IDs

Retrieve all contact lists created in your account along with their ListIDs

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.

Authorizations:
Bearer
query Parameters
limit
integer or null <int32>

Specify the number of contact lists that you want the endpoint to return.
Default value: 100
Maximum value: 1000

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.
Default value: 0

Responses

Response samples

Content type
[
  • {
    }
]

Get Contact List Properties

Retrieve all the property fields that exist in the specified contact list.

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.

Authorizations:
Bearer
path Parameters
listid
required
string <uuid>

The contact list ID whose property fields you wish to retrieve.

Responses

Response samples

Content type
[
  • {
    }
]