Associate device with person record

šŸš§

Before you start...

Before you get started, we recommend review the Associate Person to Device customer API in the Vibes Push SDK section to understand how and when this API call should be used.

This POST method assigns a given device to a person record.

Notes:

  • If a person_key is supplied, and a person with that person_key does not exist, that will result in an error.
  • If an external_person_id is supplied and a person with that external_person_id does not exist, then the external_person_id will be assigned to the Person currently associated with the device.
  • If the indicated person exists and the device is not already associated with them, it will be moved to be associated with them.
  • If the indicated person is already associated with the device, then nothing will be done and a success response will be returned.

Response

If the call is successful, the response will include the newly associated person entity. Now that the vibes_device_id and external_device_id are associated, you can use person data to target push messaging to the userā€™s push device.

In the case of an error, a standard public API error response will be returned instead. Below is a list of some common responses you may see.

Status CodeMeaningResponse Type
200 - OKThe device was successfully assigned to the given person.Success
404 - Not FoundThe vibes_device_id or person_key (if provided) could not be found.Failure
422 - Unprocessible EntityThe requested assignment could not be completed. Reason will be stated in the response body.Failure
Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!