{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/clarify/json-schema/clarify-object-record-access-response-schema.json",
  "title": "ObjectRecordAccessResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clarify-recordaccess-api-openapi.yml#/components/schemas/ObjectRecordAccessResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "object-record-access"
          ],
          "description": "The resource type; matches the `object` path parameter."
        },
        "id": {
          "type": "string",
          "description": "The unique ID of the resource."
        },
        "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",
              "enum": [
                "user",
                "workspace",
                "group",
                "email",
                "public"
              ],
              "description": "Who the grant is for: `user` for a single workspace member, `workspace` for everyone in the workspace."
            },
            "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",
              "enum": [
                "view",
                "edit",
                "manage",
                "owner"
              ],
              "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)."
            },
            "source": {
              "type": "string",
              "enum": [
                "share",
                "field",
                "delegated_send"
              ],
              "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. Field grants follow the field and delegated-send grants follow the delegation; neither can be changed or revoked through this API. A user can hold a direct grant beside either one on the same record."
            },
            "_created_at": {
              "type": "string",
              "format": "date-time",
              "description": "When the grant was created."
            },
            "_created_by": {
              "type": [
                "string",
                "null"
              ],
              "description": "The unique ID of the user who created the grant."
            },
            "_updated_at": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time",
              "description": "When the grant was last updated."
            },
            "_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"
          ],
          "description": "Field values keyed by field name; available fields depend on the object’s schema."
        },
        "relationships": {
          "type": "object",
          "properties": {},
          "description": "Related resources keyed by relationship name, present when requested via `include`."
        }
      },
      "required": [
        "type",
        "id",
        "attributes"
      ],
      "description": "The resource."
    }
  },
  "required": [
    "data"
  ]
}