{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/clarifymedical/json-schema/clarifymedical-object-access-response-schema.json",
  "title": "ObjectAccessResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clarifymedical-objectaccess-api-openapi.yml#/components/schemas/ObjectAccessResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "object-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 access delegation."
            },
            "owner_id": {
              "type": "string",
              "description": "The ID of the user who granted access."
            },
            "delegate_id": {
              "type": "string",
              "description": "The ID of the user who receives access."
            },
            "entity": {
              "type": "string",
              "enum": [
                "meeting",
                "message"
              ],
              "description": "The object type this delegation applies to."
            },
            "_created_at": {
              "type": "string",
              "format": "date-time",
              "description": "When the delegation was created."
            },
            "_created_by": {
              "type": [
                "string",
                "null"
              ],
              "description": "The ID of the user who created the delegation, or null if unknown."
            },
            "_updated_at": {
              "type": [
                "string",
                "null"
              ],
              "format": "date-time",
              "description": "When the delegation was last updated, or null if it has never been updated."
            },
            "_updated_by": {
              "type": [
                "string",
                "null"
              ],
              "description": "The ID of the user who last updated the delegation, or null if it has never been updated."
            }
          },
          "required": [
            "_id",
            "owner_id",
            "delegate_id",
            "entity",
            "_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"
  ]
}