> ## 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 Grants Bulk

> Create record access grants in bulk. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Create record access grants in bulk.

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

## 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_grants_bulk',
  {
    "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_grants_bulk --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 static output schema lacks the details for a reliable example. Use `deepline describe clarify_create_grants_bulk --json` for the complete live contract.

## Input reference

Shares a single record with multiple users and/or the whole workspace in one request, up to 1000 grants per call. 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` | `array` | Yes | — | Minimum items: 1. Maximum items: 1000. |

<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 with multiple users and/or the whole workspace in one request, up to 1000 grants per call. 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": "array",
        "minItems": 1,
        "maxItems": 1000,
        "items": {
          "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` | `array` | Yes | — | — |
| `result.data.data[].type` | `"object-record-access"` | Yes | — | Allowed: `object-record-access`. |
| `result.data.data[].id` | `string` | Yes | — | — |
| `result.data.data[].attributes` | `object` | Yes | — | — |
| `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.meta` | `object` | Yes | — | — |
| `result.data.meta.viewerAccess` | `array` | Yes | — | — |
| `result.data.meta.viewerAccess[].kind` | `"public-link" \| "workspace-public" \| "legacy-delegate" \| "entity-wide-delegate"` | Yes | — | How the viewer reaches the record. `workspace-public` is deprecated and never returned. Allowed: `public-link`, `workspace-public`, `legacy-delegate`, `entity-wide-delegate`. |
| `result.data.meta.viewerAccess[].grantee_id` | `string \| null` | Yes | — | — |
| `result.data.meta.viewerAccess[].access_level` | `"view" \| "edit" \| "manage" \| "owner"` | Yes | — | Allowed: `view`, `edit`, `manage`, `owner`. |
| `result.data.meta.viewerAccess[].owners` | `array` | Yes | — | The record owners whose delegation grants this viewer access, each with the access level that owner granted. Empty for paths with no delegating owner, such as public-link sharing. |
| `result.data.meta.viewerAccess[].owners[].owner_id` | `string` | Yes | — | — |
| `result.data.meta.viewerAccess[].owners[].access_level` | `"view" \| "edit" \| "manage" \| "owner"` | Yes | — | Allowed: `view`, `edit`, `manage`, `owner`. |
| `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": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "object-record-access"
                  ]
                },
                "id": {
                  "type": "string"
                },
                "attributes": {
                  "type": "object",
                  "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
                }
              },
              "required": [
                "type",
                "id",
                "attributes"
              ],
              "additionalProperties": false
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "viewerAccess": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "description": "How the viewer reaches the record. `workspace-public` is deprecated and never returned.",
                      "enum": [
                        "public-link",
                        "workspace-public",
                        "legacy-delegate",
                        "entity-wide-delegate"
                      ]
                    },
                    "grantee_id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "access_level": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "view",
                        "edit",
                        "manage",
                        "owner"
                      ]
                    },
                    "owners": {
                      "type": "array",
                      "description": "The record owners whose delegation grants this viewer access, each with the access level that owner granted. Empty for paths with no delegating owner, such as public-link sharing.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "owner_id": {
                            "type": "string"
                          },
                          "access_level": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              "view",
                              "edit",
                              "manage",
                              "owner"
                            ]
                          }
                        },
                        "required": [
                          "owner_id",
                          "access_level"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "kind",
                    "grantee_id",
                    "access_level",
                    "owners"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "viewerAccess"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "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.