Skip to main content
POST
/
profiles
/
{id}
/
marketing-opt-in
Update the current marketing opt in or opt out for a profile. This will generate an activity. The current opt in or opt out status can be determined by looking at activities. If there is an activity of type "marketing_opt_in" and no "marketing_opt_out" after that, the profile is opted in.
curl --request POST \
  --url https://1-some-client.some-server.healvi-chat/third-party/v1/profiles/{id}/marketing-opt-in \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "opt_in": true
}'
{
  "data": {
    "id": 123,
    "salutation": "formal_male",
    "name": "John Doe",
    "gender": "undisclosed",
    "blocked": true,
    "date_of_birth": "1970-01-01",
    "phone_number": "+4915224367929",
    "email": "jsmith@example.com",
    "address": "<string>",
    "custom_1": "<string>",
    "custom_2": "<string>",
    "custom_3": "<string>",
    "custom_4": "<string>",
    "custom_5": "<string>",
    "created_at": "2023-01-01T12:00:00Z",
    "updated_at": "2023-01-01T12:00:00Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
integer
required

Body

application/json
opt_in
boolean

If a profile is not currently opted in and this field is true, the profile will be opted in. If a profile is already opted in and this field is true, nothing will change. Same applies to setting this field to false and therefore opting out.

Response

200 - application/json

Success

data
object

Profile data of a customer. A profile can have many customers. A customer belongs to one profile. Can be used to connect a real person with multiple messengers (aka customers) to one profile.