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

# Clarify: Create Record

> Create a Clarify CRM record or upsert a contact by a unique field such as email address. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Create a Clarify CRM record or upsert a contact by a unique field such as email address.

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

## 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(
  'clarify_create_record',
  {
    "workspace": "example",
    "object": "example",
    "data": {
      "type": "example",
      "attributes": {}
    }
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run clarify_create_record --input '{
  "workspace": "example",
  "object": "example",
  "data": {
    "type": "example",
    "attributes": {}
  }
}'
```

## 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"]}}
{
  "data": {
    "data": {
      "type": "example",
      "id": "id_123",
      "attributes": {}
    }
  }
}
```

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

## Input reference

Creates a record of the given object type. Pass `match_on` with the name of a unique field to upsert: when an incoming value matches exactly one existing record, that record is updated instead of a new one being created.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.workspace` | `string` | Yes | — | The workspace slug — the `&#123;slug&#125;` segment of your Clarify workspace URL. |
| `payload.object` | `string` | Yes | — | The object type: a built-in entity (`person`, `company`, `deal`, …) or a custom object (`c_*`). |
| `payload.silent` | `boolean` | No | — | When true, suppresses in-app and Slack notifications for this mutation. |
| `payload.data` | `object` | Yes | — | The resource to create. |
| `payload.match_on` | `string` | No | — | Enables upsert mode: the name of a unique field (marked unique in the schema, e.g. "domains" for companies, "email\_addresses" for people) to match incoming records against existing ones. When a value matches exactly one existing record, the attributes are merged into it and its ID is returned instead of inserting a new row. A value that matches multiple existing records errors. Scalar unique fields match exactly. collection fields match case-insensitively. Non-unique fields are rejected. Minimum See the live schema for the complete constraint. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Creates a record of the given object type. Pass `match_on` with the name of a unique field to upsert: when an incoming value matches exactly one existing record, that record is updated instead of a new one being created.",
    "properties": {
      "workspace": {
        "type": "string",
        "description": "The workspace slug — the `{slug}` segment of your Clarify workspace URL."
      },
      "object": {
        "type": "string",
        "description": "The object type: a built-in entity (`person`, `company`, `deal`, …) or a custom object (`c_*`)."
      },
      "silent": {
        "type": "boolean",
        "description": "When true, suppresses in-app and Slack notifications for this mutation."
      },
      "data": {
        "type": "object",
        "description": "The resource to create.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The resource type; matches the `object` path parameter."
          },
          "attributes": {
            "type": "object",
            "description": "Field values keyed by field name; available fields depend on the object’s schema. System fields (prefixed with a single `_`) cannot be set.",
            "properties": {},
            "additionalProperties": true
          }
        },
        "required": [
          "type",
          "attributes"
        ],
        "additionalProperties": false
      },
      "match_on": {
        "type": "string",
        "description": "Enables upsert mode: the name of a unique field (marked unique in the schema, e.g. \"domains\" for companies, \"email_addresses\" for people) to match incoming records against existing ones. When a value matches exactly one existing record, the attributes are merged into it and its ID is returned instead of inserting a new row; a value that matches multiple existing records errors. Scalar unique fields match exactly; collection fields match case-insensitively. Non-unique fields are rejected.",
        "minLength": 1
      }
    },
    "required": [
      "workspace",
      "object",
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.data` | `object` | Yes | — | The resource. |
| `result.data.data.type` | `string` | Yes | — | The resource type, e.g. `person` or `deal`. |
| `result.data.data.id` | `string` | Yes | — | The unique ID of the resource. |
| `result.data.data.attributes` | `record` | Yes | — | Field values keyed by field name. available fields depend on the object’s schema. |
| `result.data.data.relationships` | `record` | No | — | Related resources keyed by relationship name, present when requested via `include`. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

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

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "data": {
            "type": "object",
            "description": "The resource.",
            "properties": {
              "type": {
                "type": "string",
                "description": "The resource type, e.g. `person` or `deal`."
              },
              "id": {
                "type": "string",
                "description": "The unique ID of the resource."
              },
              "attributes": {
                "type": "object",
                "description": "Field values keyed by field name; available fields depend on the object’s schema.",
                "additionalProperties": {}
              },
              "relationships": {
                "type": "object",
                "description": "Related resources keyed by relationship name, present when requested via `include`.",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "description": "A single resource reference, an array of references, or `null` when the relationship is empty.",
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "description": "The type of the referenced resource."
                            },
                            "id": {
                              "type": "string",
                              "description": "The unique ID of the referenced resource."
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "description": "The type of the referenced resource."
                              },
                              "id": {
                                "type": "string",
                                "description": "The unique ID of the referenced resource."
                              }
                            },
                            "required": [
                              "type",
                              "id"
                            ],
                            "additionalProperties": false
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "description": "Metadata about the relationship.",
                      "properties": {
                        "count": {
                          "type": "integer",
                          "description": "Total number of related records for a to-many relationship, independent of the number embedded in `data` (which is capped).",
                          "minimum": 0
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "type",
              "id",
              "attributes"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "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

* [Connect integrations](https://deepline.com/docs/integrations.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.