Profiles

On this page:

THE PROFILE OBJECT

Detailed description of the JSON object

THE CONTACT OBJECT

Detailed description of the JSON object

GET[base]/profiles

Get a profiles list

GET[base]/profiles/{profileId}

Get profile details

POST[base]/profiles

Add a new profile

PUT[base]/profile/{profileId}

Update a profile

DELETE[base]/profiles/{profileId}

Delete a profile

GET[base]/profiles/{profileId}/contacts

Get a contacts list

GET[base]/profiles/{profileId}/contacts/{contactId}

Get contact details

POST[base]/profiles/{profileId}/contacts

Add a new contact

PUT[base]/profiles/{profileId}/contacts/{contactId}

Update a contact

DELETE[base]/profiles/{profileId}/contacts/{contactId}

Delete a contact


The Profile object

This object provides the following data about a profile:

profileId string

The profile identifier.

contacts array

The array of Contact objects providing information about user contacts.

countryNumericCode string

The numeric code of the country, as per ISO 3166.

country object

The Country object providing information about country of a user.

enabled boolean

If true, a profile is enabled.

firstName string

The user first name.

middleName string

The user middle name.

lastName string

The user last name.

name string

The user full name consisting of the firstName, middleName and lastName field values.

tags array

A string-value tags assigned to a user.

createTime string

The date and time when the object has been created.

updateTime string

The date and time when the object has been last updated.

uuid string

The universally unique identifier of the object (if provided). Refer to Integrations for more information.

THE PROFILE OBJECT
{
  "profileId": "6006dda272f002519c3eb505",
  "contacts": [
    {
      "contactId": "6006dda272f002519c3eb505",
      "key": "email",
      "value": "marysmith@email.com",
      "createTime": "2021-01-01T00:00:00+00:00",
      "updateTime": "2021-01-01T00:00:00+00:00",
      "uuid": null
    }
  ],
  "countryNumericCode": "840",
  "country": {
    "countryId": "6006dda272f002519c3eb505",
    "countryName": "United States",
    "alpha2Code": "US",
    "alpha3Code": "USA",
    "numericCode": "840",
    "geographicRegionNumericCode": "021",
    "geographicRegionName": "Northern America",
    "createTime": "2021-01-01T00:00:00+00:00",
    "updateTime": "2021-01-01T00:00:00+00:00"
  },
  "enabled": true,
  "firstName": "Mary",
  "middleName": "Jane",
  "lastName": "Smith",
  "name": "Mary Jane Smith",
  "tags": [
    "blue",
    "green"
  ],
  "createTime": "2021-01-01T00:00:00+00:00",
  "updateTime": "2021-01-01T00:00:00+00:00",
  "uuid": null
}

The Contact object

This object provides the following data about a user contact:

contactId string

The identifier of the contact.

key string

The name of a contact type.

Possible values:

  • email

  • phone

value string

The value of a contact type: an email address or a phone number.

createTime string

The date and time when the object has been created.

updateTime string

The date and time when the object has been last updated.

uuid string

The universally unique identifier of the object (if provided). Refer to Integrations for more information.

THE CONTACT OBJECT
{
  "contactId": "6006dda272f002519c3eb505",
  "key": "email",
  "value": "a31b1402@privaterelay.appleid.com",
  "createTime": "2021-01-01T00:00:00+00:00",
  "updateTime": "2021-01-01T00:00:00+00:00",
  "uuid": null
}

Get a profiles list

Use this method to obtain a list of client profiles.

To obtain detailed information about a specified profile account, use a separate method to get profile details.

Request

Header parameters:

  • Authorization: Bearer <token>

Query parameters:

This method supports pagination, sorting, and filtering. For details on applying the parameters, refer to the Query parameters section. Possible parameters for filtering and sorting are listed below. For values description, refer to the Profile object.

Possible values for the filter parameter:

  • enabled

  • profileFirstName

  • profileLastName

  • profileMiddleName

  • name

  • uuid

Possible values for the sort_by parameter:

  • createTime (default)

  • enabled

  • firstName

  • lastName

  • middleName

  • name

  • profileId

  • updateTime

GET[base]/profiles

curl --location -g --request GET 'https://your.base-url.here/profiles?limit=10&offset=0&sort_by=createTime&sort_order=desc&filter[enabled]=1&filter[firstName]=Westley&filter[lastName]=Daniel&filter[middleName]=Ivanov&filter[name]=Westley Daniel Ivanov&filter[uuid]=9' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains an array of Profile objects providing information about the profiles that correspond to the query parameters specified in the request.


Get profile details

Use this method to obtain detailed information about a specified profile.

To obtain a list of client profiles, use a separate method to get a list of profiles.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

profileId required

The profile identifier.

GET[base]/profiles/{profileId}

curl --location --request GET 'https://your.base-url.here/profiles/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains a Profile object providing information about the specified profile.


Add a new profile

Use this method to add a new client profile.

Request

Header parameters:

  • Authorization: Bearer <token>

  • Content-Type: application/json

