Add or Update Contact
post
[PlatformAddress]/api/1.0/contact?action=addOrUpdateContact
Add or Update Contact

Example Request: Adding a contact

1
{
2
"firstName": "Bobby",
3
"lastName": "Smith",
4
"email": "[email protected]",
5
"groups": [
6
{
7
"groupId": 10
8
}
9
],
10
"customFields": [
11
{
12
"fieldId": 33443,
13
"value": "No"
14
}
15
],
16
"companies": [
17
4,
18
5
19
],
20
"status": 2,
21
"smsStatus": 2,
22
"externalId" : "12345"
23
}
Copied!

Example Request: Updating a contact

Note : the groups will be set to only group 10, destroying the existing value
1
{
2
"id":33884,
3
"firstName":"Bobby",
4
"groups":[{"groupId":10}],
5
"customFields":[{"fieldId":33443,"value":"No"}],
6
"companies":[4,5],
7
"status": 2,
8
"smsStatus": 2,
9
}
Copied!
This call takes values for a contact, and either
  1. 1.
    Updates the values for that contact (after you have provided an id in the parameters), or
  2. 2.
    Adds the contact to the system (if the id parameter is missing)
The result of this call will contain the status of the result (either true or false) and the contact identifier of the updated or newly created contact.
The properties of the contact currently supported are:
  • firstName
  • lastName
  • email
  • phone
  • groups
    • This is an array of group objects with the ‘groupId’ key.
  • customFields
    • This is an array of custom field objects with ‘fieldId’ and ‘value’ keys
  • Companies
    • This is an array of companies Ids
  • status
  • smsStatus

Returns

Property
Description
success
If the contact was successfully added or updated
id
The unique identifier for the contact
message
Message of the failure (if success was false)

Email Status

The status is the record of whether the contact has opted in to email communication.
#
Description
1
Subscribed
2
Unsubscribed
3
Bounced
4
Registering
5
No Marketing

Sms status

The sms status is the record of whether the contact has opted in to sms communication.
#
Description
1
Subscribed
2
Unsubscribed
3
Failed
4
No Marketing
Last modified 3mo ago