Skip to main content

What is a User ID?

A user ID is a unique identifier assigned to each team member in your workspace. It’s required for making API requests that interact with specific users, such as adding users to projects or managing user permissions.

Step-by-Step Instructions

1

Make the API request

Send a GET request to the List all team members API endpoint, including your API key in the request header.
2

Parse the response

The response will contain a team_members array with team member objects, each containing an id field.Example:
{
  "team_members": [
    {
      "id": "5a2de667-243b-4da3-b090-b698a03d98da",
      "email": "[email protected]",
      "first_name": "John",
      "last_name": "Doe",
      "time_zone": "UTC",
      "profile_image_url": null,
      "active": true,
      "organization_role": "admin"
    },
    {
      "id": "7b3ef778-354c-5eb4-c1a1-c8a9b14e09eb",
      "email": "[email protected]",
      "first_name": "Jane",
      "last_name": "Smith",
      "time_zone": "America/New_York",
      "profile_image_url": "https://example.com/profile.jpg",
      "active": true,
      "organization_role": "editor"
    }
  ],

  // ... rest of the details
}
3

Extract the user ID

Here the user ID for John Doe is: 5a2de667-243b-4da3-b090-b698a03d98da.You can access the user ID in your code from the response using:
// Get the first user's ID
const userId = response.team_members[0].id;

// Or iterate through all users to find a specific one
const johnUser = response.team_members.find(user => user.first_name === "John" && user.last_name === "Doe");
const johnUserId = johnUser.id;