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.

SecurityBearer
Request
Request Body schema: application/json

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.

Array
propertyId
string or null <uuid>

Unique identifier of the property field under which you wish to insert/update contact data

propertyName
string or null

Name of the property field under which you wish to insert/update contact data

propertyValue
string or null

The contact data you wish to insert/update under the specified property field

Responses
202

Success

400

Bad Request

401

Unauthorized

409

Conflict

422

Client Error

500

Server Error

post/contacts/insertupdate
Request samples
application/json
{
  • "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"
      }
    ]
}
Response samples
{
  • "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": { }
    }
}