The Users API lets you look up and update members of your Heymarket team. Use it to retrieve user IDs for message attribution, verify team membership, or keep user profiles in sync with your identity provider.
The TeamUser object
Unique identifier for the team membership record.
Phone number associated with the user’s account.
Full display name of the user.
Email address of the user.
Numeric role identifier (e.g., 4 for member, 1 for admin).
ID of the team this membership belongs to.
ISO 8601 timestamp when the team membership was created.
ISO 8601 timestamp when the team membership was last updated.
ISO 8601 timestamp when the underlying user account was created.
ISO 8601 timestamp when the underlying user account was last updated.
Look up users
GET /v1/users/get
Retrieves team members matching the provided phone numbers or email addresses. You can supply one or both filters.
Array of phone numbers in E.164 format (without the leading +) to look up.
Array of email addresses to look up.
curl --request GET \
--url https://api.heymarket.com/v1/users/get \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"phone": ["15105553344"],
"email": ["help@heymarket.com"]
}'
{
"memberships" : [
{
"id" : 1 ,
"phone" : "15105553344" ,
"name" : "Alice Smith" ,
"email" : "help@heymarket.com" ,
"role_id" : 1 ,
"team_id" : 7 ,
"created_at" : "2023-01-15T09:00:00Z" ,
"updated_at" : "2024-03-10T14:22:00Z"
}
]
}
Update users
POST /v1/users/update
Updates one or more team members in a single request. Each entry in the users array must include the member’s id.
Array of user update objects. Show user update properties
ID of the team member to update.
curl --request POST \
--url https://api.heymarket.com/v1/users/update \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"users": [
{"id": 1, "first_name": "Jane", "last_name": "Doe"},
{"id": 2, "role_id": 4}
]
}'
{
"memberships" : [
{
"id" : 1 ,
"name" : "Jane Doe" ,
"email" : "help@heymarket.com" ,
"role_id" : 1 ,
"team_id" : 7
},
{
"id" : 2 ,
"name" : "Bob Jones" ,
"email" : "bob@example.com" ,
"role_id" : 4 ,
"team_id" : 7
}
]
}
first_name and last_name are linked fields. If you provide only one, the other may be overwritten. Always supply both when updating a user’s name.