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

> Create a record access grant. Includes SDK V2 and CLI requests, input constraints, response fields, and Deepline credit cost.

Create a record access grant.

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

## 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_grant',
  {
    "workspace": "example",
    "object": "example",
    "id": "id_123",
    "data": {
      "type": "object-record-access",
      "attributes": {
        "grantee_type": "user",
        "grantee_id": "grantee_123",
        "access_level": "view"
      }
    }
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run clarify_create_grant --input '{
  "workspace": "example",
  "object": "example",
  "id": "id_123",
  "data": {
    "type": "object-record-access",
    "attributes": {
      "grantee_type": "user",
      "grantee_id": "grantee_123",
      "access_level": "view"
    }
  }
}'
```

## 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": "object-record-access",
      "id": "id_123",
      "attributes": {
        "_id": "_123",
        "object_id": "object_123",
        "grantee_type": "user",
        "grantee_id": "grantee_123",
        "access_level": "view",
        "source": "share",
        "_created_at": "2026-01-15T12:00:00Z",
        "_created_by": "example",
        "_updated_at": "2026-01-15T12:00:00Z",
        "_updated_by": "2026-01-15T12:00:00Z"
      }
    }
  }
}
```

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

## Input reference

Shares a single record — a record entity (`deal`, `company`, `person`, or a custom object) or a `list`, `meeting`, or `message` — with a user or the whole workspace at a given access level. Only the record’s owner or a workspace permission admin (records and lists), the record’s owner (messages), a participant (meetings), or the assignee or creator (tasks) can create grants. Requires a user-backed API key. workspace-actor API keys are not supported.

