{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/france-identite/json-schema/france-identite-credential-schema.json",
  "title": "Credential",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/france-identite-organisation-openapi.yml#/components/schemas/Credential",
  "type": "object",
  "required": [
    "principal",
    "operator",
    "organisations"
  ],
  "properties": {
    "principal": {
      "type": "object",
      "required": [
        "kind"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "anonymous",
            "member",
            "operator"
          ],
          "description": "`member` for an API key or a partner; `anonymous` without a valid credential."
        },
        "sub": {
          "type": "string",
          "description": "For an API key, `api-key:` and its identifier."
        },
        "label": {
          "type": "string",
          "description": "As the journal names what it does."
        },
        "groups": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "operator": {
      "type": "boolean"
    },
    "organisations": {
      "type": [
        "array",
        "null"
      ],
      "description": "The register identifiers of the organisations you may act for. `null` for the operator, who acts for any.",
      "items": {
        "type": "string"
      }
    },
    "canCreateOrganisation": {
      "type": "boolean",
      "description": "Always `false` with an API key."
    }
  }
}