Body:

contacts array

The array of Contact objects providing information about user contacts

countryNumericCode string

The numeric code of the country, as per ISO 3166.

firstName string

The user first name.

The string value length can’t exceed 255 characters.

middleName string

The user middle name.

The string value length can’t exceed 255 characters.

lastName string

The user last name.

The string value length can’t exceed 255 characters.

uuid string

The universally unique identifier of the object (if provided). Refer to Integrations for more information.

POST[base]/profiles

curl --location --request POST 'https://your.base-url.here/profiles' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "contacts": [
    {
      "key": "email",
      "value": "client@email.com",
      "uuid": null
    },
    {
      "key": "phone",
      "value": "+9876543210",
      "uuid": null
    }
  ],
  "countryNumericCode": "840",
  "enabled": true,
  "firstName": "Mary",
  "middleName": "Jane",
  "lastName": "Smith",
  "uuid": null
}'

Response

Body:

In case of success, the response body contains a Profile object providing information about the newly created profile.


Update a profile

Use this method to update a specified profile.

Note

Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.

Request

Header parameters:

  • Authorization: Bearer <token>

  • Content-Type: application/json

Path parameters:

profileId required

The profile identifier.

Body:

Values of the following fields can be updated:

enabled boolean

If true, the user profile is enabled.

firstName string

The user first name.

The string value length can’t exceed 255 characters.

lastName string

The user last name.

The string value length can’t exceed 255 characters.

middleName string

The user middle name.

The string value length can’t exceed 255 characters.

countryNumericCode string

The numeric code of the country, as per ISO 3166.

uuid string

The universally unique identifier of the object (if provided). Refer to Integrations for more information.

PUT[base]/profile/{profileId}

curl --location --request PUT 'https://your.base-url.here/profiles/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "enabled": true,
  "firstName": "Mary",
  "lastName": "Smith",
  "middleName": "Jane",
  "countryNumericCode": "840",
  "uuid": null
}'

Response

Body:

In case of success, the response body contains a Profile object providing information about the updated profile.


Delete a profile

Use this method to delete a specified profile.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

profileId required

The profile identifier.

DELETE[base]/profiles/{profileId}

curl --location --request DELETE 'https://your.base-url.here/profiles/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, no response body is returned.


Get a contacts list

Use this method to obtain a list of contacts of a client profile.

To obtain detailed information about a specified contact, use a separate method to get contact details.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

profileId required

The profile identifier.

GET[base]/profiles/{profileId}/contacts

curl --location --request GET 'https://your.base-url.here/profiles/60ba407d15951453e60e49f8/contacts' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains an array of Contact objects providing information about all available user contacts that correspond to the query parameters specified in the request.


Get contact details

Use this method to obtain detailed information about a specified contact.

To obtain a list of contacts, use a separate method to get a list of contacts.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

profileId required

The profile identifier.

contactId required

The contact identifier.

GET[base]/profiles/{profileId}/contacts/{contactId}

curl --location --request GET 'https://your.base-url.here/profiles/60ba407d15951453e60e49f8/contacts/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains a Contact object providing information about the specified contact.


Add a new contact

Use this method to add a new client contact.

Request

Header parameters:

  • Authorization: Bearer <token>

  • Content-Type: application/json

Path parameters:

profileId required

The profile identifier.

Body:

key string

The name of a contact type. Possible values:

  • email

  • phone

value string

The value of a contact type: an email address or a phone number.

uuid string

The universally unique identifier of the object. Refer to Integrations for more information.

POST[base]/profiles/{profileId}/contacts

curl --location --request POST 'https://your.base-url.here/profiles/60ba407d15951453e60e49f8/contacts' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "key": "email",
  "value": "client@email.com",
  "uuid": null
}'

Response

Body:

In case of success, the response body contains a Contact object providing information about the newly created contact.


Update a contact

Use this method to update information for a specified contact.

Note

Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.

Request

Header parameters:

  • Authorization: Bearer <token>

  • Content-Type: application/json

Path parameters:

profileId required

The profile identifier.

contactId required

The contact identifier.

Body:

Values of the following fields can be updated:

key string

The name of a contact type. Possible values:

  • email

  • phone

value string

The value of a contact type: an email address or a phone number.

uuid string

The universally unique identifier of the object. Refer to Integrations for more information.

PUT[base]/profiles/{profileId}/contacts/{contactId}

curl --location --request PUT 'https://my.stage.org/v1/profiles/60ba407d15951453e60e49f8/contacts/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "key": "email",
  "value": "client@email.com",
  "uuid": null
}'

Response

Body:

In case of success, the response body contains a Contact object providing information about the updated contact.


Delete a contact

Use this method to delete a specified contact.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

profileId required

The profile identifier.

contactId required

The contact identifier.

DELETE[base]/profiles/{profileId}/contacts/{contactId}

curl --location --request DELETE 'https://your.base-url.here/profiles/60ba407d15951453e60e49f8/contacts/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, no response body is returned.