| 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 shareable object the record belongs to: a record entity (`deal`, `company`, `person`, `task`, a custom object) or `list` / `meeting` / `message`. |
| `payload.id` | `string` | Yes | — | The unique ID of the shared record. |
| `payload.silent` | `boolean` | No | — | When true, suppresses in-app and Slack notifications for this mutation. |
| `payload.data` | `object` | Yes | — | — |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Shares a single record — a record entity (`deal`, `company`, `person`, or a custom object) or a `list`, `meeting`, or `message` — with a user or the whole workspace at a given access level. Only the record’s owner or a workspace permission admin (records and lists), the record’s owner (messages), a participant (meetings), or the assignee or creator (tasks) can create grants. Requires a user-backed API key; workspace-actor API keys are not supported.",
    "properties": {
      "workspace": {
        "type": "string",
        "description": "The workspace slug — the `{slug}` segment of your Clarify workspace URL."
      },
      "object": {
        "type": "string",
        "description": "The shareable object the record belongs to: a record entity (`deal`, `company`, `person`, `task`, a custom object) or `list` / `meeting` / `message`."
      },
      "id": {
        "type": "string",
        "description": "The unique ID of the shared record."
      },
      "silent": {
        "type": "boolean",
        "description": "When true, suppresses in-app and Slack notifications for this mutation."
      },
      "data": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "object-record-access"
            ]
          },
          "attributes": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "grantee_type": {
                    "type": "string",
                    "description": "Share the record with a single workspace member.",
                    "enum": [
                      "user"
                    ]
                  },
                  "grantee_id": {
                    "type": "string",
                    "description": "The unique ID of the user to share the record with."
                  },
                  "access_level": {
                    "type": "string",
                    "description": "The level of access to grant: `view` for read-only access, `edit` for read-write access.",
                    "enum": [
                      "view",
                      "edit"
                    ]
                  },
                  "notify": {
                    "type": "boolean",
                    "description": "Whether to notify the grantee that the record was shared with them. Defaults to `true`. Ignored for `workspace` grants, which never notify."
                  }
                },
                "required": [
                  "grantee_type",
                  "grantee_id",
                  "access_level"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "grantee_type": {
                    "type": "string",
                    "description": "Share the record with everyone in the workspace.",
                    "enum": [
                      "workspace"
                    ]
                  },
                  "grantee_id": {
                    "type": "null",
                    "description": "Must be `null` for a workspace-wide grant."
                  },
                  "access_level": {
                    "type": "string",
                    "description": "The level of access to grant: `view` for read-only access, `edit` for read-write access.",
                    "enum": [
                      "view",
                      "edit"
                    ]
                  },
                  "notify": {
                    "type": "boolean",
                    "description": "Whether to notify the grantee that the record was shared with them. Defaults to `true`. Ignored for `workspace` grants, which never notify."
                  }
                },
                "required": [
                  "grantee_type",
                  "grantee_id",
                  "access_level"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "type",
          "attributes"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "workspace",
      "object",
      "id",
      "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` | `"object-record-access"` | Yes | — | The resource type. matches the `object` path parameter. Allowed: `object-record-access`. |
| `result.data.data.id` | `string` | Yes | — | The unique ID of the resource. |
| `result.data.data.attributes` | `object` | Yes | — | Field values keyed by field name. available fields depend on the object’s schema. |
| `result.data.data.attributes._id` | `string` | Yes | — | The unique ID of the grant. |
| `result.data.data.attributes.object_id` | `string` | Yes | — | The unique ID of the shared record. |
| `result.data.data.attributes.grantee_type` | `"user" \| "workspace" \| "group" \| "email" \| "public"` | Yes | — | Who the grant is for: `user` for a single workspace member, `workspace` for everyone in the workspace. Allowed: `user`, `workspace`, `group`, `email`, `public`. |
| `result.data.data.attributes.grantee_id` | `string \| null` | Yes | — | The unique ID of the grantee. Set to the user’s ID for `user` grants. `null` for `workspace` grants. |
| `result.data.data.attributes.access_level` | `"view" \| "edit" \| "manage" \| "owner"` | Yes | — | The level of access the grant confers: `view` read-only, `edit` read-write. `owner` marks the record’s owner — returned read-only to identify the owner. It cannot be granted, changed, or revoked through this API (use the reassign-owner endpoint). Allowed: `view`, `edit`, `manage`, `owner`. |
| `result.data.data.attributes.source` | `"share" \| "field" \| "delegated_send" \| "account_read"` | Yes | — | Why the grant exists: `share` for a direct grant, `field` for a grant from a user field on the record, such as a deal’s owner, `delegated_send` for an email a delegate sent from the owner’s account, or a reply in a thread they started, `account_read` for a message from a connected account its owner shares with the user. Field grants follow the field, and delegated-send and account-read grants follow their delegation. none can be changed or revoked through this API. A user can hold a direct grant See the live schema for the complete constraint. |
| `result.data.data.attributes._created_at` | `string` | Yes | — | When the grant was created. Format: `date-time`. |
| `result.data.data.attributes._created_by` | `string \| null` | Yes | — | The unique ID of the user who created the grant. |
| `result.data.data.attributes._updated_at` | `string \| null` | Yes | — | When the grant was last updated. Format: `date-time`. |
| `result.data.data.attributes._updated_by` | `string \| null` | Yes | — | The unique ID of the user who last updated the grant. |
| `result.data.data.relationships` | `object` | 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; matches the `object` path parameter.",
                "enum": [
                  "object-record-access"
                ]
              },
              "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.",
                "properties": {
                  "_id": {
                    "type": "string",
                    "description": "The unique ID of the grant."
                  },
                  "object_id": {
                    "type": "string",
                    "description": "The unique ID of the shared record."
                  },
                  "grantee_type": {
                    "type": "string",
                    "description": "Who the grant is for: `user` for a single workspace member, `workspace` for everyone in the workspace.",
                    "enum": [
                      "user",
                      "workspace",
                      "group",
                      "email",
                      "public"
                    ]
                  },
                  "grantee_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The unique ID of the grantee. Set to the user’s ID for `user` grants; `null` for `workspace` grants."
                  },
                  "access_level": {
                    "type": "string",
                    "description": "The level of access the grant confers: `view` read-only, `edit` read-write. `owner` marks the record’s owner — returned read-only to identify the owner; it cannot be granted, changed, or revoked through this API (use the reassign-owner endpoint).",
                    "enum": [
                      "view",
                      "edit",
                      "manage",
                      "owner"
                    ]
                  },
                  "source": {
                    "type": "string",
                    "description": "Why the grant exists: `share` for a direct grant, `field` for a grant from a user field on the record, such as a deal’s owner, `delegated_send` for an email a delegate sent from the owner’s account, or a reply in a thread they started, `account_read` for a message from a connected account its owner shares with the user. Field grants follow the field, and delegated-send and account-read grants follow their delegation; none can be changed or revoked through this API. A user can hold a direct grant beside any of them on the same record.",
                    "enum": [
                      "share",
                      "field",
                      "delegated_send",
                      "account_read"
                    ]
                  },
                  "_created_at": {
                    "type": "string",
                    "description": "When the grant was created.",
                    "format": "date-time"
                  },
                  "_created_by": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The unique ID of the user who created the grant."
                  },
                  "_updated_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "When the grant was last updated.",
                    "format": "date-time"
                  },
                  "_updated_by": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The unique ID of the user who last updated the grant."
                  }
                },
                "required": [
                  "_id",
                  "object_id",
                  "grantee_type",
                  "grantee_id",
                  "access_level",
                  "source",
                  "_created_at",
                  "_created_by",
                  "_updated_at",
                  "_updated_by"
                ],
                "additionalProperties": false
              },
              "relationships": {
                "type": "object",
                "description": "Related resources keyed by relationship name, present when requested via `include`.",
                "properties": {},
                "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.