Skip to main content

Get Caller Relations

GET 

/v1/users/{userId}/relations

Retrieves all caller relationship rules configured for this user.

Response Data​

Returns a list of phone numbers with their assigned relation types (Block, Allow, Voicemail) and creation timestamps.

Use Cases​

  • Settings Display: Show the user's blocklist, allowlist, and voicemail routing rules
  • Sync: Synchronize relation data across multiple user devices
  • Backup: Export user preferences for account migration

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}

Responses​

OK

Response Body

application/json

    relationsobject[]required
  • Array [


  • phoneNumberstringrequired

    The phone number in E.164 format


    relationTypestringrequired

    Type of relation with this phone number:

    • Block: Auto-reject calls from this caller
    • Voicemail: Send all calls from this caller to voicemail
    • Allow: Auto transfer (don't screen) all calls from this caller

    Possible values: [Block, Voicemail, Allow]


    createdAtstringrequired

    The UTC timestamp of when the relation was created in ISO 8601 format (including milliseconds).


    updatedAtstring

    The UTC timestamp of when the relation was last updated in ISO 8601 format (including milliseconds).

  • ]

Example from Schema​

{
"relations": [
{
"phoneNumber": "string",
"relationType": "Block",
"createdAt": "string",
"updatedAt": "string"
}
]
}