addedOutput schema / anyOf
Added value: +[
+ {
+ "description": "Who the caller is — the answer ``GET /whoami`` gives.\n\n``user_id``/``email``/``name`` are ``None`` for shared-key\n(``HAIL_API_KEY``) callers: that key carries no human identity. An\nagent that wants to put the operator's address in ``Reply-To`` reads\n``email`` and skips the header when it is ``None``.",
+ "properties": {
+ "auth_kind": {
+ "description": "How the caller authenticated: 'apikey' (org API key), 'jwt' (logged-in user session), or 'shared' (the shared HAIL_API_KEY, which carries no human identity).",
+ "enum": [
+ "apikey",
+ "jwt",
+ "shared"
+ ],
+ "title": "Auth Kind",
+ "type": "string"
+ },
+ "email": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The authenticated user's email. Null for 'shared' callers.",
+ "title": "Email"
+ },
+ "name": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The authenticated user's display name. Null for 'shared' callers.",
+ "title": "Name"
+ },
+ "organization_id": {
+ "description": "Organization the caller belongs to.",
+ "format": "uuid",
+ "title": "Organization Id",
+ "type": "string"
+ },
+ "superadmin": {
+ "default": false,
+ "description": "True for a Hail staff console session acting on this organization.",
+ "title": "Superadmin",
+ "type": "boolean"
+ },
+ "user_id": {
+ "anyOf": [
+ {
+ "format": "uuid",
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The authenticated user's id. Null for 'shared' callers.",
+ "title": "User Id"
+ }
+ },
+ "required": [
+ "auth_kind",
+ "organization_id",
+ "user_id",
+ "email",
+ "name",
+ "superadmin"
+ ],
+ "title": "WhoamiResponse",
+ "type": "object"
+ },
+ {
+ "properties": {
+ "error": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "error"
+ ],
+ "type": "object"
+ }
+]