{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/observeinc/json-schema/observeinc-service-account-create-request-schema.json",
  "title": "ServiceAccountCreateRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/observeinc-service-accounts-api-openapi.yml#/components/schemas/ServiceAccount-CreateRequest",
  "type": "object",
  "required": [
    "label"
  ],
  "properties": {
    "label": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "externalOAuth": {
      "description": "The external OAuth binding to create for this service account.",
      "$ref": "#/$defs/ServiceAccount-ExternalOAuth"
    }
  },
  "$defs": {
    "OAuthExternalIntegrationRef": {
      "title": "OAuthExternalIntegrationRef",
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/ObjectId"
        }
      }
    },
    "ObjectId": {
      "type": "string",
      "format": "ObjectId"
    },
    "ServiceAccount-ExternalOAuth": {
      "title": "ServiceAccountExternalOAuth",
      "type": "object",
      "required": [
        "integration",
        "subject"
      ],
      "properties": {
        "integration": {
          "$ref": "#/$defs/OAuthExternalIntegrationRef"
        },
        "subject": {
          "type": "string",
          "description": "The external identity subject (JWT sub/oid claim) this service account is bound to."
        }
      }
    }
  }
}