Skip to main content
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

id
integer
Unique identifier for the team membership record.
phone
string
Phone number associated with the user’s account.
name
string
Full display name of the user.
email
string
Email address of the user.
role_id
integer
Numeric role identifier (e.g., 4 for member, 1 for admin).
team_id
integer
ID of the team this membership belongs to.
created_at
string
ISO 8601 timestamp when the team membership was created.
updated_at
string
ISO 8601 timestamp when the team membership was last updated.
user_created_at
string
ISO 8601 timestamp when the underlying user account was created.
user_updated_at
string
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.
phone
string[]
Array of phone numbers in E.164 format (without the leading +) to look up.
email
string[]
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.
users
object[]
required
Array of user update objects.
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.