{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/clarify/json-schema/clarify-create-bulk-object-record-access-request-dto-schema.json",
  "title": "CreateBulkObjectRecordAccessRequestDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clarify-recordaccess-api-openapi.yml#/components/schemas/CreateBulkObjectRecordAccessRequestDto",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "object-record-access"
            ]
          },
          "attributes": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "grantee_type": {
                    "type": "string",
                    "enum": [
                      "user"
                    ],
                    "description": "Share the record with a single workspace member."
                  },
                  "grantee_id": {
                    "type": "string",
                    "description": "The unique ID of the user to share the record with."
                  },
                  "access_level": {
                    "type": "string",
                    "enum": [
                      "view",
                      "edit"
                    ],
                    "description": "The level of access to grant: `view` for read-only access, `edit` for read-write access."
                  },
                  "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"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "grantee_type": {
                    "type": "string",
                    "enum": [
                      "workspace"
                    ],
                    "description": "Share the record with everyone in the workspace."
                  },
                  "grantee_id": {
                    "type": "null",
                    "description": "Must be `null` for a workspace-wide grant."
                  },
                  "access_level": {
                    "type": "string",
                    "enum": [
                      "view",
                      "edit"
                    ],
                    "description": "The level of access to grant: `view` for read-only access, `edit` for read-write access."
                  },
                  "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"
                ]
              }
            ]
          }
        },
        "required": [
          "type",
          "attributes"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 1000
    }
  },
  "required": [
    "data"
  ]
}