> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.neetoinvoice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting the Project User ID

> Understand how to retrieve project user IDs for use in your API calls.

## 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

<Steps>
  <Step title="Make the API request">
    Send a `GET` request to the [List project users](/api-reference/project-users/list) API endpoint, including your API key in the request header.
  </Step>

  <Step title="Parse the response">
    The response will contain a `project_users` array with project user objects, each containing an `id` field.

    Example:

    ```json theme={"system"}
    {
      "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": "john.doe@example.com",
          "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": "jane.smith@example.com",
          "time_zone": "America/New_York"
        }
      ]
    }
    ```
  </Step>

  <Step title="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:

    <CodeGroup>
      ```javascript JavaScript theme={"system"}
      // 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;
      ```

      ```python Python theme={"system"}
      # Get the first project user's ID
      project_user_id = response['project_users'][0]['id']

      # Or iterate through all project users to find a specific one
      john_project_user = next(user for user in response['project_users'] if user['name'] == "John Doe")
      john_project_user_id = john_project_user['id']
      ```

      ```bash Bash theme={"system"}
      # Extract project user ID using jq
      project_user_id=$(echo "$response" | jq -r '.project_users[0].id')

      # Or find a specific project user by name
      john_project_user_id=$(echo "$response" | jq -r '.project_users[] | select(.name == "John Doe") | .id')
      ```
    </CodeGroup>
  </Step>
</Steps>
