Skip to main content

Update Contacts

POST 

/v1/users/{userId}/contacts

Performs incremental updates to the user's synced contacts.

Operations​

This endpoint supports:

  • Add: New contacts to include in screening personalization
  • Delete: Remove contacts no longer in the user's address book

Prerequisites​

The initial address book sync (PUT /contacts) must be completed before using this endpoint for incremental updates.

Best Practices​

  • Batch multiple contact changes in a single request when possible
  • Subscribe to device contact change events for real-time sync
  • Avoid full re-sync (PUT) for individual contact changes

Path Parameters​


    userId stringrequired

    UUID for the given user

Header Parameters​


    x-hiya-product-version string

    Product version. The standard "major.minor.patch" format is highly encouraged without any leading characters; "2.1.3" or "3.0.0" for example.


    x-hiya-account-user-id stringrequired

    The identifier of a logged-in user. Same identifier that is used for /users/{user_id}

Body

required

application/json

    addobject[]required
  • Array [


  • anonymizedContactstringrequired

    Hashed + salted contact (the salt to use is returned in the contactSalt field of 'Get User Account' API).

    • Format is SHA256(number + salt) with no spaces added
    • Number must be in E.164 format
  • ]


  • deleteobject[]required
  • Array [


  • anonymizedContactstringrequired

    Hashed + salted contact (the salt to use is returned in the contactSalt field of 'Get User Account' API).

    • Format is SHA256(number + salt) with no spaces added
    • Number must be in E.164 format
  • ]

Responses​

OK

Response Body

application/json

    successfulCountnumberrequired

    failureCountnumberrequired

    failuresobject[]
  • Array [


  • anonymizedContactstringrequired

    Hashed + salted contact (the salt to use is returned in the contactSalt field of 'Get User Account' API).

    • Format is SHA256(number + salt) with no spaces added
    • Number must be in E.164 format
  • ]

Example from Schema​

{
"successfulCount": 0,
"failureCount": 0,
"failures": [
{
"anonymizedContact": "string"
}
]
}