Skip to main content

What is a Project User ID?

A project user ID is a unique identifier assigned to each user’s association with a specific project. It’s required for making API requests that interact with specific project users, such as updating user roles or hourly rates within a project.

Step-by-Step Instructions

1

Make the API request

Send a GET request to the List project users API endpoint, including your API key in the request header.
2

Parse the response

The response will contain a project_users array with project user objects, each containing an id field.Example:
{
  "project_users": [
    {
      "id": "128c1dfc-b29f-4fda-9a05-8a90e197b81b",
      "user_id": "5a2de667-243b-4da3-b090-b698a03d98da",
      "role": "project_manager",
      "hourly_rate": 75.5,
      "name": "John Doe",
      "email": "[email protected]",
      "time_zone": "UTC"
    },
    {
      "id": "6be815a8-9a10-455c-95d9-b0b548664420",
      "user_id": "7b3ef778-354c-5eb4-c1a1-c8a9b14e09eb",
      "role": "developer",
      "hourly_rate": 60.0,
      "name": "Jane Smith",
      "email": "[email protected]",
      "time_zone": "America/New_York"
    }
  ]
}
3

Extract the project user ID

Here the project user ID for John Doe is: 128c1dfc-b29f-4fda-9a05-8a90e197b81b.You can access the project user ID in your code from the response using:
// Get the first project user's ID
const projectUserId = response.project_users[0].id;

// Or iterate through all project users to find a specific one
const johnProjectUser = response.project_users.find(user => user.name === "John Doe");
const johnProjectUserId = johnProjectUser.id;