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

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

## What is a Recipient ID?

A recipient ID is a unique identifier assigned to each recipient associated with a client in your workspace. It's required for making API requests that interact with specific recipients, such as updating recipient details or deleting recipients.

### Step-by-Step Instructions

<Steps>
  <Step title="Make the API request">
    Send a `GET` request to the [Get client details](/api-reference/clients/get) API endpoint, including your API key in the request header.
  </Step>

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

    Example:

    ```json theme={"system"}
    {
      "client": {
        "id": "a8b90a464cad12b48e45",
        "name": "Neeto Client Inc.",
        "status": "active",
        // ... rest of the details
      },
      "recipients": [
        {
          "id": "128c1dfc-b29f-4fda-9a05-8a90e197b81b",
          "name": "Tim Bradford",
          "email": "tim@example.com",
          "client_id": "a8b90a464cad12b48e45",
          "created_at": "2024-01-15T10:30:00Z",
          "updated_at": "2024-01-15T10:30:00Z"
        },
        {
          "id": "6be815a8-9a10-455c-95d9-b0b548664420",
          "name": "Jane Smith",
          "email": "jane@example.com",
          "client_id": "a8b90a464cad12b48e45",
          "created_at": "2024-01-16T09:15:00Z",
          "updated_at": "2024-01-16T09:15:00Z"
        }
      ]
    }
    ```
  </Step>

  <Step title="Extract the recipient ID">
    Here the recipient ID for `Tim Bradford` is: **128c1dfc-b29f-4fda-9a05-8a90e197b81b**.

    You can access the recipient ID in your code from the response using:

    <CodeGroup>
      ```javascript JavaScript theme={"system"}
      // Get the first recipient's ID
      const recipientId = response.recipients[0].id;

      // Or iterate through all recipients to find a specific one
      const timRecipient = response.recipients.find(recipient => recipient.name === "Tim Bradford");
      const timRecipientId = timRecipient.id;
      ```

      ```python Python theme={"system"}
      # Get the first recipient's ID
      recipient_id = response['recipients'][0]['id']

      # Or iterate through all recipients to find a specific one
      tim_recipient = next(recipient for recipient in response['recipients'] if recipient['name'] == "Tim Bradford")
      tim_recipient_id = tim_recipient['id']
      ```

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

      # Or find a specific recipient by name
      tim_recipient_id=$(echo "$response" | jq -r '.recipients[] | select(.name == "Tim Bradford") | .id')
      ```
    </CodeGroup>
  </Step>
</Steps>
