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

# Affinity: V2 Users User ID Get

> Get a single User. Affinity V2 Users User Id Get reference includes SDK V2 and CLI requests, input constraints, response fields, and Deepline cost.

Get a single User.

<Info>
  Tool ID: `affinity_v2_users_user_id_get`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

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

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

### CLI

```bash theme={null}
deepline tools execute affinity_v2_users_user_id_get --input '{
  "userId": 123
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "id": 123,
    "firstName": "Jane",
    "lastName": "Doe",
    "primaryEmailAddress": "jane.doe@example.com",
    "photoUrl": "https://example.com",
    "status": "active"
  }
}
```

Use `deepline tools get affinity_v2_users_user_id_get --json` for the latest machine-readable contract.

## Input reference

\| ⚠️ This endpoint is currently in BETA | |--| Returns information about a single internal User, including name, primary email address, all email addresses, photo URL, account status, and account role. The `userId` path parameter is the same identifier as the User's corresponding Person ID — every internal User has a matching Person record, and they share the same numeric ID. You can use a Person ID returned from any Persons endpoint here, and vice versa. The `emailAddresses` and `role` properties are only returned to callers with the "Manage Users" [permission](/docs/pages/external-api-v2/permissions).

| Name             | Type      | Required | Default | Details                                                   |
| ---------------- | --------- | -------- | ------- | --------------------------------------------------------- |
| `payload.userId` | `integer` | Yes      | —       | User ID Format: `int32`. Minimum: 1. Maximum: 2147483647. |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "| ⚠️ This endpoint is currently in BETA | |--| Returns information about a single internal User, including name, primary email address, all email addresses, photo URL, account status, and account role. The `userId` path parameter is the same identifier as the User's corresponding Person ID — every internal User has a matching Person record, and they share the same numeric ID. You can use a Person ID returned from any Persons endpoint here, and vice versa. The `emailAddresses` and `role` properties are only returned to callers with the \"Manage Users\" [permission](/pages/external-api-v2/permissions).",
    "properties": {
      "userId": {
        "type": "integer",
        "description": "User ID",
        "minimum": 1,
        "maximum": 2147483647,
        "format": "int32"
      }
    },
    "required": [
      "userId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name                              | Type                                     | Required | Default | Details                                           |
| --------------------------------- | ---------------------------------------- | -------- | ------- | ------------------------------------------------- |
| `result.data`                     | `object`                                 | Yes      | —       | —                                                 |
| `result.data.id`                  | `integer`                                | Yes      | —       | Format: `int32`. Minimum: 1. Maximum: 2147483647. |
| `result.data.firstName`           | `string`                                 | Yes      | —       | —                                                 |
| `result.data.lastName`            | `string \| null`                         | Yes      | —       | —                                                 |
| `result.data.primaryEmailAddress` | `string \| null`                         | Yes      | —       | Format: `email`.                                  |
| `result.data.emailAddresses`      | `array`                                  | No       | —       | Maximum items: 100.                               |
| `result.data.photoUrl`            | `string \| null`                         | Yes      | —       | Format: `uri`.                                    |
| `result.data.status`              | `"active" \| "invited" \| "deactivated"` | Yes      | —       | Allowed: `active`, `invited`, `deactivated`.      |
| `result.data.role`                | `string`                                 | No       | —       | —                                                 |
| `result.meta`                     | `object`                                 | No       | —       | —                                                 |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "data": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647,
            "format": "int32"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": [
              "string",
              "null"
            ]
          },
          "primaryEmailAddress": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "emailAddresses": {
            "type": "array",
            "maxItems": 100,
            "items": {
              "type": "string",
              "format": "email"
            }
          },
          "photoUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "invited",
              "deactivated"
            ]
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "firstName",
          "lastName",
          "primaryEmailAddress",
          "photoUrl",
          "status"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</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

* [Affinity provider guide](/docs/providers/affinity/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
