{"openapi": "3.1.0", "info": {"title": "AuthDuty API", "version": "1.0.0", "description": "Programmatic identity verification for your workforce.\n\n## Authentication\n\nAll endpoints require a **Bearer token** (API key). Generate one in\nyour [console settings](https://app.authduty.com/account/settings/api-keys/).\n\n```\nAuthorization: Bearer ad_live_xxxxxxxxxxxxxxxx\n```\n\n## Quick Start\n\n1. **Create a case** \u2014 `POST /v1/cases/` with the subject's email and verification methods.\n2. **Send the verification URL** \u2014 the response includes a unique URL for the subject.\n3. **Get notified** \u2014 set up a webhook endpoint to receive `case.closed` events when verification completes.\n\n## Webhooks\n\nEvery webhook delivery includes an HMAC-SHA256 signature in the `X-AuthDuty-Signature` header. Verify it using the signing secret returned when you create the endpoint.\n\nAvailable event types: `case.created`, `case.closed`, `case.failed`, `case.expired`, `verification.step_completed`, `ping`.\n\n## Rate Limits\n\n- **Read** endpoints: 120 requests/min per API key\n- **Write** endpoints: 30 requests/min per API key\n\nReturns `429 Too Many Requests` with a `Retry-After` header when exceeded."}, "paths": {"/v1/ping": {"get": {"operationId": "ping", "summary": "Ping", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PingSchema"}}}}}, "description": "Health check \u2014 no auth required."}}, "/v1/cases/": {"post": {"operationId": "createCase", "summary": "Create a verification case", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CaseResponseSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}}, "description": "Create a new identity verification case.\n\nQueues verification steps based on the methods you enable. The subject\nreceives a unique verification URL where they complete each step.\n\n**Side effects:** deducts from team allowance, auto-sends a\nverification email to the subject if email verification is enabled,\nnotifies the manager if manager verification is enabled. For SMS\nverification, the subject enters their phone number on the verification\npage unless ``subject_phone`` is provided, in which case the subject\nmust verify that exact number.\n\nSupports an `Idempotency-Key` header (max 64 chars, 24-hour window) to\nsafely retry requests without creating duplicate cases.", "tags": ["Cases"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CaseCreateSchema"}}}, "required": true}, "security": [{"APIKeyAuth": []}]}, "get": {"operationId": "listCases", "summary": "List verification cases", "parameters": [{"in": "query", "name": "status", "schema": {"anyOf": [{"enum": ["open", "closed", "failed", "expired"], "type": "string"}, {"type": "null"}], "description": "Filter by case status.", "title": "Status"}, "required": false, "description": "Filter by case status."}, {"in": "query", "name": "subject_email", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Filter by subject email", "title": "Subject Email"}, "required": false, "description": "Filter by subject email"}, {"in": "query", "name": "created_after", "schema": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "description": "Filter cases created after this datetime", "title": "Created After"}, "required": false, "description": "Filter cases created after this datetime"}, {"in": "query", "name": "created_before", "schema": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "description": "Filter cases created before this datetime", "title": "Created Before"}, "required": false, "description": "Filter cases created before this datetime"}, {"in": "query", "name": "page_size", "schema": {"anyOf": [{"maximum": 100, "minimum": 1, "type": "integer"}, {"type": "null"}], "description": "Number of results per page (1\u2013100, default 50).", "title": "Page Size"}, "required": false, "description": "Number of results per page (1\u2013100, default 50)."}, {"in": "query", "name": "cursor", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Opaque pagination cursor. Pass the value from the ``next`` or ``previous`` field of a prior response to traverse pages.", "title": "Cursor"}, "required": false, "description": "Opaque pagination cursor. Pass the value from the ``next`` or ``previous`` field of a prior response to traverse pages."}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PagedCaseResponseSchema"}}}}}, "description": "List verification cases for your team.\n\nReturns cases ordered by creation date (newest first), 50 per page.\nUse cursor-based pagination to traverse results.", "tags": ["Cases"], "security": [{"APIKeyAuth": []}]}}, "/v1/cases/{case_id}/": {"get": {"operationId": "getCase", "summary": "Get case detail", "parameters": [{"in": "path", "name": "case_id", "schema": {"title": "Case Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CaseResponseSchema"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}}, "description": "Retrieve a single verification case by ID.\n\nReturns the full case details including per-method verification status.", "tags": ["Cases"], "security": [{"APIKeyAuth": []}]}}, "/v1/account/": {"get": {"operationId": "getAccount", "summary": "Get team info", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TeamSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}}, "description": "Retrieve your team's account information.\n\nReturns the team name, plan, subscription status, and top-up balance.", "tags": ["Account"], "security": [{"APIKeyAuth": []}]}}, "/v1/account/usage/": {"get": {"operationId": "getUsage", "summary": "Get current period usage", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UsageSummarySchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}}, "description": "Retrieve usage statistics for the current billing period.\n\nReturns per-method usage counts, allowances, and top-up costs.", "tags": ["Account"], "security": [{"APIKeyAuth": []}]}}, "/v1/webhooks/endpoints/": {"post": {"operationId": "createWebhookEndpoint", "summary": "Create a webhook endpoint", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookEndpointResponseSchema"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}}, "description": "Create a webhook endpoint.\n\nRegisters a URL to receive event notifications. The signing secret is\nreturned **once** in the response \u2014 store it securely. Use it to verify\nthe `X-AuthDuty-Signature` header on incoming webhooks.\n\nMaximum 10 endpoints per team.", "tags": ["Webhooks"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookEndpointCreateSchema"}}}, "required": true}, "security": [{"APIKeyAuth": []}]}, "get": {"operationId": "listWebhookEndpoints", "summary": "List webhook endpoints", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/WebhookEndpointResponseSchema"}, "title": "Response", "type": "array"}}}}}, "description": "List all webhook endpoints for your team.", "tags": ["Webhooks"], "security": [{"APIKeyAuth": []}]}}, "/v1/webhooks/endpoints/{endpoint_id}/": {"get": {"operationId": "getWebhookEndpoint", "summary": "Get webhook endpoint detail", "parameters": [{"in": "path", "name": "endpoint_id", "schema": {"title": "Endpoint Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookEndpointResponseSchema"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}}, "description": "Retrieve a single webhook endpoint by ID.", "tags": ["Webhooks"], "security": [{"APIKeyAuth": []}]}, "patch": {"operationId": "updateWebhookEndpoint", "summary": "Update a webhook endpoint", "parameters": [{"in": "path", "name": "endpoint_id", "schema": {"title": "Endpoint Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookEndpointResponseSchema"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}}, "description": "Update a webhook endpoint.\n\nAll fields are optional \u2014 only provided fields are changed. Re-enabling\na disabled endpoint resets its failure count.", "tags": ["Webhooks"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookEndpointUpdateSchema"}}}, "required": true}, "security": [{"APIKeyAuth": []}]}, "delete": {"operationId": "deleteWebhookEndpoint", "summary": "Delete a webhook endpoint", "parameters": [{"in": "path", "name": "endpoint_id", "schema": {"title": "Endpoint Id", "type": "string"}, "required": true}], "responses": {"204": {"description": "No Content"}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}}, "description": "Delete a webhook endpoint and its pending deliveries.", "tags": ["Webhooks"], "security": [{"APIKeyAuth": []}]}}, "/v1/webhooks/endpoints/{endpoint_id}/rotate-secret/": {"post": {"operationId": "rotateWebhookSecret", "summary": "Rotate the signing secret for a webhook endpoint", "parameters": [{"in": "path", "name": "endpoint_id", "schema": {"title": "Endpoint Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookEndpointResponseSchema"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}}, "description": "Regenerate the signing secret for a webhook endpoint.\n\nThe new secret is returned in the response. Update your webhook\nhandler to use the new secret for signature verification.", "tags": ["Webhooks"], "security": [{"APIKeyAuth": []}]}}, "/v1/webhooks/endpoints/{endpoint_id}/test/": {"post": {"operationId": "testWebhookEndpoint", "summary": "Send a ping event to test the webhook endpoint", "parameters": [{"in": "path", "name": "endpoint_id", "schema": {"title": "Endpoint Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TestPingResponseSchema"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}}, "description": "Send a test ping event to a webhook endpoint.\n\nQueues a `ping` event delivery to verify connectivity. Check the\ndelivery log to see the result.", "tags": ["Webhooks"], "security": [{"APIKeyAuth": []}]}}, "/v1/webhooks/deliveries/": {"get": {"operationId": "listDeliveries", "summary": "List recent webhook deliveries", "parameters": [{"in": "query", "name": "endpoint_id", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Filter by endpoint ID", "title": "Endpoint Id"}, "required": false, "description": "Filter by endpoint ID"}, {"in": "query", "name": "status", "schema": {"anyOf": [{"enum": ["pending", "success", "failed", "dead_letter"], "type": "string"}, {"type": "null"}], "description": "Filter by delivery status.", "title": "Status"}, "required": false, "description": "Filter by delivery status."}, {"in": "query", "name": "event_type", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Filter by event type", "title": "Event Type"}, "required": false, "description": "Filter by event type"}, {"in": "query", "name": "page_size", "schema": {"anyOf": [{"maximum": 100, "minimum": 1, "type": "integer"}, {"type": "null"}], "description": "Number of results per page (1\u2013100, default 50).", "title": "Page Size"}, "required": false, "description": "Number of results per page (1\u2013100, default 50)."}, {"in": "query", "name": "cursor", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Opaque pagination cursor. Pass the value from the ``next`` or ``previous`` field of a prior response to traverse pages.", "title": "Cursor"}, "required": false, "description": "Opaque pagination cursor. Pass the value from the ``next`` or ``previous`` field of a prior response to traverse pages."}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PagedWebhookDeliverySchema"}}}}}, "description": "List webhook delivery attempts for your team.\n\nReturns deliveries ordered by creation date (newest first), 50 per page.\nFilter by endpoint, status, or event type.", "tags": ["Webhooks"], "security": [{"APIKeyAuth": []}]}}, "/v1/webhooks/deliveries/{delivery_id}/": {"get": {"operationId": "getDelivery", "summary": "Get webhook delivery detail", "parameters": [{"in": "path", "name": "delivery_id", "schema": {"title": "Delivery Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookDeliverySchema"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}}, "description": "Retrieve a single webhook delivery by ID.", "tags": ["Webhooks"], "security": [{"APIKeyAuth": []}]}}, "/v1/webhooks/deliveries/{delivery_id}/retry/": {"post": {"operationId": "retryDelivery", "summary": "Retry a failed or dead-lettered delivery", "parameters": [{"in": "path", "name": "delivery_id", "schema": {"title": "Delivery Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookDeliverySchema"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ErrorSchema"}}}}}, "description": "Retry a failed or dead-lettered webhook delivery.\n\nCreates a fresh delivery attempt for the same event and endpoint.\nThe original delivery record is left unchanged for audit purposes.\nOnly deliveries with status ``failed`` or ``dead_letter`` can be retried.", "tags": ["Webhooks"], "security": [{"APIKeyAuth": []}]}}}, "components": {"schemas": {"PingSchema": {"properties": {"status": {"description": "Health check status.", "examples": ["ok"], "title": "Status", "type": "string"}}, "required": ["status"], "title": "PingSchema", "type": "object"}, "CaseResponseSchema": {"properties": {"id": {"description": "Unique case identifier (UUID).", "format": "uuid", "title": "Id", "type": "string"}, "public_id": {"description": "Short public ID used in the verification URL.", "examples": ["a1b2c3d4"], "title": "Public Id", "type": "string"}, "status": {"description": "Case status.", "enum": ["open", "closed", "failed", "expired"], "examples": ["open"], "title": "Status", "type": "string"}, "subject_email": {"description": "Email of the person being verified.", "title": "Subject Email", "type": "string"}, "subject_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Subject's full name, populated after government ID verification completes. Null until then.", "title": "Subject Name"}, "created_at": {"description": "When the case was created.", "format": "date-time", "title": "Created At", "type": "string"}, "expires_at": {"description": "When the case expires (48 hours after creation).", "format": "date-time", "title": "Expires At", "type": "string"}, "is_expired": {"description": "Whether the 48-hour verification window has passed.", "title": "Is Expired", "type": "boolean"}, "verification_url": {"description": "URL to send to the subject for verification.", "examples": ["https://verify.authduty.com/a1b2c3d4"], "title": "Verification Url", "type": "string"}, "verification_methods": {"$ref": "#/components/schemas/VerificationMethodsResponseSchema", "description": "Per-method verification status."}, "subject_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Employer-provided phone number for SMS verification (only present when a phone was supplied at creation).", "title": "Subject Phone"}, "notes": {"description": "Internal notes. Always present, defaults to empty string when not set.", "title": "Notes", "type": "string"}}, "required": ["id", "public_id", "status", "subject_email", "created_at", "expires_at", "is_expired", "verification_url", "verification_methods", "notes"], "title": "CaseResponseSchema", "type": "object"}, "VerificationMethodsResponseSchema": {"properties": {"email": {"$ref": "#/components/schemas/VerificationStatusSchema", "description": "Email verification status."}, "sms": {"$ref": "#/components/schemas/VerificationStatusSchema", "description": "SMS OTP verification status."}, "government_id": {"$ref": "#/components/schemas/VerificationStatusSchema", "description": "Government-issued ID scan status."}, "selfie": {"$ref": "#/components/schemas/VerificationStatusSchema", "description": "Selfie match verification status. Automatically enabled when government_id is requested."}, "custom_question": {"$ref": "#/components/schemas/VerificationStatusSchema", "description": "Custom security question status."}, "manager": {"$ref": "#/components/schemas/VerificationStatusSchema", "description": "Manager attestation status."}}, "required": ["email", "sms", "government_id", "selfie", "custom_question", "manager"], "title": "VerificationMethodsResponseSchema", "type": "object"}, "VerificationStatusSchema": {"properties": {"requested": {"description": "Whether this verification step was requested.", "title": "Requested", "type": "boolean"}, "verified": {"description": "Whether this step has been completed successfully.", "title": "Verified", "type": "boolean"}}, "required": ["requested", "verified"], "title": "VerificationStatusSchema", "type": "object"}, "ErrorSchema": {"properties": {"error": {"description": "Machine-readable error type.", "examples": ["validation_error"], "title": "Error", "type": "string"}, "detail": {"description": "Human-readable error message.", "examples": ["Subject email is required."], "title": "Detail", "type": "string"}, "code": {"description": "Error code for programmatic handling.", "examples": ["VALIDATION_ERROR"], "title": "Code", "type": "string"}}, "required": ["error", "detail", "code"], "title": "ErrorSchema", "type": "object"}, "CaseCreateSchema": {"examples": [{"notes": "New hire starting March 25", "subject_email": "jane.doe@acme.com", "verification_methods": {"email": true, "government_id": true}}], "properties": {"subject_email": {"description": "Email address of the person to verify.", "examples": ["jane.doe@acme.com"], "format": "email", "title": "Subject Email", "type": "string"}, "notes": {"default": "", "description": "Internal notes visible only to your team.", "examples": ["New hire starting March 25"], "title": "Notes", "type": "string"}, "verification_methods": {"$ref": "#/components/schemas/VerificationMethodsSchema", "description": "Which verification steps to enable."}, "custom_question_text": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "The question to ask (required when custom_question is true).", "examples": ["What is your employee ID?"], "title": "Custom Question Text"}, "custom_question_answer": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Expected answer (required when custom_question is true).", "examples": ["EMP-4821"], "title": "Custom Question Answer"}, "manager_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Manager's full name (required when manager is true).", "examples": ["Priya Sharma"], "title": "Manager Name"}, "manager_email": {"anyOf": [{"format": "email", "type": "string"}, {"type": "null"}], "description": "Manager's email for attestation (required when manager is true).", "examples": ["mgr@acme.com"], "title": "Manager Email"}, "subject_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Phone number in E.164 format (e.g. +14155552671). When provided with sms=true, the subject must verify this exact number instead of providing their own.", "examples": ["+14155552671"], "title": "Subject Phone"}}, "required": ["subject_email", "verification_methods"], "title": "CaseCreateSchema", "type": "object"}, "VerificationMethodsSchema": {"description": "Verification methods to enable for the case.\n\nNote: Setting ``government_id=true`` automatically enables selfie\nverification.  Both are processed together via Stripe Identity and\nappear as separate statuses in the response.", "properties": {"email": {"default": false, "description": "Send a verification link to the subject's email address. The email is sent automatically when the case is created.", "title": "Email", "type": "boolean"}, "sms": {"default": false, "description": "Enable SMS OTP verification. By default, the subject enters their phone number on the verification page. To verify a specific number instead, also provide subject_phone on the request.", "title": "Sms", "type": "boolean"}, "government_id": {"default": false, "description": "Require a government-issued ID scan. Automatically includes selfie verification.", "title": "Government Id", "type": "boolean"}, "custom_question": {"default": false, "description": "Ask a custom security question. Requires custom_question_text and custom_question_answer.", "title": "Custom Question", "type": "boolean"}, "manager": {"default": false, "description": "Request manager attestation. Requires manager_name and manager_email.", "title": "Manager", "type": "boolean"}}, "title": "VerificationMethodsSchema", "type": "object"}, "PaginationInput": {"description": "Cursor-based pagination parameters.", "properties": {"page_size": {"anyOf": [{"maximum": 100, "minimum": 1, "type": "integer"}, {"type": "null"}], "description": "Number of results per page (1\u2013100, default 50).", "title": "Page Size"}, "cursor": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Opaque pagination cursor. Pass the value from the ``next`` or ``previous`` field of a prior response to traverse pages.", "title": "Cursor"}}, "title": "PaginationInput", "type": "object"}, "PagedCaseResponseSchema": {"properties": {"previous": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Previous"}, "next": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Next"}, "results": {"items": {"$ref": "#/components/schemas/CaseResponseSchema"}, "title": "Results", "type": "array"}}, "required": ["previous", "next", "results"], "title": "PagedCaseResponseSchema", "type": "object"}, "TeamSchema": {"properties": {"id": {"description": "Team identifier.", "format": "uuid", "title": "Id", "type": "string"}, "name": {"description": "Team name.", "examples": ["Acme Corp"], "title": "Name", "type": "string"}, "plan": {"description": "Current plan: trial, starter, pro, or enterprise.", "examples": ["starter"], "title": "Plan", "type": "string"}, "subscription_status": {"description": "Subscription status: trialing, active, past_due, canceled, paused.", "examples": ["active"], "title": "Subscription Status", "type": "string"}, "topup_balance_cents": {"description": "Remaining top-up balance in cents.", "examples": [2500], "title": "Topup Balance Cents", "type": "integer"}, "created_at": {"description": "When the team was created.", "format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "name", "plan", "subscription_status", "topup_balance_cents", "created_at"], "title": "TeamSchema", "type": "object"}, "UsageBreakdownSchema": {"properties": {"id": {"$ref": "#/components/schemas/UsageTypeSchema", "description": "Government ID + selfie verification usage."}, "sms": {"$ref": "#/components/schemas/UsageTypeSchema", "description": "SMS OTP verification usage."}, "email": {"$ref": "#/components/schemas/UsageTypeSchema", "description": "Email verification usage."}, "manager": {"$ref": "#/components/schemas/UsageTypeSchema", "description": "Manager attestation usage."}, "custom": {"$ref": "#/components/schemas/UsageTypeSchema", "description": "Custom security question usage."}}, "required": ["id", "sms", "email", "manager", "custom"], "title": "UsageBreakdownSchema", "type": "object"}, "UsageSummarySchema": {"properties": {"billing_period_start": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "description": "Start of the current billing period.", "title": "Billing Period Start"}, "billing_period_end": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "description": "End of the current billing period.", "title": "Billing Period End"}, "usage": {"$ref": "#/components/schemas/UsageBreakdownSchema", "description": "Per-method usage breakdown."}}, "required": ["usage"], "title": "UsageSummarySchema", "type": "object"}, "UsageTypeSchema": {"properties": {"allowed": {"description": "Monthly allowance for this method.", "title": "Allowed", "type": "integer"}, "included_used": {"description": "Units used from the included allowance.", "title": "Included Used", "type": "integer"}, "topup_used": {"description": "Units paid via top-up balance.", "title": "Topup Used", "type": "integer"}, "topup_cost_cents": {"description": "Total top-up cost in cents.", "title": "Topup Cost Cents", "type": "integer"}, "total_used": {"description": "Total units used this period.", "title": "Total Used", "type": "integer"}, "percent_used": {"description": "Percentage of allowance used (0\u2013100).", "title": "Percent Used", "type": "number"}}, "required": ["allowed", "included_used", "topup_used", "topup_cost_cents", "total_used", "percent_used"], "title": "UsageTypeSchema", "type": "object"}, "WebhookEndpointResponseSchema": {"properties": {"id": {"description": "Endpoint identifier.", "format": "uuid", "title": "Id", "type": "string"}, "url": {"description": "Destination URL.", "title": "Url", "type": "string"}, "events": {"description": "Subscribed event types.", "items": {"type": "string"}, "title": "Events", "type": "array"}, "name": {"description": "Human-readable name.", "title": "Name", "type": "string"}, "is_active": {"description": "Whether the endpoint is enabled.", "title": "Is Active", "type": "boolean"}, "failure_count": {"description": "Consecutive delivery failures.", "title": "Failure Count", "type": "integer"}, "disabled_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "description": "When the endpoint was auto-disabled (after 15 failures).", "title": "Disabled At"}, "created_at": {"description": "When the endpoint was created.", "format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"description": "When the endpoint was last modified.", "format": "date-time", "title": "Updated At", "type": "string"}, "secret": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "HMAC signing secret. Only returned on create and rotate-secret.", "title": "Secret"}}, "required": ["id", "url", "events", "name", "is_active", "failure_count", "created_at", "updated_at"], "title": "WebhookEndpointResponseSchema", "type": "object"}, "WebhookEndpointCreateSchema": {"properties": {"url": {"description": "HTTPS URL to receive webhook events. Must use port 443 and must not contain credentials.", "examples": ["https://api.example.com/webhooks/authduty"], "title": "Url", "type": "string"}, "events": {"description": "Event types to subscribe to.", "examples": [["case.created", "case.closed"]], "items": {"enum": ["case.created", "case.closed", "case.failed", "case.expired", "verification.step_completed", "ping"], "type": "string"}, "title": "Events", "type": "array"}, "name": {"description": "Human-readable name for this endpoint.", "examples": ["Production webhook"], "title": "Name", "type": "string"}}, "required": ["url", "events", "name"], "title": "WebhookEndpointCreateSchema", "type": "object"}, "WebhookEndpointUpdateSchema": {"properties": {"url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "New HTTPS URL. Must use port 443 and must not contain credentials.", "title": "Url"}, "events": {"anyOf": [{"items": {"enum": ["case.created", "case.closed", "case.failed", "case.expired", "verification.step_completed", "ping"], "type": "string"}, "type": "array"}, {"type": "null"}], "description": "New event subscriptions (replaces existing).", "title": "Events"}, "is_active": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "Enable or disable the endpoint.", "title": "Is Active"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Updated name.", "title": "Name"}}, "title": "WebhookEndpointUpdateSchema", "type": "object"}, "TestPingResponseSchema": {"properties": {"status": {"description": "Test ping result.", "examples": ["ping_sent"], "title": "Status", "type": "string"}}, "required": ["status"], "title": "TestPingResponseSchema", "type": "object"}, "PagedWebhookDeliverySchema": {"properties": {"previous": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Previous"}, "next": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Next"}, "results": {"items": {"$ref": "#/components/schemas/WebhookDeliverySchema"}, "title": "Results", "type": "array"}}, "required": ["previous", "next", "results"], "title": "PagedWebhookDeliverySchema", "type": "object"}, "WebhookDeliverySchema": {"properties": {"id": {"description": "Delivery identifier.", "format": "uuid", "title": "Id", "type": "string"}, "event_id": {"description": "Associated event identifier.", "format": "uuid", "title": "Event Id", "type": "string"}, "event_type": {"description": "Event type (e.g. case.created).", "title": "Event Type", "type": "string"}, "endpoint_id": {"description": "Target endpoint identifier.", "format": "uuid", "title": "Endpoint Id", "type": "string"}, "status": {"description": "Delivery status.", "enum": ["pending", "success", "failed", "dead_letter"], "title": "Status", "type": "string"}, "attempt_count": {"description": "Number of delivery attempts made.", "title": "Attempt Count", "type": "integer"}, "max_attempts": {"description": "Maximum delivery attempts before dead-lettering.", "title": "Max Attempts", "type": "integer"}, "last_response_status": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "HTTP status code from the last attempt.", "title": "Last Response Status"}, "last_error": {"description": "Error message from the last failed attempt, if any.", "title": "Last Error", "type": "string"}, "completed_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "description": "When the delivery succeeded or was dead-lettered.", "title": "Completed At"}, "created_at": {"description": "When the delivery was created.", "format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "event_id", "event_type", "endpoint_id", "status", "attempt_count", "max_attempts", "last_error", "created_at"], "title": "WebhookDeliverySchema", "type": "object"}}, "securitySchemes": {"APIKeyAuth": {"type": "http", "scheme": "bearer"}}}, "servers": [{"url": "https://api.authduty.com/v1", "description": "Production"}]}