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

# HeyReach: Get User By ID

> Getting user details and permissions by user id in HeyReach. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Getting user details and permissions by user id in HeyReach.

> [!NOTE]
>
> Tool ID: `heyreach_get_user_by_id`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'heyreach_get_user_by_id',
  {
    "user_id": 123
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute heyreach_get_user_by_id --input '{
  "user_id": 123
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "status": "example",
  "result": {
    "userDetails": {
      "userId": 123,
      "name": "Example",
      "surname": "example",
      "email": "jane.doe@example.com",
      "roles": [
        "example"
      ]
    },
    "organizationPermissions": {
      "userDeactivate": true,
      "manageWorkspace": true,
      "manageWorkspaceMembers": true,
      "viewBilling": true,
      "manageBlling": true,
      "manageBillingDetails": true,
      "accessBillingInvoiceHistoy": true
    },
    "workspacesPermissions": [
      {
        "workspaceName": "Example",
        "workspaceId": 123,
        "permissions": {
          "viewLinkedInSenders": true,
          "manageLinkedInSendersSettings": true,
          "viewLeadLists": true,
          "importEditManageLeadLists": true,
          "viewMyNetwork": true,
          "viewCampaigns": true,
          "editManageCampaigns": true,
          "viewLinkedInSenderInboxes": true,
          "replyFromLinkedInSenderInboxes": true,
          "viewIntegrations": true,
          "manageIntegrations": true,
          "exportDataToCRMs": true,
          "viewNotifications": true,
          "manageNotifications": true
        }
      }
    ]
  }
}
```

Use `deepline describe heyreach_get_user_by_id --json` for the latest machine-readable contract.

## Input reference

HeyReach user ID input.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.user_id` | `integer \| string` | Yes | — | Numeric id as integer or numeric string. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "HeyReach user ID input.",
    "properties": {
      "user_id": {
        "description": "Numeric id as integer or numeric string.",
        "anyOf": [
          {
            "type": "integer",
            "minimum": 1
          },
          {
            "type": "string",
            "minLength": 1,
            "pattern": "^\\d+$"
          }
        ]
      }
    },
    "required": [
      "user_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.status` | `string` | Yes | — | — |
| `result.result` | `object` | Yes | — | — |
| `result.result.userDetails` | `object` | Yes | — | — |
| `result.result.userDetails.userId` | `integer` | Yes | — | — |
| `result.result.userDetails.name` | `string` | Yes | — | — |
| `result.result.userDetails.surname` | `string` | Yes | — | — |
| `result.result.userDetails.email` | `string` | Yes | — | — |
| `result.result.userDetails.roles` | `array` | Yes | — | — |
| `result.result.organizationPermissions` | `object` | Yes | — | — |
| `result.result.organizationPermissions.userDeactivate` | `boolean` | Yes | — | — |
| `result.result.organizationPermissions.manageWorkspace` | `boolean` | Yes | — | — |
| `result.result.organizationPermissions.manageWorkspaceMembers` | `boolean` | Yes | — | — |
| `result.result.organizationPermissions.viewBilling` | `boolean` | Yes | — | — |
| `result.result.organizationPermissions.manageBlling` | `boolean` | Yes | — | — |
| `result.result.organizationPermissions.manageBillingDetails` | `boolean` | Yes | — | — |
| `result.result.organizationPermissions.accessBillingInvoiceHistoy` | `boolean` | Yes | — | — |
| `result.result.workspacesPermissions` | `array` | Yes | — | — |
| `result.result.workspacesPermissions[].workspaceName` | `string` | Yes | — | — |
| `result.result.workspacesPermissions[].workspaceId` | `integer` | Yes | — | — |
| `result.result.workspacesPermissions[].permissions` | `object` | Yes | — | — |
| `result.result.workspacesPermissions[].permissions.viewLinkedInSenders` | `boolean` | Yes | — | — |
| `result.result.workspacesPermissions[].permissions.manageLinkedInSendersSettings` | `boolean` | Yes | — | — |
| `result.result.workspacesPermissions[].permissions.viewLeadLists` | `boolean` | Yes | — | — |
| `result.result.workspacesPermissions[].permissions.importEditManageLeadLists` | `boolean` | Yes | — | — |
| `result.result.workspacesPermissions[].permissions.viewMyNetwork` | `boolean` | Yes | — | — |
| `result.result.workspacesPermissions[].permissions.viewCampaigns` | `boolean` | Yes | — | — |
| `result.result.workspacesPermissions[].permissions.editManageCampaigns` | `boolean` | Yes | — | — |
| `result.result.workspacesPermissions[].permissions.viewLinkedInSenderInboxes` | `boolean` | Yes | — | — |
| `result.result.workspacesPermissions[].permissions.replyFromLinkedInSenderInboxes` | `boolean` | Yes | — | — |
| `result.result.workspacesPermissions[].permissions.viewIntegrations` | `boolean` | Yes | — | — |
| `result.result.workspacesPermissions[].permissions.manageIntegrations` | `boolean` | Yes | — | — |
| `result.result.workspacesPermissions[].permissions.exportDataToCRMs` | `boolean` | Yes | — | — |
| `result.result.workspacesPermissions[].permissions.viewNotifications` | `boolean` | Yes | — | — |
| `result.result.workspacesPermissions[].permissions.manageNotifications` | `boolean` | Yes | — | — |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "properties": {
      "status": {
        "type": "string"
      },
      "result": {
        "type": "object",
        "properties": {
          "userDetails": {
            "type": "object",
            "properties": {
              "userId": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              },
              "surname": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "roles": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "userId",
              "name",
              "surname",
              "email",
              "roles"
            ],
            "additionalProperties": true
          },
          "organizationPermissions": {
            "type": "object",
            "properties": {
              "userDeactivate": {
                "type": "boolean"
              },
              "manageWorkspace": {
                "type": "boolean"
              },
              "manageWorkspaceMembers": {
                "type": "boolean"
              },
              "viewBilling": {
                "type": "boolean"
              },
              "manageBlling": {
                "type": "boolean"
              },
              "manageBillingDetails": {
                "type": "boolean"
              },
              "accessBillingInvoiceHistoy": {
                "type": "boolean"
              }
            },
            "required": [
              "userDeactivate",
              "manageWorkspace",
              "manageWorkspaceMembers",
              "viewBilling",
              "manageBlling",
              "manageBillingDetails",
              "accessBillingInvoiceHistoy"
            ],
            "additionalProperties": true
          },
          "workspacesPermissions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "workspaceName": {
                  "type": "string"
                },
                "workspaceId": {
                  "type": "integer"
                },
                "permissions": {
                  "type": "object",
                  "properties": {
                    "viewLinkedInSenders": {
                      "type": "boolean"
                    },
                    "manageLinkedInSendersSettings": {
                      "type": "boolean"
                    },
                    "viewLeadLists": {
                      "type": "boolean"
                    },
                    "importEditManageLeadLists": {
                      "type": "boolean"
                    },
                    "viewMyNetwork": {
                      "type": "boolean"
                    },
                    "viewCampaigns": {
                      "type": "boolean"
                    },
                    "editManageCampaigns": {
                      "type": "boolean"
                    },
                    "viewLinkedInSenderInboxes": {
                      "type": "boolean"
                    },
                    "replyFromLinkedInSenderInboxes": {
                      "type": "boolean"
                    },
                    "viewIntegrations": {
                      "type": "boolean"
                    },
                    "manageIntegrations": {
                      "type": "boolean"
                    },
                    "exportDataToCRMs": {
                      "type": "boolean"
                    },
                    "viewNotifications": {
                      "type": "boolean"
                    },
                    "manageNotifications": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "viewLinkedInSenders",
                    "manageLinkedInSendersSettings",
                    "viewLeadLists",
                    "importEditManageLeadLists",
                    "viewMyNetwork",
                    "viewCampaigns",
                    "editManageCampaigns",
                    "viewLinkedInSenderInboxes",
                    "replyFromLinkedInSenderInboxes",
                    "viewIntegrations",
                    "manageIntegrations",
                    "exportDataToCRMs",
                    "viewNotifications",
                    "manageNotifications"
                  ],
                  "additionalProperties": true
                }
              },
              "required": [
                "workspaceName",
                "workspaceId",
                "permissions"
              ],
              "additionalProperties": true
            }
          }
        },
        "required": [
          "userDetails",
          "organizationPermissions",
          "workspacesPermissions"
        ],
        "additionalProperties": true
      }
    },
    "required": [
      "status",
      "result"
    ],
    "additionalProperties": true
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [HeyReach provider guide](https://deepline.com/docs/providers/heyreach/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.