Skip to content

Create a customer contact

Request

Security
BearerAuth
Bodyapplication/jsonrequired
first_namestring, <= 1500 characters
Example:"John"
last_namestring, <= 1500 characters
Example:"Doe"
avatar_urlstring, (uri), <= 1500 characters

See RFC 3986 for URI syntax.

Example:"https://avatar.example.com/john"
email_addressesArray of objects, <= 10 items(ContactMethodEntry)

Email entries to add, update, or delete. Maximum 10 per contact. Duplicate email values (case-insensitive) are silently ignored.

phone_numbersArray of objects, <= 10 items(ContactMethodEntry)

Phone entries to add, update, or delete. Maximum 10 per contact. Duplicate phone values are silently ignored.

urlsobject(WebLinks)

Web links keyed by subtype. One entry per subtype. Set a value to an empty string to delete that subtype entry.

socialobject(SocialLinks)

Social profile links keyed by subtype. One entry per subtype. Set a value to an empty string to delete that subtype entry.

locationobject(ContactLocation)

Contact location. At least one field must be non-empty.

custom_fieldsobject(CustomFields)

Custom fields keyed by field name. Values are user-defined and may be any JSON scalar. Present as {} when the contact has none set.

Example:
{ "DOB": "14/08/1999" }
curl -i -X POST \
  https://developer.setmore.com/api/v2/customers \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "first_name": "John",
    "last_name": "Doe",
    "avatar_url": "https://avatar.example.com/john",
    "email_addresses": [
      {
        "value": "primary@gmail.com",
        "primary": true
      },
      {
        "value": "secondary@gmail.com"
      }
    ],
    "phone_numbers": [
      {
        "value": "+919399339922",
        "primary": true
      },
      {
        "value": "+919399339923"
      }
    ],
    "urls": {
      "meeting": "https://meet.example.com/john"
    },
    "social": {
      "facebook": "https://facebook.com/john",
      "linkedin": "https://linkedin.com/in/john"
    },
    "location": {
      "address": "123 Main St",
      "city": "Chennai"
    },
    "custom_fields": {
      "DOB": "12/08/1999"
    }
  }'

Responses

Customer contact created successfully.

Bodyapplication/json
dataobject(Contact)

Contact object returned in API responses. urls, social, and custom_fields are always present, as {} when the contact has none set. They are never omitted.

Response
{ "data": { "id": "eaafecfe-8c33-428a-88bd-ba4d012793aa", "first_name": "John", "last_name": "Doe", "avatar_url": "https://avatar.example.com/john", "phone_numbers": [ … ], "email_addresses": [ … ], "urls": { … }, "social": { … }, "location": { … }, "custom_fields": { … } } }