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

> Create a List. Affinity V2 Lists Post reference includes SDK V2 and CLI requests, input constraints, response fields, and Deepline cost.

Create a List.

<Info>
  Tool ID: `affinity_v2_lists_post`
</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_lists_post',
  {
    "name": "Example",
    "type": "company"
  },
);

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

### CLI

```bash theme={null}
deepline tools execute affinity_v2_lists_post --input '{
  "name": "Example",
  "type": "company"
}' --json
```

## Example response

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

```json theme={null}
{
  "data": {
    "id": 123,
    "name": "Example",
    "creatorId": 123,
    "ownerId": 123,
    "isPublic": true,
    "type": "company",
    "createdAt": "2026-01-15T12:00:00Z"
  }
}
```

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

## Input reference

Request body for creating a new List

| Name               | Type                                     | Required | Default | Details                                                                                                                                                                  |
| ------------------ | ---------------------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `payload.name`     | `string`                                 | Yes      | —       | The name of the List Minimum length: 1. Maximum length: 255.                                                                                                             |
| `payload.type`     | `"company" \| "opportunity" \| "person"` | Yes      | —       | The entity type for the List Allowed: `company`, `opportunity`, `person`.                                                                                                |
| `payload.isPublic` | `boolean`                                | No       | `false` | Whether the List is public. Public Lists are visible to all users in the organization. Creating a public List requires the "Share accessible Lists globally" permission. |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Request body for creating a new List",
    "properties": {
      "name": {
        "type": "string",
        "description": "The name of the List",
        "minLength": 1,
        "maxLength": 255
      },
      "type": {
        "type": "string",
        "description": "The entity type for the List",
        "enum": [
          "company",
          "opportunity",
          "person"
        ]
      },
      "isPublic": {
        "type": "boolean",
        "description": "Whether the List is public. Public Lists are visible to all users in the organization. Creating a public List requires the \"Share accessible Lists globally\" permission.",
        "default": false
      }
    },
    "required": [
      "name",
      "type"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name                    | Type                                     | Required | Default | Details                                                 |
| ----------------------- | ---------------------------------------- | -------- | ------- | ------------------------------------------------------- |
| `result.data`           | `object`                                 | Yes      | —       | —                                                       |
| `result.data.id`        | `integer`                                | Yes      | —       | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.name`      | `string`                                 | Yes      | —       | —                                                       |
| `result.data.creatorId` | `integer`                                | Yes      | —       | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.ownerId`   | `integer`                                | Yes      | —       | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.isPublic`  | `boolean`                                | Yes      | —       | —                                                       |
| `result.data.type`      | `"company" \| "opportunity" \| "person"` | Yes      | —       | Allowed: `company`, `opportunity`, `person`.            |
| `result.data.createdAt` | `string`                                 | Yes      | —       | Format: `date-time`.                                    |
| `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": 9007199254740991,
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "creatorId": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "format": "int64"
          },
          "ownerId": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "format": "int64"
          },
          "isPublic": {
            "type": "boolean"
          },
          "type": {
            "type": "string",
            "enum": [
              "company",
              "opportunity",
              "person"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "createdAt",
          "creatorId",
          "id",
          "isPublic",
          "name",
          "ownerId",
          "type"
        ],
        "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)
