{"openapi":"3.1.0","info":{"title":"Papers API","version":"0.1.0","description":"Development API for agent email and phone infrastructure. Approval, email, SMS, inbox, attachment, operation, identity, workspace policy, usage, and event response schemas are typed; other response schemas remain permissive. Request schemas are generated from runtime Zod contracts. Cards are deferred."},"servers":[{"url":"https://www.papers.bot/v1"}],"security":[{"bearerAuth":[]}],"paths":{"/connections/{id}/limits":{"patch":{"operationId":"updateConnectionLimits","security":[{"sessionCookie":[]}],"summary":"Set your OAuth connection daily send limits","description":"Own owner/admin session only, outside impersonation. Null inherits workspace limits. Zero blocks new sends. UTC counters survive token refresh and limit changes. Requires a human owner/admin session; agent API keys and delegated OAuth cannot administer the workspace.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"dailyInboxLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"dailyNumberLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"dailyEmailLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"dailySmsLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]}},"required":["dailyEmailLimit","dailySmsLimit"],"additionalProperties":false}}}}}},"/approvals":{"get":{"operationId":"listApprovals","summary":"List recent approval requests","description":"Returns requests newest first with cursor pagination (default 25, maximum 100 per page). Credentials can read their own requests; owner/admin sessions can review workspace requests.","parameters":[{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalPage"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/approvals/{id}/approve":{"post":{"operationId":"approveAction","security":[{"sessionCookie":[]}],"summary":"Approve an exact requested action","description":"Owner/admin session outside impersonation required. Approval does not execute the action; the original principal retries the same request and key. Requires a human owner/admin session; agent API keys and delegated OAuth cannot administer the workspace.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDecision"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/approvals/{id}/deny":{"post":{"operationId":"denyAction","security":[{"sessionCookie":[]}],"summary":"Deny a requested action","description":"Requires a human owner/admin session; agent API keys and delegated OAuth cannot administer the workspace.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalDecision"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workspace/usage":{"get":{"operationId":"getWorkspaceUsage","security":[{"sessionCookie":[]}],"summary":"Monthly workspace usage and reported SMS costs","description":"Owner/admin sessions only. Optional month=YYYY-MM (UTC, default current month). Groups provider costs by currency; null means unreported. Based on message creation time, not an invoice or provider billing period.","parameters":[{"name":"month","in":"query","schema":{"type":"string","pattern":"^20[0-9]{2}-(0[1-9]|1[0-2])$"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceUsage"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-endpoints/{id}/deliveries":{"get":{"operationId":"listWebhookDeliveries","security":[{"sessionCookie":[]}],"summary":"List webhook delivery history","description":"Owner/admin sessions only. Newest first. Excludes signing secrets, payloads, destination URLs, and receiver response bodies. Requires a human owner/admin session; agent API keys and delegated OAuth cannot administer the workspace.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-endpoints/{id}/deliveries/{deliveryId}":{"get":{"operationId":"getWebhookDelivery","security":[{"sessionCookie":[]}],"summary":"Read webhook delivery attempts","description":"Owner/admin sessions only. Returns up to eight attempts with timestamps, HTTP statuses, and fixed error codes. Requires a human owner/admin session; agent API keys and delegated OAuth cannot administer the workspace.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-endpoints":{"get":{"operationId":"listWebhookEndpoints","security":[{"sessionCookie":[]}],"summary":"List workspace webhook endpoints","description":"Requires a human owner/admin session; agent API keys and delegated OAuth cannot administer the workspace.","parameters":[],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createWebhookEndpoint","security":[{"sessionCookie":[]}],"summary":"Configure an inactive webhook endpoint","description":"Returns signingSecret once. New endpoints are disabled; save the secret before enabling with PATCH. Requires a human owner/admin session; agent API keys and delegated OAuth cannot administer the workspace.","parameters":[],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"url":{"type":"string","maxLength":2048,"format":"uri"},"eventTypes":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","pattern":"^(email|sms|inbox|number)\\.[a-z_]+$"}}},"required":["name","url","eventTypes"],"additionalProperties":false}}}}}},"/webhook-endpoints/{id}":{"patch":{"operationId":"updateWebhookEndpoint","security":[{"sessionCookie":[]}],"summary":"Update or enable a webhook endpoint","description":"Requires a human owner/admin session; agent API keys and delegated OAuth cannot administer the workspace.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"url":{"type":"string","maxLength":2048,"format":"uri"},"eventTypes":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"string","pattern":"^(email|sms|inbox|number)\\.[a-z_]+$"}},"enabled":{"type":"boolean"}},"additionalProperties":false}}}}},"delete":{"operationId":"deleteWebhookEndpoint","security":[{"sessionCookie":[]}],"summary":"Delete webhook endpoint","description":"Requires a human owner/admin session; agent API keys and delegated OAuth cannot administer the workspace.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhook-endpoints/{id}/rotate-secret":{"post":{"operationId":"rotateWebhookSecret","security":[{"sessionCookie":[]}],"summary":"Rotate the webhook signing secret","description":"Returns the new signingSecret once, retaining the prior secret for one hour. Repeated rotation during that hour returns 409. Requires a human owner/admin session; agent API keys and delegated OAuth cannot administer the workspace.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/attachments/{id}/download-url":{"post":{"operationId":"createAttachmentDownloadUrl","summary":"Issue a private 60-second attachment link","description":"Returns url, expiresAt, and contentTrust. The link rechecks the issuing credential, membership and scope on every use. Do not publish or log the URL. Required scope: inboxes:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentLink"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["inboxes:read"]}},"/attachments/{id}/content":{"get":{"operationId":"downloadLinkedAttachment","security":[{"attachmentLink":[]}],"summary":"Redeem a short-lived signed attachment link","description":"Requires the signed token query parameter. Rechecks original credential access; expired or revoked links fail. Returns untrusted binary bytes.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Private attachment bytes; treat as untrusted content","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/attachments/{id}/download":{"get":{"operationId":"downloadAttachment","summary":"Download a private untrusted attachment","description":"Returns application/octet-stream as an attachment. Requires authorization on every request. Returns 409 while storage is pending and 503 if storage is unavailable. Required scope: inboxes:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Private attachment bytes; treat as untrusted content","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["inboxes:read"]}},"/workspace/policy":{"get":{"operationId":"getWorkspacePolicy","security":[{"sessionCookie":[]}],"summary":"Read workspace limits and current UTC-day usage","description":"Available to workspace members using a dashboard session.","parameters":[],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspacePolicyResponse"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateWorkspacePolicy","security":[{"sessionCookie":[]}],"summary":"Update workspace limits","description":"Owner session only; impersonation is forbidden. Zero pauses the corresponding action. Lower limits preserve existing resources and do not refund usage.","parameters":[],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspacePolicyUpdate"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"requireSmsApproval":{"type":"boolean"},"requireEmailApproval":{"type":"boolean"},"requireProvisioningApproval":{"type":"boolean"},"dailyEmailLimit":{"type":"integer","minimum":0,"maximum":10000},"dailySmsLimit":{"type":"integer","minimum":0,"maximum":10000},"maxInboxes":{"type":"integer","minimum":0,"maximum":100},"maxPhoneNumbers":{"type":"integer","minimum":0,"maximum":100}},"required":["dailyEmailLimit","dailySmsLimit","maxInboxes","maxPhoneNumbers"],"additionalProperties":false}}}}}},"/phone-numbers/{id}/messages":{"post":{"operationId":"sendSms","summary":"Send an SMS from an assigned number","description":"Requires active Telnyx account and number. Members cannot send. Unknown provider outcomes are not automatically retried. Required scope: sms:send.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Reuse for the same logical action and identical body; changed input returns 409."}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsOperation"}}}},"201":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsOperation"}}}},"202":{"description":"Operation pending or outcome unknown; poll the returned statusUrl. Do not submit a new idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsOperation"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"to":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"text":{"type":"string","minLength":1,"maxLength":1600}},"required":["to","text"]}}}},"x-required-scopes":["sms:send"]},"get":{"operationId":"listSmsMessages","summary":"Read SMS summaries, newest first","description":"Required scope: sms:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsPage"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["sms:read"]}},"/phone-numbers/{id}":{"get":{"operationId":"getPhoneNumber","summary":"Read an assigned number","description":"Required scope: numbers:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["numbers:read"]},"delete":{"operationId":"releasePhoneNumber","summary":"Permanently release a phone number","description":"Required scope: numbers:release.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Reuse for the same logical action and identical body; changed input returns 409."}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberOperation"}}}},"202":{"description":"Operation pending or outcome unknown; poll the returned statusUrl. Do not submit a new idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberOperation"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["numbers:release"]}},"/sms/{id}":{"get":{"operationId":"getSmsMessage","summary":"Read untrusted SMS text","description":"Returns untrusted message text and recipientOptOut: current observed profile status (blocked, not_blocked, or unknown) and observedAt. This is not proof of consent or guaranteed delivery. List responses omit recipientOptOut. Required scope: sms:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsDetail"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["sms:read"]}},"/me":{"get":{"operationId":"getIdentity","summary":"Read the authenticated identity","description":"","parameters":[],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Identity"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/capabilities":{"get":{"operationId":"getCapabilities","summary":"Check configured providers and availability","description":"Reports server configuration, not live provider health or credential permissions. Phone availability requires an active account, API key, messaging profile, and webhook verification key. Inspect identity scopes separately; quotas and approvals still apply.","parameters":[],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Capabilities"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/agents":{"get":{"operationId":"listAgents","summary":"List accessible agents (up to 100)","description":"Required scope: agents:read.","parameters":[],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["agents:read"]},"post":{"operationId":"createAgent","security":[{"sessionCookie":[]}],"summary":"Create an agent","description":"Required scope: agents:write. Requires a human owner/admin session; agent API keys and delegated OAuth cannot administer the workspace.","parameters":[],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"default":"","type":"string","maxLength":500}},"required":["name"]}}}},"x-required-scopes":["agents:write"]}},"/agents/{id}":{"get":{"operationId":"getAgent","summary":"Read an agent","description":"Required scope: agents:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["agents:read"]}},"/agents/{id}/policy":{"get":{"operationId":"getAgentPolicy","summary":"Read agent limits and recipient policy","description":"Required scope: agents:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["agents:read"]},"patch":{"operationId":"updateAgentPolicy","security":[{"sessionCookie":[]}],"summary":"Change agent policy","description":"Unavailable during impersonation. Required scope: agents:write. Requires a human owner/admin session; agent API keys and delegated OAuth cannot administer the workspace.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"dailySmsLimit":{"type":"integer","minimum":0,"maximum":10000},"allowedSmsRecipients":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"}},"dailySendLimit":{"type":"integer","minimum":0,"maximum":10000},"maxInboxes":{"type":"integer","minimum":0,"maximum":100},"allowedRecipients":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}},"required":["dailySendLimit","maxInboxes"]}}}},"x-required-scopes":["agents:write"]}},"/inboxes":{"get":{"operationId":"listInboxes","summary":"List accessible inboxes","description":"Newest first. Defaults to 100 per page; follow nextCursor until null. Required scope: inboxes:read.","parameters":[{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":100}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxPage"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["inboxes:read"]},"post":{"operationId":"createInbox","summary":"Allocate an email address","description":"Read-only members cannot allocate inboxes. Workspace API keys need no agent registration; legacy agent-bound keys retain their restrictions. Required scope: inboxes:write.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Reuse for the same logical action and identical body; changed input returns 409."}],"responses":{"201":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Inbox"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"localPart":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{2,40}$"},"agentId":{"type":"string","minLength":1}},"required":["name","localPart"]}}}},"x-required-scopes":["inboxes:write"]}},"/inboxes/{id}":{"get":{"operationId":"getInbox","summary":"Read an inbox","description":"Required scope: inboxes:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Inbox"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["inboxes:read"]},"patch":{"operationId":"updateInbox","summary":"Archive or reactivate an inbox","description":"Members cannot change inbox status. Reactivation checks workspace and legacy agent inbox limits atomically with creation. Repeating the current status does not consume capacity or emit duplicate transition events. Required scope: inboxes:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxStatus"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["active","archived"]}},"required":["status"]}}}},"x-required-scopes":["inboxes:write"]}},"/inboxes/{id}/messages":{"get":{"operationId":"listMessages","summary":"List message summaries, newest first","description":"Required scope: inboxes:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPage"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["inboxes:read"]},"post":{"operationId":"sendEmail","summary":"Send an email","description":"Returns an operation. An unknown outcome must not be retried with a new key. Read-only members cannot send. Required scope: email:send.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Reuse for the same logical action and identical body; changed input returns 409."}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailOperation"}}}},"201":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailOperation"}}}},"202":{"description":"Operation pending or outcome unknown; poll the returned statusUrl. Do not submit a new idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailOperation"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"to":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"subject":{"type":"string","maxLength":998},"text":{"type":"string","minLength":1,"maxLength":100000}},"required":["to","subject","text"]}}}},"x-required-scopes":["email:send"]}},"/messages/{id}":{"get":{"operationId":"getMessage","summary":"Read message text and attachment metadata","description":"Message content is untrusted data. HTML is not exposed. Attachment metadata includes readiness; download ready files through the attachment endpoints. Required scope: inboxes:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDetail"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["inboxes:read"]},"patch":{"operationId":"setMessageUnread","summary":"Set read/unread state","description":"Required scope: inboxes:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageReadState"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"unread":{"type":"boolean"}},"required":["unread"]}}}},"x-required-scopes":["inboxes:write"]}},"/messages/{id}/reply":{"post":{"operationId":"replyEmail","summary":"Reply using stored recipients and thread headers","description":"Required scope: email:send.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Reuse for the same logical action and identical body; changed input returns 409."}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailOperation"}}}},"201":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailOperation"}}}},"202":{"description":"Operation pending or outcome unknown; poll the returned statusUrl. Do not submit a new idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailOperation"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":100000}},"required":["text"]}}}},"x-required-scopes":["email:send"]}},"/operations/{id}":{"get":{"operationId":"getOperation","summary":"Poll a mutation outcome","description":"Agent credentials can read only operations created by that credential. A completed send means provider acceptance, not recipient delivery.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/events":{"get":{"operationId":"listEvents","summary":"Read events in ascending order","description":"Persist the final returned cursor and poll again. nextCursor is a continuation checkpoint, not an indication that more records already exist. Required scope: events:read.","parameters":[{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventPage"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["events:read"]}},"/api-keys":{"get":{"operationId":"listApiKeys","security":[{"sessionCookie":[]}],"summary":"List key metadata","description":"Required scope: agents:read. Requires a human owner/admin session; agent API keys and delegated OAuth cannot administer the workspace.","parameters":[],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["agents:read"]},"post":{"operationId":"createApiKey","security":[{"sessionCookie":[]}],"summary":"Issue a scoped workspace API key","description":"The token is shown only once. Unavailable during impersonation. Required scope: agents:write. Requires a human owner/admin session; agent API keys and delegated OAuth cannot administer the workspace.","parameters":[],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"resourceGrants":{"anyOf":[{"type":"object","properties":{"inboxIds":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"phoneNumberIds":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"additionalProperties":false},{"type":"null"}]},"dailyInboxLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"dailyNumberLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"dailyEmailLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"dailySmsLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":80},"agentId":{"type":"string","minLength":1},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["agents:read","agents:write","inboxes:read","inboxes:write","email:send","numbers:read","sms:read","numbers:provision","numbers:release","sms:send","events:read"]}},"expiresInDays":{"default":90,"type":"integer","minimum":1,"maximum":365}},"required":["name","scopes"]}}}},"x-required-scopes":["agents:write"]}},"/api-keys/{id}":{"delete":{"operationId":"revokeApiKey","security":[{"sessionCookie":[]}],"summary":"Revoke an API key","description":"Required scope: agents:write. Requires a human owner/admin session; agent API keys and delegated OAuth cannot administer the workspace.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["agents:write"]}},"/connections":{"get":{"operationId":"listConnections","security":[{"sessionCookie":[]}],"summary":"List your OAuth grants in the selected workspace","description":"Human session only.","parameters":[],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/connections/{id}":{"delete":{"operationId":"revokeConnection","security":[{"sessionCookie":[]}],"summary":"Revoke your OAuth grant","description":"Human session only; unavailable during impersonation.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/phone-numbers":{"get":{"operationId":"listPhoneNumbers","summary":"List phone numbers and onboarding status","description":"Lists workspace numbers newest first, including pending and released assignments. Defaults to 100 per page; follow nextCursor until null. Required scope: numbers:read.","parameters":[{"name":"cursor","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":100}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberPage"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["numbers:read"]},"post":{"operationId":"provisionPhoneNumber","summary":"Purchase a workspace phone number","description":"Requires the country and current upfront/monthly prices from search. Purchase is asynchronous; poll the operation. An unknown outcome must not be reordered. Required scope: numbers:provision.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Reuse for the same logical action and identical body; changed input returns 409."}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberOperation"}}}},"202":{"description":"Operation pending or outcome unknown; poll the returned statusUrl. Do not submit a new idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumberOperation"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"country":{"type":"string","pattern":"^[A-Z]{2}$"},"monthlyCost":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"upfrontCost":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"phoneNumber":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"agentId":{"type":"string","minLength":1}},"required":["country","monthlyCost","upfrontCost","currency","phoneNumber"]}}}},"x-required-scopes":["numbers:provision"]}},"/phone-numbers/available":{"get":{"operationId":"searchPhoneNumbers","summary":"Search available Telnyx numbers","description":"Requires an activated Telnyx account; otherwise returns 503. Required scope: numbers:read.","parameters":[{"name":"country","in":"query","schema":{"type":"string","pattern":"^[A-Z]{2}$","default":"US"}}],"responses":{"200":{"description":"Successful JSON response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailableNumberResults"}}}},"429":{"description":"Request rate limit or communication quota exceeded. Rate-limit responses include Retry-After.","headers":{"Retry-After":{"description":"Seconds until the request-rate window resets (rate_limited errors)","schema":{"type":"integer","minimum":1,"maximum":60}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Request rejected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-required-scopes":["numbers:read"]}}},"components":{"securitySchemes":{"attachmentLink":{"type":"apiKey","in":"query","name":"token","description":"Short-lived signed attachment capability; never log or publish."},"sessionCookie":{"type":"apiKey","in":"cookie","name":"__Secure-better-auth.session_token","description":"Better Auth session with selected organization. Mutations also require the trusted Origin header."},"bearerAuth":{"type":"http","scheme":"bearer","description":"Workspace API key or delegated OAuth access token with /v1 resource audience. Administrative routes require the Better Auth browser session instead."}},"schemas":{"Capabilities":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"object","properties":{"provider":{"type":"string","const":"resend"},"available":{"type":"boolean"},"domain":{"type":"string"}},"required":["provider","available"],"additionalProperties":false},"phone":{"type":"object","properties":{"provider":{"type":"string","const":"telnyx"},"available":{"type":"boolean"},"status":{"type":"string"}},"required":["provider","available","status"],"additionalProperties":false},"cards":{"type":"object","properties":{"available":{"type":"boolean","const":false},"status":{"type":"string","const":"deferred"}},"required":["available","status"],"additionalProperties":false}},"required":["email","phone","cards"],"additionalProperties":false},"WorkspacePolicyResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"policy":{"type":"object","properties":{"requireSmsApproval":{"type":"boolean"},"requireEmailApproval":{"type":"boolean"},"requireProvisioningApproval":{"type":"boolean"},"dailyEmailLimit":{"type":"integer","minimum":0,"maximum":9007199254740991},"dailySmsLimit":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxInboxes":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxPhoneNumbers":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["requireSmsApproval","requireEmailApproval","requireProvisioningApproval","dailyEmailLimit","dailySmsLimit","maxInboxes","maxPhoneNumbers"],"additionalProperties":false},"usage":{"type":"object","properties":{"day":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"emailSends":{"type":"integer","minimum":0,"maximum":9007199254740991},"smsSends":{"type":"integer","minimum":0,"maximum":9007199254740991},"inboxes":{"type":"integer","minimum":0,"maximum":9007199254740991},"phoneNumbers":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["day","emailSends","smsSends","inboxes","phoneNumbers"],"additionalProperties":false}},"required":["policy","usage"],"additionalProperties":false},"WorkspacePolicyUpdate":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"policy":{"type":"object","properties":{"requireSmsApproval":{"type":"boolean"},"requireEmailApproval":{"type":"boolean"},"requireProvisioningApproval":{"type":"boolean"},"dailyEmailLimit":{"type":"integer","minimum":0,"maximum":9007199254740991},"dailySmsLimit":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxInboxes":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxPhoneNumbers":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["requireSmsApproval","requireEmailApproval","requireProvisioningApproval","dailyEmailLimit","dailySmsLimit","maxInboxes","maxPhoneNumbers"],"additionalProperties":false}},"required":["policy"],"additionalProperties":false},"WorkspaceUsage":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"month":{"type":"string","pattern":"^20\\d{2}-(0[1-9]|1[0-2])$"},"timezone":{"type":"string","const":"UTC"},"start":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"endExclusive":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"email":{"type":"array","items":{"type":"object","properties":{"direction":{"type":"string","enum":["inbound","outbound"]},"messages":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["direction","messages"],"additionalProperties":false}},"sms":{"type":"array","items":{"type":"object","properties":{"direction":{"type":"string","enum":["inbound","outbound"]},"currency":{"type":["string","null"]},"messages":{"type":"integer","minimum":0,"maximum":9007199254740991},"messagesWithCost":{"type":"integer","minimum":0,"maximum":9007199254740991},"messagesWithSegments":{"type":"integer","minimum":0,"maximum":9007199254740991},"reportedSegments":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"reportedProviderCost":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},{"type":"null"}]}},"required":["direction","currency","messages","messagesWithCost","messagesWithSegments","reportedSegments","reportedProviderCost"],"additionalProperties":false}},"basis":{"type":"string","const":"message_created_at"},"costSource":{"type":"string","const":"provider_callbacks"},"billingStatus":{"type":"string","const":"not_implemented"}},"required":["month","timezone","start","endExclusive","email","sms","basis","costSource","billingStatus"],"additionalProperties":false},"EventPage":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"organizationId":{"type":"string","minLength":1},"agentId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"type":{"type":"string"},"resourceId":{"type":"string","minLength":1},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","organizationId","agentId","type","resourceId","createdAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Polling checkpoint: the last returned event ID, including on the final nonempty page. When null, retain the previous checkpoint for the next poll."}},"required":["data","nextCursor"],"additionalProperties":false},"Identity":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"resourceGrants":{"anyOf":[{"type":"object","properties":{"inboxIds":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1}},"phoneNumberIds":{"default":[],"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["inboxIds","phoneNumberIds"],"additionalProperties":false},{"type":"null"}]},"provisioningLimits":{"type":"object","properties":{"day":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"resetsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"inboxes":{"type":"object","properties":{"dailyLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Credential daily creation cap; null means no additional credential cap."},"capacityRemaining":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Remaining resource slots under workspace and applicable legacy-agent limits."},"remaining":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Current creation allowance after daily usage, capacity and permissions. A snapshot, not a reservation or authorization."},"approvalRequired":{"type":"boolean"}},"required":["dailyLimit","capacityRemaining","remaining","approvalRequired"],"additionalProperties":false},"phoneNumbers":{"type":"object","properties":{"dailyLimit":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}],"description":"Credential daily creation cap; null means no additional credential cap."},"capacityRemaining":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Remaining resource slots under workspace and applicable legacy-agent limits."},"remaining":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Current creation allowance after daily usage, capacity and permissions. A snapshot, not a reservation or authorization."},"approvalRequired":{"type":"boolean"}},"required":["dailyLimit","capacityRemaining","remaining","approvalRequired"],"additionalProperties":false}},"required":["day","resetsAt","inboxes","phoneNumbers"],"additionalProperties":false},"sendLimits":{"type":"object","properties":{"day":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"resetsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"email":{"type":"object","properties":{"dailyLimit":{"type":"integer","minimum":0,"maximum":9007199254740991},"remaining":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvalRequired":{"type":"boolean"}},"required":["dailyLimit","remaining","approvalRequired"],"additionalProperties":false},"sms":{"type":"object","properties":{"dailyLimit":{"type":"integer","minimum":0,"maximum":9007199254740991},"remaining":{"type":"integer","minimum":0,"maximum":9007199254740991},"approvalRequired":{"type":"boolean"}},"required":["dailyLimit","remaining","approvalRequired"],"additionalProperties":false}},"required":["day","resetsAt","email","sms"],"additionalProperties":false},"userId":{"type":"string","minLength":1},"organizationId":{"type":"string","minLength":1},"role":{"type":"string"},"agentId":{"type":"string","minLength":1},"scopes":{"type":"array","items":{"type":"string"}},"impersonatedBy":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["resourceGrants","provisioningLimits","sendLimits","userId","organizationId","role","scopes"],"additionalProperties":false},"Approval":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1},"principalId":{"type":"string","minLength":1},"route":{"type":"string"},"resourceId":{"type":"string","minLength":1},"parameters":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"text":{"type":"string"}},"required":["from","to","subject","text"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string"},"text":{"type":"string"}},"required":["to","text"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string"},"localPart":{"type":"string"},"address":{"type":"string"},"agentId":{"type":"string","minLength":1}},"required":["name","localPart","address"],"additionalProperties":false},{"type":"object","properties":{"phoneNumber":{"type":"string"},"country":{"type":"string"},"monthlyCost":{"type":"string"},"upfrontCost":{"type":"string"},"currency":{"type":"string"},"agentId":{"type":"string","minLength":1}},"required":["phoneNumber","country","monthlyCost","upfrontCost","currency"],"additionalProperties":false}]},"status":{"type":"string","enum":["pending","approved","denied","consumed"]},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"policyVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"operationId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","principalId","route","resourceId","parameters","status","expiresAt","policyVersion","decidedAt","operationId","createdAt"],"additionalProperties":false},"ApprovalPage":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"policyVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"principalId":{"type":"string","minLength":1},"route":{"type":"string"},"resourceId":{"type":"string","minLength":1},"parameters":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"text":{"type":"string"}},"required":["from","to","subject","text"],"additionalProperties":false},{"type":"object","properties":{"to":{"type":"string"},"text":{"type":"string"}},"required":["to","text"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string"},"localPart":{"type":"string"},"address":{"type":"string"},"agentId":{"type":"string","minLength":1}},"required":["name","localPart","address"],"additionalProperties":false},{"type":"object","properties":{"phoneNumber":{"type":"string"},"country":{"type":"string"},"monthlyCost":{"type":"string"},"upfrontCost":{"type":"string"},"currency":{"type":"string"},"agentId":{"type":"string","minLength":1}},"required":["phoneNumber","country","monthlyCost","upfrontCost","currency"],"additionalProperties":false}]},"status":{"type":"string","enum":["pending","approved","denied","consumed"]},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"policyVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"operationId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","principalId","route","resourceId","parameters","status","expiresAt","policyVersion","decidedAt","operationId","createdAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["policyVersion","data","nextCursor"],"additionalProperties":false},"ApprovalDecision":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1},"status":{"type":"string","enum":["approved","denied"]}},"required":["id","status"],"additionalProperties":false},"SmsSummary":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1},"phoneNumberId":{"type":"string","minLength":1},"from":{"type":"string"},"to":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound"]},"status":{"type":"string"},"unread":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"segments":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"costAmount":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},{"type":"null"}]},"costCurrency":{"type":["string","null"]}},"required":["id","phoneNumberId","from","to","direction","status","unread","createdAt","segments","costAmount","costCurrency"],"additionalProperties":false},"SmsDetail":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1},"phoneNumberId":{"type":"string","minLength":1},"from":{"type":"string"},"to":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound"]},"status":{"type":"string"},"unread":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"segments":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"costAmount":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},{"type":"null"}]},"costCurrency":{"type":["string","null"]},"text":{"type":"string"},"contentTrust":{"type":"string","const":"untrusted"},"recipientOptOut":{"type":"object","properties":{"status":{"type":"string","enum":["blocked","not_blocked","unknown"]},"observedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["status","observedAt"],"additionalProperties":false}},"required":["id","phoneNumberId","from","to","direction","status","unread","createdAt","segments","costAmount","costCurrency","text","contentTrust","recipientOptOut"],"additionalProperties":false},"SmsPage":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"phoneNumberId":{"type":"string","minLength":1},"from":{"type":"string"},"to":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound"]},"status":{"type":"string"},"unread":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"segments":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"costAmount":{"anyOf":[{"type":"string","pattern":"^\\d+(\\.\\d+)?([eE][+-]?\\d+)?$"},{"type":"null"}]},"costCurrency":{"type":["string","null"]}},"required":["id","phoneNumberId","from","to","direction","status","unread","createdAt","segments","costAmount","costCurrency"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false},"Error":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"retryable":{"type":"boolean"},"details":{"anyOf":[{"type":"object","properties":{"approvalId":{"type":"string","minLength":1}},"required":["approvalId"],"additionalProperties":false},{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["code","path","message"],"additionalProperties":false}}]}},"required":["code","message","request_id","retryable"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"Operation":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","unknown","completed","failed"],"description":"Operation state. Completed sends mean provider acceptance, not recipient delivery. Poll pending or unknown operations; do not resend with a new key."},"resourceId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"error":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"failure":{"type":"object","properties":{"kind":{"type":"string","enum":["provider_http_error","timeout","connection_error","invalid_provider_response","confirmation_failed","unexpected_error"]},"httpStatus":{"type":"integer","minimum":100,"maximum":599},"providerCodes":{"maxItems":10,"type":"array","items":{"type":"string","pattern":"^\\d{3,10}$"}}},"required":["kind","providerCodes"],"additionalProperties":false}},"required":["id","status","resourceId","error","createdAt"],"additionalProperties":false},"EmailOperation":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","unknown","completed","failed"],"description":"Operation state. Completed sends mean provider acceptance, not recipient delivery. Poll pending or unknown operations; do not resend with a new key."},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"statusUrl":{"type":"string"}},"required":["id","status","messageId","statusUrl"],"additionalProperties":false},"SmsOperation":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","unknown","completed","failed"],"description":"Operation state. Completed sends mean provider acceptance, not recipient delivery. Poll pending or unknown operations; do not resend with a new key."},"messageId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"statusUrl":{"type":"string"},"error":{"type":["string","null"]},"failure":{"type":"object","properties":{"kind":{"type":"string","enum":["provider_http_error","timeout","connection_error","invalid_provider_response","confirmation_failed","unexpected_error"]},"httpStatus":{"type":"integer","minimum":100,"maximum":599},"providerCodes":{"maxItems":10,"type":"array","items":{"type":"string","pattern":"^\\d{3,10}$"}}},"required":["kind","providerCodes"],"additionalProperties":false}},"required":["id","status","messageId","statusUrl","error"],"additionalProperties":false},"NumberOperation":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1},"status":{"type":"string","enum":["pending","unknown","completed","failed"],"description":"Operation state. Completed sends mean provider acceptance, not recipient delivery. Poll pending or unknown operations; do not resend with a new key."},"numberId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"error":{"type":["string","null"]},"statusUrl":{"type":"string"}},"required":["id","status","numberId","error","statusUrl"],"additionalProperties":false},"Inbox":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1},"organizationId":{"type":"string","minLength":1},"agentId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"name":{"type":"string"},"address":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","organizationId","agentId","name","address","status","createdAt"],"additionalProperties":false},"InboxStatus":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["active","archived"]}},"required":["status"],"additionalProperties":false},"InboxListItem":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1},"organizationId":{"type":"string","minLength":1},"agentId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"name":{"type":"string"},"address":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"_count":{"type":"object","properties":{"messages":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["messages"],"additionalProperties":false},"agent":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false},{"type":"null"}]}},"required":["id","organizationId","agentId","name","address","status","createdAt","_count","agent"],"additionalProperties":false},"InboxPage":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"organizationId":{"type":"string","minLength":1},"agentId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"name":{"type":"string"},"address":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"_count":{"type":"object","properties":{"messages":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["messages"],"additionalProperties":false},"agent":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false},{"type":"null"}]}},"required":["id","organizationId","agentId","name","address","status","createdAt","_count","agent"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false},"PhoneNumber":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1},"agentId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"phoneNumber":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","agentId","phoneNumber","status","createdAt"],"additionalProperties":false},"PhoneNumberListItem":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1},"agentId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"phoneNumber":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"lastError":{"type":["string","null"]},"monthlyCost":{"type":["string","null"]},"upfrontCost":{"type":["string","null"]},"currency":{"type":["string","null"]}},"required":["id","agentId","phoneNumber","status","createdAt","lastError","monthlyCost","upfrontCost","currency"],"additionalProperties":false},"PhoneNumberPage":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"agentId":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"phoneNumber":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"lastError":{"type":["string","null"]},"monthlyCost":{"type":["string","null"]},"upfrontCost":{"type":["string","null"]},"currency":{"type":["string","null"]}},"required":["id","agentId","phoneNumber","status","createdAt","lastError","monthlyCost","upfrontCost","currency"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"type":"string","description":"Telnyx account onboarding status."}},"required":["data","nextCursor","status"],"additionalProperties":false},"AvailableNumber":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"phone_number":{"type":"string"},"phone_number_type":{"type":"string"},"cost_information":{"type":"object","properties":{"upfront_cost":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Provider price as an exact decimal string. Do not convert to floating point when requesting a purchase."},"monthly_cost":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Recurring monthly rental price as an exact decimal string."},"currency":{"type":"string"}},"required":["upfront_cost","monthly_cost","currency"],"additionalProperties":false},"features":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"region_information":{"type":"array","items":{"type":"object","properties":{"region_name":{"type":"string"},"region_type":{"type":"string"}},"required":["region_name","region_type"],"additionalProperties":false}}},"required":["phone_number","cost_information","features"],"additionalProperties":false},"AvailableNumberResults":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"phone_number":{"type":"string"},"phone_number_type":{"type":"string"},"cost_information":{"type":"object","properties":{"upfront_cost":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Provider price as an exact decimal string. Do not convert to floating point when requesting a purchase."},"monthly_cost":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Recurring monthly rental price as an exact decimal string."},"currency":{"type":"string"}},"required":["upfront_cost","monthly_cost","currency"],"additionalProperties":false},"features":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"region_information":{"type":"array","items":{"type":"object","properties":{"region_name":{"type":"string"},"region_type":{"type":"string"}},"required":["region_name","region_type"],"additionalProperties":false}}},"required":["phone_number","cost_information","features"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"AttachmentInfo":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1},"filename":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"storageStatus":{"type":"string","enum":["ready","pending","failed","unavailable"]}},"required":["id","filename","contentType","size","storageStatus"],"additionalProperties":false},"AttachmentLink":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"contentTrust":{"type":"string","const":"untrusted"}},"required":["url","expiresAt","contentTrust"],"additionalProperties":false},"EmailSummary":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1},"inboxId":{"type":"string","minLength":1},"threadId":{"type":"string","minLength":1},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound"]},"status":{"type":"string"},"unread":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","inboxId","threadId","from","to","subject","direction","status","unread","createdAt"],"additionalProperties":false},"EmailDetail":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1},"inboxId":{"type":"string","minLength":1},"threadId":{"type":"string","minLength":1},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound"]},"status":{"type":"string"},"unread":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"organizationId":{"type":"string","minLength":1},"messageId":{"type":["string","null"]},"inReplyTo":{"type":["string","null"]},"references":{"type":"array","items":{"type":"string"}},"replyTo":{"type":"array","items":{"type":"string"}},"text":{"type":"string"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"contentTrust":{"type":"string","const":"untrusted"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"filename":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":9007199254740991},"storageStatus":{"type":"string","enum":["ready","pending","failed","unavailable"]}},"required":["id","filename","contentType","size","storageStatus"],"additionalProperties":false}}},"required":["id","inboxId","threadId","from","to","subject","direction","status","unread","createdAt","organizationId","messageId","inReplyTo","references","replyTo","text","updatedAt","contentTrust","attachments"],"additionalProperties":false},"EmailPage":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"inboxId":{"type":"string","minLength":1},"threadId":{"type":"string","minLength":1},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound"]},"status":{"type":"string"},"unread":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","inboxId","threadId","from","to","subject","direction","status","unread","createdAt"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false},"MessageReadState":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"unread":{"type":"boolean"}},"required":["unread"],"additionalProperties":false}}}}