Show Developer Menu

POST /contacts

Issuing a POST call to contacts will allow you to create new contact.

Example Request with Email
curl 'https://{brand}.reamaze.io/api/v1/contacts' \
  -u {login-email}:{api-token} \
  -H 'Accept: application/json' \
  -H 'Content-type: application/json' \
  -X POST -d '{"contact":
    {"name": "bob", "email": "[email protected]", "id": "123", "external_avatar_url": "https://www.example.com/avatar.png", "notes": ["Some note", "Some other note"], "data": {"custom_attribute": "custom data"}}}'
Response

A successful request will return the JSON for the newly created contact.

A failed request will return an HTTP 422 Unprocessable Entity with the JSON body explaining the error.

Notes
  • The id uniquely identifies a contact and should correspond to the id internal to your application or authentication system.
  • Either email or mobile must be provided. If mobile is provided the value should be in E.164 format, without spaces. (e.g. +12223334444). Other contact types (e.g. Facebook) cannot be created.
  • external_avatar_url is optional and must be an absolute URL.
  • data can be set of key/value pairs to associate with the user, but can only be one level deep. It will display as Customer Data Attributes in Re:amaze.
  • notes is an array of strings that will create a new note for each indice
Example Request with Mobile
curl 'https://{brand}.reamaze.io/api/v1/contacts' \
  -u {login-email}:{api-token} \
  -H 'Accept: application/json' \
  -H 'Content-type: application/json' \
  -X POST -d '{"contact": {"name": "bob", "mobile": "+12223334444", "id": "123", "external_avatar_url": "https://www.example.com/avatar.png", "notes": ["Some note", "Some other note"], "data": {"custom_attribute": "custom data"}}}'