{"openapi":"3.0.0","paths":{"/health":{"get":{"operationId":"getHealth","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"summary":"Liveness / readiness","tags":["health"]}},"/v1/mcp/tools":{"get":{"operationId":"listMcpTools","parameters":[],"responses":{"200":{"description":""}},"summary":"List registered MCP tools","tags":["mcp"]}},"/v1/files/{id}/upload":{"put":{"operationId":"receiveFileUpload","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"exp","required":true,"in":"query","description":"When the link stops working — epoch milliseconds","schema":{"minimum":-9007199254740991,"maximum":9007199254740991,"type":"integer"}},{"name":"sig","required":true,"in":"query","description":"HMAC over the file id and the expiry, base64url","schema":{"pattern":"^[A-Za-z0-9_-]+$","type":"string"}}],"responses":{"204":{"description":""}},"summary":"Create-only local upload using an expiring capability","tags":["files"]}},"/files/{id}/content":{"get":{"operationId":"downloadFile","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"exp","required":true,"in":"query","description":"When the link stops working — epoch milliseconds","schema":{"minimum":-9007199254740991,"maximum":9007199254740991,"type":"integer"}},{"name":"sig","required":true,"in":"query","description":"HMAC over the file id and the expiry, base64url","schema":{"pattern":"^[A-Za-z0-9_-]+$","type":"string"}}],"responses":{"200":{"description":""}},"summary":"Serve a stored file to a valid signed link (no session; the signature is the right)","tags":["files"]}},"/canvases/{id}/{exp}/{sig}/{path}":{"get":{"operationId":"openCanvas","parameters":[{"name":"id","required":true,"in":"path","description":"The set — `artifact-<human-slug>-<crypto-suffix>`","schema":{"maxLength":80,"pattern":"^artifact-[a-z]+-[a-z]+-[0123456789abcdefghjkmnpqrstvwxyz]{12}$","type":"string"}},{"name":"exp","required":true,"in":"path","description":"When the link stops working — epoch milliseconds","schema":{"minimum":-9007199254740991,"maximum":9007199254740991,"type":"integer"}},{"name":"sig","required":true,"in":"path","description":"HMAC over the set id and the expiry, base64url","schema":{"pattern":"^[A-Za-z0-9_-]+$","type":"string"}}],"responses":{"200":{"description":""}},"summary":"Serve one file of a published set to a valid signed link (no session; the signature is the right, and it covers the set rather than the file)","tags":["canvases"]}},"/published/{publicId}/{path}":{"get":{"operationId":"openPublished","parameters":[{"name":"publicId","required":true,"in":"path","description":"The public address — 32 lower-case hex characters","schema":{"pattern":"^[a-f0-9]{32}$","type":"string"}}],"responses":{"200":{"description":""}},"summary":"Serve one file of a set at its permanent public address (no session; the address is the right, a person issued it, and a person can revoke it — after which this answers 404)","tags":["published"]}},"/v1/orgs/{orgId}/credentials/current":{"get":{"description":"Inspect the authenticated organization key without exposing its secret. No human authority is granted.","operationId":"getOrganizationCredentialAccess","parameters":[],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/CredentialAccessDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationCredentials"]}},"/v1/orgs/{orgId}/credentials":{"get":{"operationId":"listOrganizationCredentials","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CredentialDto"}}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationCredentials"]},"post":{"operationId":"createOrganizationCredential","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCredentialDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/IssuedCredentialDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationCredentials"]}},"/v1/orgs/{orgId}/credentials/{credentialId}/rotate":{"post":{"operationId":"rotateOrganizationCredential","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}},{"name":"credentialId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateCredentialDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/IssuedCredentialDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationCredentials"]}},"/v1/orgs/{orgId}/credentials/{credentialId}/revoke":{"post":{"operationId":"revokeOrganizationCredential","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}},{"name":"credentialId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/CredentialDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationCredentials"]}},"/v1/orgs":{"get":{"operationId":"listOrganizations","parameters":[],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationDto"}}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizations"]},"post":{"operationId":"createOrganization","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizations"]}},"/v1/orgs/{orgId}":{"get":{"operationId":"getOrganization","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizations"]},"patch":{"operationId":"updateOrganization","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationSettingsDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizations"]}},"/v1/orgs/{orgId}/operators":{"post":{"operationId":"setOrganizationOperator","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetOrganizationOperatorDto"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"","tags":["organizations"]}},"/v1/orgs/{orgId}/operators/{userId}":{"delete":{"operationId":"removeOrganizationOperator","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}},{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"","tags":["organizations"]}},"/v1/users/me":{"get":{"operationId":"getMe","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Get the current user profile","tags":["users"]},"patch":{"operationId":"updateMe","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Update the current user profile","tags":["users"]}},"/v1/auth/register":{"post":{"operationId":"register","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterUserDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthDto"}}}}},"summary":"Register a new account","tags":["auth"]}},"/v1/auth/login":{"post":{"operationId":"login","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginUserDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthDto"}}}}},"summary":"Login with email and password","tags":["auth"]}},"/v1/auth/refresh":{"post":{"operationId":"refresh","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthDto"}}}}},"summary":"Exchange a refresh token for new tokens","tags":["auth"]}},"/v1/auth/principal":{"get":{"operationId":"principal","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthPrincipalDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Get the current authorization context","tags":["auth"]}},"/v1/auth/revoke":{"post":{"operationId":"revokeSession","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenDto"}}}},"responses":{"204":{"description":""}},"summary":"Revoke a refresh family and its access tokens","tags":["auth"]}},"/v1/auth/me":{"get":{"operationId":"me","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Get the authenticated user","tags":["auth"]}},"/v1/auth/password/forgot":{"post":{"operationId":"forgotPassword","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordDto"}}}},"responses":{"204":{"description":""}},"summary":"Mail a password-reset link; the same 204 whether the address has an account or not","tags":["auth"]}},"/v1/auth/password/reset/check":{"post":{"operationId":"checkPasswordReset","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkTokenDto"}}}},"responses":{"204":{"description":""}},"summary":"Whether a reset link still works","tags":["auth"]}},"/v1/auth/password/reset":{"post":{"operationId":"resetPassword","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthDto"}}}}},"summary":"Set a new password with a reset link; ends every session and signs in again","tags":["auth"]}},"/v1/auth/password/change":{"post":{"operationId":"changePassword","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Change the password with the current one; ends every other session","tags":["auth"]}},"/v1/auth/email/change":{"get":{"operationId":"pendingEmail","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingEmailDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"The new address waiting for confirmation, if any","tags":["auth"]},"post":{"operationId":"changeEmail","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeEmailDto"}}}},"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingEmailDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Mail a confirmation link to a new address; the old one works until it is opened","tags":["auth"]}},"/v1/auth/email/confirm":{"post":{"operationId":"confirmEmail","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmEmailDto"}}}},"responses":{"204":{"description":""}},"summary":"Make the confirmed address the one to sign in with","tags":["auth"]}},"/v1/orgs/{orgId}/teams/{teamId}":{"get":{"operationId":"getScopedTeam","parameters":[],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ScopedTeamDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Read the active actor’s team summary","tags":["scopedTeams"]}},"/v1/teams":{"get":{"operationId":"getTeams","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamDto"}}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"List teams of the current user","tags":["teams"]},"post":{"operationId":"createTeam","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Create a team","tags":["teams"]}},"/v1/teams/{id}":{"get":{"operationId":"getTeam","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Get team by ID","tags":["teams"]},"patch":{"operationId":"updateTeam","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeamDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Update a team","tags":["teams"]},"delete":{"operationId":"deleteTeam","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"defaultBearerAuth":[]}],"summary":"Delete a team","tags":["teams"]}},"/v1/teams/{teamId}/members":{"get":{"operationId":"getTeamMembers","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamMemberDto"}}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"List team members","tags":["teamMembers"]}},"/v1/teams/{teamId}/members/{memberId}":{"patch":{"operationId":"updateTeamMemberRole","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"memberId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeamMemberRoleDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Change a member role","tags":["teamMembers"]},"delete":{"operationId":"removeTeamMember","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"memberId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"defaultBearerAuth":[]}],"summary":"Remove a member from the team","tags":["teamMembers"]}},"/v1/teams/{teamId}/invitations":{"get":{"operationId":"getTeamInvitations","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamInvitationDto"}}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Invitations still waiting for an answer","tags":["teamInvitations"]},"post":{"operationId":"createTeamInvitation","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamInvitationDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationCreatedDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Invite somebody by email; they join only once they accept","tags":["teamInvitations"]}},"/v1/teams/{teamId}/invitations/{invitationId}":{"delete":{"operationId":"revokeTeamInvitation","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"invitationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"defaultBearerAuth":[]}],"summary":"Withdraw an open invitation","tags":["teamInvitations"]}},"/v1/invitations":{"get":{"operationId":"getMyInvitations","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamInvitationDto"}}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Invitations waiting for my answer","tags":["invitations"]}},"/v1/invitations/{invitationId}":{"get":{"operationId":"getMyInvitation","parameters":[{"name":"invitationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"One invitation addressed to me","tags":["invitations"]}},"/v1/invitations/{invitationId}/accept":{"post":{"operationId":"acceptInvitation","parameters":[{"name":"invitationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Join the team","tags":["invitations"]}},"/v1/invitations/{invitationId}/decline":{"post":{"operationId":"declineInvitation","parameters":[{"name":"invitationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInvitationDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Say no to the invitation","tags":["invitations"]}},"/v1/admin/mcp-diagnostics/timeline":{"get":{"operationId":"getConversationTimeline","parameters":[{"name":"id","required":true,"in":"query","description":"Exact conversation/thread ID or turn ID; a turn selects its page when page is omitted","schema":{"maxLength":200,"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"type":"integer","minimum":1,"maximum":10000,"nullable":true}},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"integer"}},{"name":"errorsOnly","required":false,"in":"query","schema":{"default":"false","type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ConversationTimelinePageDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Chronological metadata only; excludes conversation and tool contents","tags":["admin-mcp-diagnostic"]}},"/v1/admin/mcp-diagnostics/conversation":{"get":{"operationId":"getMcpConversationDiagnostic","parameters":[{"name":"id","required":true,"in":"query","description":"Exact threadId, conversationId or turnId","schema":{"maxLength":200,"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/McpDiagnosticDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Partner conversation metadata and latest MCP decisions; no content or credentials","tags":["admin-mcp-diagnostic"]}},"/v1/admin/mcp-diagnostics/denials":{"get":{"operationId":"listMcpDenials","parameters":[{"name":"organizationId","required":false,"in":"query","schema":{"type":"string","maxLength":200,"nullable":true}},{"name":"serverId","required":false,"in":"query","schema":{"type":"string","maxLength":200,"nullable":true}},{"name":"agentId","required":false,"in":"query","schema":{"type":"string","maxLength":200,"nullable":true}},{"name":"reason","required":false,"in":"query","schema":{"type":"string","enum":["caller_mismatch","not_partner_turn","conversation_missing","conversation_inactive","actor_kind_mismatch","external_team_mismatch","external_user_mismatch","organization_mismatch","environment_mismatch","actor_mismatch","team_mismatch","agent_mismatch","tool_not_allowed_for_guest","server_not_trusted_context","server_missing","server_not_attached","credential_agent_mismatch","destination_mismatch","organization_inactive","thread_missing","thread_route_mismatch","agent_inactive","invalid_secret_key","context_missing","context_revoked","context_expired","context_owner_mismatch","context_version_changed","execution_denied","invalid_destination","invalid_owner","signing_unavailable","context_unavailable","external_turn","invalid_tool_name","duplicate_tool_name",null],"nullable":true}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"maximum":10000,"default":1,"type":"integer"}},{"name":"pageSize","required":false,"in":"query","schema":{"minimum":1,"maximum":100,"default":25,"type":"integer"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/McpDecisionPageDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Recent platform MCP denials, newest first","tags":["admin-mcp-diagnostic"]}},"/v1/admin/mcp-diagnostics/summary":{"get":{"operationId":"getMcpDenialSummary","parameters":[{"name":"agentId","required":false,"in":"query","schema":{"type":"string","maxLength":200,"nullable":true}},{"name":"serverId","required":false,"in":"query","schema":{"type":"string","maxLength":200,"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/McpDenialSummaryDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Denials in the last 24 hours by reason, for an agent or MCP server","tags":["admin-mcp-diagnostic"]}},"/v1/admin/orgs/{orgId}/credentials":{"get":{"operationId":"platformListOrganizationCredentials","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CredentialDto"}}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["adminOrganizationCredentials"]},"post":{"operationId":"platformCreateOrganizationCredential","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCredentialDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/IssuedCredentialDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["adminOrganizationCredentials"]}},"/v1/admin/orgs/{orgId}/credentials/{credentialId}/rotate":{"post":{"operationId":"platformRotateOrganizationCredential","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}},{"name":"credentialId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateCredentialDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/IssuedCredentialDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["adminOrganizationCredentials"]}},"/v1/admin/orgs/{orgId}/credentials/{credentialId}/revoke":{"post":{"operationId":"platformRevokeOrganizationCredential","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}},{"name":"credentialId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/CredentialDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["adminOrganizationCredentials"]}},"/v1/admin/access":{"get":{"operationId":"getPlatformAccess","parameters":[],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PlatformAdminDto"}}}]}}}},"403":{"description":"Not a platform administrator"}},"security":[{"bearer":[]}],"summary":"Confirm platform administrator access","tags":["admin"]}},"/v1/admin/orgs":{"get":{"operationId":"listPlatformOrganizations","parameters":[],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationDto"}}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["adminOrganizations"]}},"/v1/admin/orgs/{orgId}/request-rate":{"patch":{"operationId":"setPlatformOrganizationRequestRate","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRequestRateDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["adminOrganizations"]}},"/v1/admin/orgs/{orgId}/status":{"patch":{"operationId":"setPlatformOrganizationStatus","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationStatusDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["adminOrganizations"]}},"/v1/admin/auth/login":{"post":{"description":"Refuses anyone who is not a platform administrator with the same 401 as a wrong password.","operationId":"adminLogin","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginUserDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthDto"}}}}},"summary":"Sign in to the admin panel (platform administrators only)","tags":["admin-auth"]}},"/v1/admin/auth/refresh":{"post":{"description":"Re-reads the platform role, so a revoked administrator stops renewing at once.","operationId":"adminRefresh","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthDto"}}}}},"summary":"Renew an admin session","tags":["admin-auth"]}},"/v1/admin/auth/me":{"get":{"operationId":"adminMe","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Get the signed-in administrator","tags":["admin-auth"]}},"/v1/admin/auth/oidc/options":{"get":{"operationId":"adminOidcOptions","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcOptionsDto"}}}}},"summary":"","tags":["admin-oidc"]}},"/v1/admin/auth/oidc/login":{"get":{"operationId":"adminOidcLogin","parameters":[{"name":"challenge","required":true,"in":"query","schema":{"pattern":"^[A-Za-z0-9_-]{43}$","type":"string"}}],"responses":{"200":{"description":""}},"summary":"","tags":["admin-oidc"]}},"/v1/admin/auth/oidc/callback":{"get":{"operationId":"adminOidcCallback","parameters":[{"name":"state","required":false,"in":"query","schema":{"type":"string","maxLength":4096,"nullable":true}},{"name":"code","required":false,"in":"query","schema":{"type":"string","maxLength":4096,"nullable":true}},{"name":"error","required":false,"in":"query","schema":{"type":"string","maxLength":4096,"nullable":true}},{"name":"iss","required":false,"in":"query","schema":{"type":"string","maxLength":4096,"nullable":true}},{"name":"error_description","required":false,"in":"query","schema":{"type":"string","maxLength":4096,"nullable":true}},{"name":"session_state","required":false,"in":"query","schema":{"type":"string","maxLength":4096,"nullable":true}}],"responses":{"200":{"description":""}},"summary":"","tags":["admin-oidc"]}},"/v1/admin/auth/oidc/redeem":{"post":{"operationId":"adminOidcRedeem","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcRedeemDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcAuthDto"}}}}},"summary":"","tags":["admin-oidc"]}},"/v1/admin/auth/oidc/logout":{"post":{"operationId":"adminOidcLogout","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcLogoutDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OidcUrlDto"}}}}},"summary":"","tags":["admin-oidc"]}},"/v1/admin/agent/organization/{orgId}":{"get":{"operationId":"listPlatformOrganizationAgents","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","description":"Which page, 1-based.","schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"nullable":true}},{"name":"pageSize","required":false,"in":"query","description":"Rows per page. Capped at 100: this list has no \"all rows\" mode.","schema":{"type":"integer","minimum":1,"maximum":100,"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationAgentPageDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"","tags":["admin-overview"]}},"/v1/admin/agent/{id}/configuration":{"get":{"operationId":"getPlatformAgentConfiguration","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AgentConfigurationDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"","tags":["admin-overview"]}},"/v1/admin/team":{"get":{"operationId":"listPlatformTeams","parameters":[{"name":"sort","required":false,"in":"query","description":"Which column to order the whole list by, before it is cut into pages.","schema":{"type":"string","enum":["name","memberCount","agentCount","createdAt","lastActivityAt",null],"nullable":true}},{"name":"page","required":false,"in":"query","description":"Which page, 1-based.","schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"nullable":true}},{"name":"pageSize","required":false,"in":"query","description":"Rows per page. Capped at 100: this list has no \"all rows\" mode.","schema":{"type":"integer","minimum":1,"maximum":100,"nullable":true}},{"name":"direction","required":false,"in":"query","description":"Which way round. Omitted, each column opens the way it is most often wanted: words A-Z, numbers and dates biggest first. Rows with no value in the sorted column come last in BOTH directions.","schema":{"type":"string","enum":["asc","desc",null],"nullable":true}},{"name":"q","required":false,"in":"query","description":"Find rows containing this text, case-insensitively, in the columns the list publishes for searching — the id among them, matched anywhere inside it so a pasted identifier is found whole. The WHOLE list is searched and then paged, never the page. Blank or whitespace is no search at all.","schema":{"type":"string","maxLength":200,"example":"user-3f9c1b2e-…","nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/TeamOverviewPageDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Every team on the platform: size, age, and when it was last active","tags":["admin-overview"]}},"/v1/admin/team/{id}":{"get":{"operationId":"getPlatformTeam","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/TeamRecordDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"One team in full: who owns it, how big it is, and when it was last used","tags":["admin-overview"]}},"/v1/admin/user":{"get":{"operationId":"listPlatformUsers","parameters":[{"name":"sort","required":false,"in":"query","description":"Which column to order the whole list by. Not the teams column: a person can be in several, so that order has no single answer for their row.","schema":{"type":"string","enum":["email","name","createdAt",null],"nullable":true}},{"name":"membership","required":false,"in":"query","description":"Narrow by where the person sits. `none` = belongs to no team at all — the one person on the platform no other screen can walk to, because there is no team to walk from.","schema":{"type":"string","enum":["none",null],"nullable":true}},{"name":"page","required":false,"in":"query","description":"Which page, 1-based.","schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"nullable":true}},{"name":"pageSize","required":false,"in":"query","description":"Rows per page. Capped at 100: this list has no \"all rows\" mode.","schema":{"type":"integer","minimum":1,"maximum":100,"nullable":true}},{"name":"direction","required":false,"in":"query","description":"Which way round. Omitted, each column opens the way it is most often wanted: words A-Z, numbers and dates biggest first. Rows with no value in the sorted column come last in BOTH directions.","schema":{"type":"string","enum":["asc","desc",null],"nullable":true}},{"name":"q","required":false,"in":"query","description":"Find rows containing this text, case-insensitively, in the columns the list publishes for searching — the id among them, matched anywhere inside it so a pasted identifier is found whole. The WHOLE list is searched and then paged, never the page. Blank or whitespace is no search at all.","schema":{"type":"string","maxLength":200,"example":"user-3f9c1b2e-…","nullable":true}},{"name":"teamId","required":false,"in":"query","description":"Show only rows belonging to this team. Omitted = the whole platform.","schema":{"nullable":true,"example":"team-3f9c…","type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/UserOverviewPageDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Every person on the platform, with the teams they belong to and their role in each","tags":["admin-overview"]}},"/v1/admin/user/{id}":{"get":{"operationId":"getPlatformUser","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/UserRecordDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"One person in full: their teams and role in each, and whether they ever signed up","tags":["admin-overview"]}},"/v1/admin/agent":{"get":{"operationId":"listPlatformAgents","parameters":[{"name":"sort","required":false,"in":"query","description":"Which column to order the whole list by. Not the owner column: the owner's address is fetched after the page has been chosen.","schema":{"type":"string","enum":["name","teamName","type","status","createdAt",null],"nullable":true}},{"name":"status","required":false,"in":"query","description":"Only agents in this state.","schema":{"type":"string","enum":["active","disabled","archived",null],"nullable":true}},{"name":"type","required":false,"in":"query","description":"Only agents of this kind. A team's concierge is one of them.","schema":{"type":"string","enum":["standard","concierge",null],"nullable":true}},{"name":"page","required":false,"in":"query","description":"Which page, 1-based.","schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"nullable":true}},{"name":"pageSize","required":false,"in":"query","description":"Rows per page. Capped at 100: this list has no \"all rows\" mode.","schema":{"type":"integer","minimum":1,"maximum":100,"nullable":true}},{"name":"direction","required":false,"in":"query","description":"Which way round. Omitted, each column opens the way it is most often wanted: words A-Z, numbers and dates biggest first. Rows with no value in the sorted column come last in BOTH directions.","schema":{"type":"string","enum":["asc","desc",null],"nullable":true}},{"name":"q","required":false,"in":"query","description":"Find rows containing this text, case-insensitively, in the columns the list publishes for searching — the id among them, matched anywhere inside it so a pasted identifier is found whole. The WHOLE list is searched and then paged, never the page. Blank or whitespace is no search at all.","schema":{"type":"string","maxLength":200,"example":"user-3f9c1b2e-…","nullable":true}},{"name":"teamId","required":false,"in":"query","description":"Show only rows belonging to this team. Omitted = the whole platform.","schema":{"nullable":true,"example":"team-3f9c…","type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AgentOverviewPageDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Every agent on the platform: owner, team, type, status, autostart","tags":["admin-overview"]}},"/v1/admin/agent/{id}":{"get":{"operationId":"getPlatformAgent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AgentRecordDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"One agent in full: whose it is, whether it wakes itself, and how much it holds","tags":["admin-overview"]},"delete":{"operationId":"deletePlatformAgent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAgentDeleteDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AdminAgentDeletedDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Delete an agent and everything about it. Requires the agent’s name repeated back, and reports what went with it","tags":["admin-action"]}},"/v1/admin/agent/{id}/activity":{"get":{"operationId":"listPlatformAgentLog","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"turnId","required":false,"in":"query","description":"Only the rows of this turn — the id the browser received in the first frame of the stream, and the one a person quotes from the developer tools. Blank means every turn.","schema":{"type":"string","maxLength":80,"example":"turn-0d617e8d-273c-44b7-9b97-55fcd52cc697","nullable":true}},{"name":"limit","required":false,"in":"query","description":"Rows, newest first. Capped at 200.","schema":{"type":"integer","minimum":1,"maximum":200,"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AgentLogPageDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"The agent’s last turns with their outcome, and why a failed one failed — by turn id","tags":["admin-overview"]}},"/v1/admin/prompt":{"get":{"operationId":"listPromptLog","parameters":[{"name":"agentId","required":false,"in":"query","description":"Only this agent's recordings. Omitted = every agent.","schema":{"nullable":true,"example":"agent-3f9c…","type":"string"}},{"name":"teamId","required":false,"in":"query","description":"Only this team's recordings. Omitted = the whole platform.","schema":{"nullable":true,"example":"team-3f9c…","type":"string"}},{"name":"turnId","required":false,"in":"query","description":"Every model round-trip of one exchange.","schema":{"nullable":true,"example":"turn-3f9c…","type":"string"}},{"name":"page","required":false,"in":"query","description":"Which page, 1-based.","schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"nullable":true}},{"name":"pageSize","required":false,"in":"query","description":"Rows per page. Capped at 100: this list has no \"all rows\" mode.","schema":{"type":"integer","minimum":1,"maximum":100,"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PromptLogPageDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Recorded turn prompts, newest first — by agent, by team, by turn","tags":["admin-prompt-log"]}},"/v1/admin/prompt/volume":{"get":{"operationId":"getPromptLogVolume","parameters":[],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PromptLogVolumeDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"What recording currently costs: rows, bytes, and the retention window","tags":["admin-prompt-log"]}},"/v1/admin/prompt/{id}":{"get":{"operationId":"getPromptLogEntry","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PromptLogEntryDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"One recording in full: system prompt, conversation, tool schemas","tags":["admin-prompt-log"]}},"/v1/admin/audit":{"get":{"operationId":"listAdminAudit","parameters":[{"name":"targetType","required":false,"in":"query","description":"Only actions aimed at this kind of thing.","schema":{"type":"string","enum":["agent","team","user","setting",null],"nullable":true}},{"name":"targetId","required":false,"in":"query","description":"Everything that has been done to one thing — the record screens ask this.","schema":{"nullable":true,"example":"agent-3f9c…","type":"string"}},{"name":"teamId","required":false,"in":"query","description":"Everything done inside one tenant.","schema":{"nullable":true,"type":"string"}},{"name":"actorId","required":false,"in":"query","description":"Everything done by one administrator.","schema":{"nullable":true,"type":"string"}},{"name":"page","required":false,"in":"query","description":"Which page, 1-based.","schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"nullable":true}},{"name":"pageSize","required":false,"in":"query","description":"Rows per page. Capped at 100: this list has no \"all rows\" mode.","schema":{"type":"integer","minimum":1,"maximum":100,"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AuditPageDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"What administrators have done to tenants’ data: who, what, to what, when, and from what","tags":["admin-audit"]}},"/v1/admin/agent/{id}/consequences":{"get":{"operationId":"getPlatformAgentConsequences","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AdminAgentConsequenceDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"What would go with this agent if it were deleted — counted now, not remembered","tags":["admin-action"]}},"/v1/admin/agent/{id}/status":{"patch":{"operationId":"setPlatformAgentStatus","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAgentStatusDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AdminAgentStateDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Switch an agent off, or back on. Reversible, and nothing is destroyed either way","tags":["admin-action"]}},"/v1/admin/agent/{id}/prompt-recording":{"patch":{"operationId":"setPlatformAgentPromptRecording","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAgentPromptRecordingDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AdminAgentStateDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Enable or disable full prompt recording for platform diagnostics","tags":["admin-action"]}},"/v1/admin/team/{id}/name":{"patch":{"operationId":"renamePlatformTeam","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTeamRenameDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AdminTeamStateDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Rename a team. Reversible, and it touches nothing but the label","tags":["admin-action"]}},"/v1/admin/team/{id}/plan":{"patch":{"operationId":"changePlatformTeamPlan","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminTeamPlanChangeDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AdminTeamPlanDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Move a team onto a different tariff, or clear it. An administrative override for a team with no subscription — not billing's own write","tags":["admin-action"]}},"/v1/admin/llm-credentials":{"get":{"operationId":"listLlmCredentials","parameters":[],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/LlmCredentialListDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Every model key the platform holds: vendor, label, last four characters, state, and what has gone through it. Never the key itself.","tags":["admin-llm-credential"]},"post":{"operationId":"addLlmCredential","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLlmCredentialDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/LlmCredentialDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Add a model key. The value is sealed on arrival and no endpoint returns it, including this one.","tags":["admin-llm-credential"]}},"/v1/admin/llm-credentials/{id}":{"patch":{"operationId":"updateLlmCredential","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLlmCredentialDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/LlmCredentialDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Rename a key. The label is the only editable field: sending vendor or secret is refused with a reason rather than ignored.","tags":["admin-llm-credential"]}},"/v1/admin/llm-credentials/{id}/secret":{"put":{"operationId":"replaceLlmCredentialSecret","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceLlmCredentialSecretDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/LlmCredentialDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Put a new value into an existing key — it expired or leaked. Levels, counters and history stay on the row. Neither the old value nor the new one is returned, by this or any endpoint.","tags":["admin-llm-credential"]}},"/v1/admin/llm-credentials/{id}/tiers":{"patch":{"operationId":"setLlmCredentialTiers","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLlmCredentialTiersDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/LlmCredentialDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Change which model levels a key serves. An empty list means every level. Takes effect on the next model call, in every api replica.","tags":["admin-llm-credential"]}},"/v1/admin/llm-credentials/{id}/disable":{"post":{"operationId":"disableLlmCredential","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/LlmCredentialDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Take a key out of service. The row and its counters stay — this is what \"delete\" means here.","tags":["admin-llm-credential"]}},"/v1/admin/llm-credentials/{id}/enable":{"post":{"operationId":"enableLlmCredential","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/LlmCredentialDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Put a key an operator had switched off back into service.","tags":["admin-llm-credential"]}},"/v1/admin/llm-credentials/{id}/revive":{"post":{"operationId":"reviveLlmCredential","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/LlmCredentialDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Return a resting key to the pool before its time, or clear a key the vendor refused once a person has dealt with it.","tags":["admin-llm-credential"]}},"/v1/admin/settings":{"get":{"operationId":"listPlatformSettings","parameters":[],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PlatformSettingListDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Every platform setting — configured or not, with where its value is coming from. A secret’s value is never among them","tags":["admin-setting"]}},"/v1/admin/settings/secrets":{"get":{"operationId":"listPlatformSecrets","parameters":[],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/SecretInventoryDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Every secret the code declares, and whether it is filled — never a value, for anybody","tags":["admin-setting"]}},"/v1/admin/settings/{code}":{"put":{"operationId":"savePlatformSetting","parameters":[{"name":"code","required":true,"in":"path","schema":{"type":"string"}},{"name":"scopeKey","required":false,"in":"query","description":"The tariff, for a plan-scoped setting (e.g. `free`, `pro`). Required for one, and REFUSED for a platform setting rather than ignored — a platform ceiling belongs to the installation, and accepting a tariff for it is how somebody widens the wrong one.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePlatformSettingDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PlatformSettingDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Save one setting. A rejected save changes nothing — the previous value stays in force","tags":["admin-setting"]},"delete":{"operationId":"resetPlatformSetting","parameters":[{"name":"code","required":true,"in":"path","schema":{"type":"string"}},{"name":"version","required":true,"in":"query","schema":{"type":"number"}},{"name":"scopeKey","required":false,"in":"query","description":"The tariff, for a plan-scoped setting.","schema":{}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PlatformSettingDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Reset an ordinary value to its inherited default, or clear a secret without env fallback","tags":["admin-setting"]}},"/v1/admin/settings/{code}/test":{"post":{"operationId":"testSettingConnection","parameters":[{"name":"code","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingVersionDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PlatformSettingDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Test credential access; does not claim full inference verification","tags":["admin-setting"]}},"/v1/admin/settings/{code}/rotate":{"post":{"operationId":"rotateSettingSecret","parameters":[{"name":"code","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingVersionDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PlatformSettingDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Reseal using SETTINGS_KEY; previous keys decrypt existing data","tags":["admin-setting"]}},"/v1/admin/usage-prices":{"get":{"operationId":"listUsagePrices","parameters":[],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/UsagePriceListDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Every rate ever declared, in force or expired, plus how much spend since this api started has gone unpriced, plus which selected models have no rate yet.","tags":["admin-usage-price"]},"post":{"operationId":"addUsagePrice","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUsagePriceDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/UsagePriceAddResultDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Declare a new rate. Refused if its period overlaps an existing rate for the same vendor, model, kind and unit — close that one first.","tags":["admin-usage-price"]}},"/v1/admin/usage-prices/{id}/close":{"post":{"operationId":"closeUsagePrice","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseUsagePriceDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/UsagePriceDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"End an open rate at the given instant. The correct way to retire a rate — refused if it is already closed.","tags":["admin-usage-price"]}},"/v1/admin/usage-prices/{id}/note":{"patch":{"operationId":"setUsagePriceNote","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUsagePriceNoteDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/UsagePriceDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Change a rate's note — where the number came from. The one field that carries no computation.","tags":["admin-usage-price"]}},"/v1/admin/team/{id}/usage":{"get":{"operationId":"getPlatformTeamUsage","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AdminTeamUsageDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Which models a team's agents used this period, and what each cost the platform","tags":["admin-usage"]}},"/v1/agents/draft/options":{"get":{"operationId":"getAgentDraftOptions","parameters":[{"name":"teamId","required":true,"in":"query","schema":{"maxLength":160,"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DraftOptionDto"}}}}]}}}}},"summary":"Available creation capabilities for this team","tags":["agent-draft"]}},"/v1/agents/draft":{"post":{"operationId":"generateAgentDraft","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftRequestDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/DraftReplyDto"}}}]}}}}},"summary":"Prepare an editable draft without creating an agent or conversation","tags":["agent-draft"]}},"/v1/agents/from-draft":{"post":{"operationId":"createAgentFromDraft","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDraftDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/CreatedDraftDto"}}}]}}}}},"summary":"Create an agent and report any capabilities that could not be configured","tags":["agent-draft"]}},"/v1/orgs/{orgId}/agents":{"get":{"operationId":"listOrganizationAgents","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationAgentDto"}}}}]}}}}},"security":[{"bearer":[]}],"summary":"Read safe agent configuration across an organization (owner/admin only)","tags":["organizationAgents"]}},"/v1/agents":{"get":{"operationId":"getAgents","parameters":[{"name":"teamId","required":false,"in":"query","schema":{"nullable":true,"example":"team-3f9c…","type":"string"}},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["active","disabled","archived","idle",null],"nullable":true}},{"name":"type","required":false,"in":"query","description":"Restrict to one type. Omitted = every type, concierge included.","schema":{"type":"string","enum":["standard","concierge",null],"nullable":true}},{"name":"includeArchived","required":false,"in":"query","description":"Include archived agents (hidden by default)","schema":{"nullable":true,"type":"boolean"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentDto"}}}}]}}}}},"summary":"List a team's agents (archived hidden by default)","tags":["agents"]},"post":{"operationId":"createAgent","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AgentDto"}}}]}}}}},"summary":"Create an agent (a DB row — instantly usable)","tags":["agents"]}},"/v1/agents/{id}/pin":{"post":{"operationId":"pinAgent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AgentPinDto"}}}]}}}}},"summary":"Pin an agent for the current user","tags":["agents"]},"delete":{"operationId":"unpinAgent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AgentPinDto"}}}]}}}}},"summary":"Unpin an agent for the current user","tags":["agents"]}},"/v1/agents/{id}":{"get":{"operationId":"getAgent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AgentDto"}}}]}}}}},"summary":"Get agent by ID","tags":["agents"]},"patch":{"operationId":"updateAgent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AgentDto"}}}]}}}}},"summary":"Update an agent","tags":["agents"]},"delete":{"operationId":"deleteAgent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Agent deleted","content":{"application/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","nullable":true,"example":null}}}}}}},"summary":"Delete an agent (prefer archive)","tags":["agents"]}},"/v1/agents/{id}/disable":{"post":{"operationId":"disableAgent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AgentDto"}}}]}}}}},"summary":"Disable an agent (retains all data)","tags":["agents"]}},"/v1/agents/{id}/enable":{"post":{"operationId":"enableAgent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AgentDto"}}}]}}}}},"summary":"Re-enable a disabled agent","tags":["agents"]}},"/v1/agents/{id}/archive":{"post":{"operationId":"archiveAgent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AgentDto"}}}]}}}}},"summary":"Archive an agent (hidden but recoverable)","tags":["agents"]}},"/v1/orgs/{orgId}/teams/{teamId}/agents/{agentId}":{"get":{"operationId":"getScopedAgent","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ScopedAgentDto"}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Read an agent summary in the active actor’s team","tags":["scopedAgents"]}},"/v1/teams/{teamId}/skills":{"get":{"operationId":"listTeamSkills","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/SkillListDto"}}}]}}}}},"summary":"Every skill this team has — its name, its one-line description, who created it and which agents use it (team-gated)","tags":["skill"]},"post":{"operationId":"createTeamSkill","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSkillDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/SkillDto"}}}]}}}}},"summary":"Write a new skill for the team. It belongs to the team and is attached to no agent until somebody connects it (team-gated)","tags":["skill"]}},"/v1/teams/{teamId}/skills/{skillId}":{"get":{"operationId":"getTeamSkill","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"skillId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/SkillListItemDto"}}}]}}}}},"summary":"One skill of this team, for a screen opened straight from a link (team-gated)","tags":["skill"]},"patch":{"operationId":"updateTeamSkill","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"skillId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSkillDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/SkillDto"}}}]}}}}},"summary":"Rewrite a skill. ONE write — every agent using it reads the new text, because there is no per-agent copy (team-gated)","tags":["skill"]},"delete":{"operationId":"deleteTeamSkill","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"skillId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"summary":"Destroy a skill, and with it every agent`s use of it. The only road that takes a skill away from an agent that is using it (team-gated)","tags":["skill"]}},"/v1/agents/{agentId}/skills":{"get":{"operationId":"listAgentSkills","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/SkillListDto"}}}]}}}}},"summary":"The skills this agent uses — the team`s skills, not copies of them","tags":["agent-skills"]},"post":{"operationId":"attachAgentSkill","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachSkillDto"}}}},"responses":{"204":{"description":""}},"summary":"Start using one of the team`s skills. Nothing is copied — the agent reads the same text everybody else does. Idempotent","tags":["agent-skills"]}},"/v1/agents/{agentId}/skills/{skillId}":{"delete":{"operationId":"detachAgentSkill","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"skillId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"summary":"Stop using it. The skill stays and every other agent using it is untouched — this deletes one connection and nothing else. Idempotent","tags":["agent-skills"]}},"/v1/teams/{teamId}/skills/{skillId}/files":{"get":{"operationId":"listSkillFiles","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"skillId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/SkillFileListDto"}}}]}}}}},"summary":"The files this skill carries besides its text — their paths, sizes and short-lived links, plus what a skill is allowed to hold (team-gated)","tags":["skill-files"]},"post":{"operationId":"uploadSkillFile","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"skillId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"},"path":{"type":"string","description":"Where it sits inside the skill — `reference/deadlines.csv`. Defaults to the uploaded file`s own name when omitted"}}}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/SkillFileDto"}}}]}}}}},"summary":"Add one file to a skill, or replace the one already at that path. Refused with the actual limit when the file, the skill`s total, or its file count would be exceeded (team-gated)","tags":["skill-files"]}},"/v1/teams/{teamId}/skills/{skillId}/files/{fileId}":{"delete":{"operationId":"deleteSkillFile","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"skillId","required":true,"in":"path","schema":{"type":"string"}},{"name":"fileId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"summary":"Take one file off a skill. The skill and its text stay, and so does every other file (team-gated)","tags":["skill-files"]}},"/v1/teams/{teamId}/skills/install":{"post":{"operationId":"installTeamSkillFromLink","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallSkillFromLinkDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/SkillListItemDto"}}}]}}}}},"summary":"Install a skill from a GitHub link. The link, the version pulled and the date are kept, so it can be updated later — and nothing is executed: a skill is text and files (team-gated)","tags":["skill"]}},"/v1/teams/{teamId}/skills/{skillId}/source":{"get":{"operationId":"getTeamSkillSource","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"skillId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/SkillSourceStatusDto"}}}]}}}}},"summary":"What the source has now: the version up there, whether it is newer than the one installed, and whether this skill has been edited since it was pulled. Changes nothing (team-gated)","tags":["skill"]}},"/v1/teams/{teamId}/skills/{skillId}/source/update":{"post":{"operationId":"updateTeamSkillFromSource","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"skillId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSkillFromSourceDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/SkillSourceUpdateDto"}}}]}}}}},"summary":"Take what the source has now. Refused with `SKILL_LOCALLY_MODIFIED` if the skill was edited here, until the same call is made with `overwriteLocalChanges` — an edit is never overwritten silently (team-gated)","tags":["skill"]}},"/v1/teams/{teamId}/knowledge/folders":{"get":{"operationId":"listKnowledgeFolders","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/KnowledgeFolderListDto"}}}]}}}}},"summary":"The team`s knowledge folders — how many documents are in each, whether it is closed, and which agents hold a key to it. Any member (team-gated)","tags":["knowledge"]},"post":{"operationId":"createKnowledgeFolder","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKnowledgeFolderDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/KnowledgeFolderDto"}}}]}}}}},"summary":"Make a folder. OPEN by default — every agent of the team reads it. Made closed, or closed later, it is read only by the agents given access, and by nobody at all until somebody is. Owner or admin only (team-gated)","tags":["knowledge"]}},"/v1/teams/{teamId}/knowledge/folders/{folderId}":{"patch":{"operationId":"updateKnowledgeFolder","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"folderId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateKnowledgeFolderDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/KnowledgeFolderDto"}}}]}}}}},"summary":"Rename a folder, or close and open it. An absent field is left alone. The general folder can be renamed but never closed. Owner or admin only (team-gated)","tags":["knowledge"]},"delete":{"operationId":"deleteKnowledgeFolder","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"folderId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"summary":"Remove an EMPTY folder. A folder that still holds documents is refused rather than emptied — moving its documents into the open folder would publish them and deleting them would destroy files. The general folder cannot be removed. Owner or admin only (team-gated)","tags":["knowledge"]}},"/v1/teams/{teamId}/knowledge/folders/{folderId}/agents/{agentId}":{"put":{"operationId":"grantKnowledgeFolderAccess","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"folderId","required":true,"in":"path","schema":{"type":"string"}},{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"summary":"Let this agent read this closed folder. Idempotent. Refused on an OPEN folder, where every agent reads it anyway and a key written now would silently become the only access list the day it is closed. Owner or admin only (team-gated)","tags":["knowledge"]},"delete":{"operationId":"revokeKnowledgeFolderAccess","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"folderId","required":true,"in":"path","schema":{"type":"string"}},{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"summary":"Take this agent`s access to this closed folder away. Revoking access nobody had is not an error. Owner or admin only (team-gated)","tags":["knowledge"]}},"/v1/teams/{teamId}/knowledge":{"get":{"operationId":"listKnowledgeDocuments","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/KnowledgeDocumentListDto"}}}]}}}}},"summary":"The documents this team has put into its knowledge — their sizes, how many pieces each was cut into, and what a document is allowed to be (team-gated)","tags":["knowledge"]},"post":{"operationId":"uploadKnowledgeDocument","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"At most 20971520 bytes and 2500000 characters of text, and one of .txt, .md, .markdown, .text, .pdf, .docx, .xlsx, .csv, .tsv. A PDF with no text layer — a scan — is REFUSED rather than stored empty, and the answer says so"},"name":{"type":"string","description":"What to call it in the corpus, and the key a re-upload replaces. Defaults to the uploaded file`s own name"},"folderId":{"type":"string","description":"Which folder to put it in. Omitted, a NEW document goes to the team`s general folder and a re-upload STAYS WHERE IT IS — so an unattended sync cannot move a document out of a closed folder by saying nothing"}}}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/KnowledgeUploadDto"}}}]}}}}},"summary":"Put a document into the team`s knowledge: text, Markdown, PDF, Word or a spreadsheet. It is cut into pieces — prose by paragraph, a table by whole rows carrying their column names — embedded, and becomes findable by meaning. The answer says what was actually read out of the file. Uploading the same name again REPLACES it, and identical bytes cost nothing. Owner or admin only; refused when the ingest would cost more than the team has left this period (team-gated)","tags":["knowledge"]}},"/v1/teams/{teamId}/knowledge/{documentId}":{"get":{"operationId":"getKnowledgeDocument","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/KnowledgeDocumentDto"}}}]}}}}},"summary":"One document, with a short-lived link to the original file. Another team`s id answers «not found», exactly as an id that never existed does (team-gated)","tags":["knowledge"]},"patch":{"operationId":"moveKnowledgeDocument","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveKnowledgeDocumentDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/KnowledgeDocumentDto"}}}]}}}}},"summary":"Move a document into another folder — which also changes which of the team`s agents may read it. The document and the vectors made from it move together and nothing is re-embedded, so rearranging folders costs nothing. Owner or admin only (team-gated)","tags":["knowledge"]},"delete":{"operationId":"deleteKnowledgeDocument","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"documentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"summary":"Take a document out of the team`s knowledge — its text, its pieces and the vectors made from them. Owner or admin only (team-gated)","tags":["knowledge"]}},"/v1/teams/{teamId}/knowledge/archive":{"post":{"operationId":"uploadKnowledgeArchive","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary","description":"A .zip of at most 20971520 bytes, holding at most 50 files. Each file inside it must be one of .txt, .md, .markdown, .text, .pdf, .docx, .xlsx, .csv, .tsv; anything else gets a row saying so rather than stopping the rest. An entry whose path leads outside the archive is refused, and an entry that unpacks to more than a document may be is stopped BEFORE it is unpacked, on the size the archive itself declares"},"folderId":{"type":"string","description":"Where files at the ROOT of the archive go. Files in a directory inside the archive ignore it — their directory is their folder. Omitted, a new document goes to the team`s general folder and one that already exists STAYS WHERE IT IS"}}}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/KnowledgeArchiveDto"}}}]}}}}},"summary":"Put a WHOLE ZIP into the team`s knowledge and let the api unpack it. Directories inside the archive become folders of the knowledge, so an arrangement somebody already has on their disk survives the upload instead of collapsing into one heap. Every file gets its own verdict — added, replaced, unchanged or refused with the reason — because at twenty files «something was not accepted» is useless. Answers 200 with that report even when every file was refused; the archive ITSELF is refused with a 400. Owner or admin only (team-gated)","tags":["knowledge"]}},"/v1/teams/{teamId}/knowledge/search":{"post":{"operationId":"searchKnowledge","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchKnowledgeDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/KnowledgeSearchDto"}}}]}}}}},"summary":"Find the passages in this team`s documents that answer a question — by meaning and by the words it contains, fused into one list. An empty list means nothing answered it; a search that could not run FAILS instead. Any member; costs one small model call (team-gated), and the word half costs nothing","tags":["knowledge"]}},"/v1/agents/{id}/heartbeat":{"get":{"operationId":"getAgentHeartbeat","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatStatusDto"}}}}},"summary":"Read an agent's heartbeat config + liveness status (team-gated)","tags":["agent-heartbeat"]},"put":{"operationId":"updateAgentHeartbeat","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateHeartbeatDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatStatusDto"}}}}},"summary":"Update an agent's heartbeat config (partial upsert, team-gated)","tags":["agent-heartbeat"]}},"/v1/agents/{id}/heartbeat/conversations":{"get":{"operationId":"listAgentConversationSchedules","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConversationScheduleDto"}}}}}},"summary":"Schedules other people left with this agent, one per conversation (team-gated)","tags":["agent-heartbeat"]},"delete":{"operationId":"deleteAgentConversationSchedule","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"channel","required":true,"in":"query","schema":{"type":"string"}},{"name":"channelUserId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Delete one conversation's schedule (team-gated)","tags":["agent-heartbeat"]}},"/v1/agents/{id}/activity":{"get":{"operationId":"listAgentActivity","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"kind","required":false,"in":"query","description":"Show only these kinds — repeat the parameter, or send it comma-separated. Absent means all eight.","schema":{"type":"array","items":{"type":"string","enum":["check","answer","silent_tick","tick_failed","agent_created","agent_archived","heartbeat_updated","heartbeat_boosted","memory_written","device_used","worker_session","grant_changed"]},"nullable":true}},{"name":"initiator","required":false,"in":"query","description":"«попросили» (human) or «сам» (agent). Absent means both.","schema":{"type":"string","enum":["human","agent",null],"nullable":true}},{"name":"since","required":false,"in":"query","description":"Only events at or after this instant (ISO 8601)","schema":{"type":"string","format":"date-time","nullable":true}},{"name":"until","required":false,"in":"query","description":"Only events at or before this instant (ISO 8601)","schema":{"type":"string","format":"date-time","nullable":true}},{"name":"q","required":false,"in":"query","description":"Free text, matched case-insensitively against what the row says","schema":{"type":"string","maxLength":200,"nullable":true}},{"name":"code","required":false,"in":"query","description":"Event codes the caller resolved from `q` against its own phrase catalogue (AGNT2-258). The sentence is no longer stored, so the server cannot match a search against it — only the screen knows which language it is drawing in, so only the screen can say which codes a typed word names. OR-ed with `q`; sent alone it is a plain \"only these codes\" filter.","schema":{"type":"array","items":{"type":"string","enum":["fill_secret.created","fill_secret.used","fill_secret.refused","check.scheduled","check.rescheduled","check.ready","check.gave_up","check.cancelled","tick.answered","tick.silent","tick.owner_not_in_team","tick.failed","tick.team_quota_exhausted","answer.given","answer.interrupted","answer.failed","memory.nothing_to_write","memory.written","memory.refused","memory.gave_up","turn.mutation_limit","agent.created","agent.create_refused","agent.archived","agent.restored","agent.archive_refused","agent.restore_refused","heartbeat.updated","heartbeat.unchanged","heartbeat.schedule_in_tick","heartbeat.stale_enable","heartbeat.update_refused","boost.started","boost.refused","boost.stopped","boost.stop_refused","device.picture_taken","device.tool_called","device.offline","device.too_often","device.tool_failed","device.foreign","session.started","session.stopped","session.tool_called","session.artifact","grant.changed","grant.refused","grant.requested","grant.approved","legacy"]},"nullable":true}},{"name":"limit","required":false,"in":"query","description":"Rows to return (default 50, max 200)","schema":{"type":"integer","minimum":1,"maximum":200,"nullable":true}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor from a previous page’s `nextCursor` — returns the rows strictly OLDER than it","schema":{"nullable":true,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityPageDto"}}}}},"summary":"One page of an agent's activity — answers, changes and refusals (team-gated)","tags":["agent-activity"]}},"/v1/agents/{id}/run":{"post":{"operationId":"runAgent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunAgentDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunResultDto"}}}}},"summary":"Run a turn: load the agent's soul and run the LLM loop (watch the logs)","tags":["agents"]}},"/v1/agents/{id}/run/stream":{"post":{"operationId":"streamAgent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunAgentDto"}}}},"responses":{"201":{"description":""}},"summary":"Stream a turn as SSE: live thinking + tool calls over the loop (team-gated).","tags":["agents"]}},"/v1/agents/{id}/run/form/stream":{"post":{"operationId":"submitAgentChatForm","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitChatFormDto"}}}},"responses":{"201":{"description":""}},"summary":"Answer a form the agent showed, and stream the turn it drives (team-gated).","tags":["agents"]}},"/v1/agents/{id}/run/live":{"get":{"operationId":"listLiveAgentTurns","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LiveTurnDto"}}}}}},"summary":"Your turns with this agent that are still running (team-gated).","tags":["agents"]}},"/v1/agents/{id}/run/{turnId}":{"get":{"operationId":"getAgentTurnStatus","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"turnId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveTurnStatusDto"}}}}},"summary":"Whether your turn is still running, and how it ended (team-gated).","tags":["agents"]}},"/v1/agents/{id}/run/{turnId}/stop":{"post":{"operationId":"stopAgentTurn","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"turnId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopTurnResultDto"}}}}},"summary":"Stop your running turn — the only thing that cancels a streamed turn (team-gated).","tags":["agents"]}},"/v1/agents/{id}/chat/threads":{"get":{"operationId":"listAgentChatThreads","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Rows to return (default 50, max 200)","schema":{"type":"integer","minimum":1,"maximum":200,"nullable":true}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor from a previous page’s `nextCursor` — returns the rows strictly OLDER than it","schema":{"nullable":true,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatThreadPageDto"}}}}},"summary":"List an agent's conversation threads, newest page first (team-gated)","tags":["agent-chat"]}},"/v1/agents/{id}/chat/threads/{threadId}/messages":{"get":{"operationId":"listAgentChatThreadMessages","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"threadId","required":true,"in":"path","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Rows to return (default 50, max 200)","schema":{"type":"integer","minimum":1,"maximum":200,"nullable":true}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor from a previous page’s `nextCursor` — returns the rows strictly OLDER than it","schema":{"nullable":true,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessagePageDto"}}}}},"summary":"List a thread's messages ordered by ts, incl. origin (team-gated)","tags":["agent-chat"]}},"/v1/agents/{id}/chat/messages":{"get":{"operationId":"listAgentChatMessages","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Rows to return (default 50, max 200)","schema":{"type":"integer","minimum":1,"maximum":200,"nullable":true}},{"name":"cursor","required":false,"in":"query","description":"Opaque cursor from a previous page’s `nextCursor` — returns the rows strictly OLDER than it","schema":{"nullable":true,"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessagePageDto"}}}}},"summary":"List the caller's web-chat messages with an agent (team-gated)","tags":["agent-chat"]},"delete":{"operationId":"clearAgentChat","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearChatDto"}}}}},"summary":"Delete the caller's web conversation with an agent (team-gated)","tags":["agent-chat"]}},"/v1/agents/{id}/chat/turns":{"get":{"operationId":"listAgentChatTurns","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"ids","required":true,"in":"query","description":"The exchanges to report on. Repeat the parameter or comma-separate; at most 100","schema":{"maxItems":100,"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatTurnPageDto"}}}}},"summary":"What a page of exchanges cost, and which of them were recorded (team-gated)","tags":["agent-chat"]}},"/v1/agents/{id}/chat/turns/{turnId}/trace":{"get":{"operationId":"listAgentChatTurnTrace","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"turnId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatTurnTraceStepsDto"}}}}},"summary":"The recorded prompts of one exchange, step order, light half (team-gated)","tags":["agent-chat"]}},"/v1/agents/{id}/chat/turns/{turnId}/trace/{recordingId}":{"get":{"operationId":"getAgentChatTurnTraceStep","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"recordingId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptLogEntryDto"}}}}},"summary":"One recorded round-trip of an exchange, in full (team-gated)","tags":["agent-chat"]}},"/v1/agents/{id}/chat/restart":{"post":{"operationId":"restartAgentChat","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestartChatDto"}}}}},"summary":"Draw a line under the caller's conversation with an agent (team-gated)","tags":["agent-chat"]}},"/v1/agents/{id}/chat/attachments":{"post":{"operationId":"uploadAgentChatAttachment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadChatAttachmentDto"}}}}},"summary":"Attach a file to the caller's conversation with an agent (team-gated)","tags":["agent-chat"]}},"/v1/agents/{id}/chat/video-uploads":{"post":{"operationId":"beginAgentVideoUpload","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BeginVideoUploadDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoUploadDto"}}}}},"summary":"","tags":["agent-chat"]}},"/v1/agents/{id}/chat/video-uploads/{attachmentId}/complete":{"post":{"operationId":"completeAgentVideoUpload","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"attachmentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadChatAttachmentDto"}}}}},"summary":"","tags":["agent-chat"]}},"/v1/teams/{teamId}/chat/conversations":{"get":{"operationId":"listTeamConversations","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentConversationDto"}}}}]}}}}},"summary":"Every agent's newest message for one team, newest first (team-gated)","tags":["agent-chat"]}},"/v1/teams/{teamId}/chat/leads/{leadId}/conversations":{"get":{"operationId":"listLeadConversations","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LeadConversationDto"}}}}]}}}}},"summary":"Every conversation of one of the team's website visitors, newest first, across all its agents (team-gated)","tags":["agent-chat"]}},"/v1/agents/{id}/memory/index":{"post":{"operationId":"ingestAgentMemory","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/MemoryIngestDto"}}}]}}}}},"summary":"Embed everything this agent remembers that is not already embedded under the current model and width, so it can be found by meaning. Costs one provider call per batch, refuses when the team has spent its period, and FAILS rather than reporting zero when no embedding provider is configured (team-gated)","tags":["agent-memory"]}},"/v1/agents/{id}/memory":{"get":{"operationId":"getAgentMemory","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentMemoryDto"}}}}},"summary":"Everything an agent remembers — curated page and dated notes (team-gated)","tags":["agent-memory"]}},"/v1/agents/{id}/memory/{memoryId}":{"patch":{"operationId":"rewriteAgentMemoryNote","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"memoryId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RewriteMemoryNoteDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryNoteDto"}}}}},"summary":"Correct one remembered note — replaces its whole text (team-gated)","tags":["agent-memory"]},"delete":{"operationId":"forgetAgentMemory","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"memoryId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgetMemoryDto"}}}}},"summary":"Erase one remembered note (team-gated, idempotent)","tags":["agent-memory"]}},"/v1/teams/{teamId}/leads":{"get":{"operationId":"listTeamLeads","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"Find a PERSON: matches their name, email or telephone, case-insensitively, as a substring. Never matches the text of a message.","schema":{"type":"string","maxLength":200,"nullable":true}},{"name":"limit","required":false,"in":"query","description":"People to return (default 50, max 200)","schema":{"type":"integer","minimum":1,"maximum":200,"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/LeadListDto"}}}]}}}}},"summary":"The team's people from outside — who wrote, when, and how often — newest first, optionally narrowed by name, email or telephone (team-gated)","tags":["lead"]}},"/v1/teams/{teamId}/leads/{leadId}":{"get":{"operationId":"getTeamLead","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/LeadListItemDto"}}}]}}}}},"summary":"One person of this team, for a screen opened straight from a link (team-gated)","tags":["lead"]},"delete":{"operationId":"deleteTeamLead","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Erase this person: the row and every line of their persona. Their conversations are kept — words and attached pictures alike — and lose the person they were attached to (team-gated)","tags":["lead"]}},"/v1/teams/{teamId}/leads/{leadId}/persona":{"get":{"operationId":"getLeadPersona","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/LeadPersonaDto"}}}]}}}}},"summary":"What the agents have learned about this one person — every line marked with whether the person merely SAID it or a member of the team wrote it (team-gated)","tags":["lead"]}},"/v1/teams/{teamId}/leads/{leadId}/persona/{entryId}":{"patch":{"operationId":"rewriteLeadPersonaEntry","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}},{"name":"entryId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RewriteLeadPersonaDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/LeadPersonaEntryDto"}}}]}}}}},"summary":"Correct one line. The corrected line becomes the TEAM's, because a person of this business has now read it and said what it should say (team-gated)","tags":["lead"]},"delete":{"operationId":"deleteLeadPersonaEntry","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}},{"name":"entryId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Erase one line of what is known about this person (team-gated)","tags":["lead"]}},"/v1/leads/{leadId}":{"get":{"operationId":"getLead","parameters":[{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/LeadListItemDto"}}}]}}}}},"summary":"One person by their own id, with no team named — the team is derived from the lead and the caller must be a member of it. Answers the same row as the team-scoped read, and the same not-found for a lead that does not exist and one that is not yours","tags":["lead"]}},"/v1/teams/{teamId}/leads/{leadId}/persona/reading":{"get":{"operationId":"getLeadPersonaReading","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/LeadPersonaReadingDto"}}}]}}}}},"summary":"How far the agents have read through this person's conversations — which is what decides whether an empty persona can still fill up on its own (team-gated)","tags":["lead"]},"post":{"operationId":"rereadLeadPersona","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/LeadPersonaRereadDto"}}}]}}}}},"summary":"Read every one of this person's conversations again from the beginning, ignoring how far a previous pass got. Costs one model call per conversation and can only add to this person's file (team-gated)","tags":["lead"]}},"/v1/worker-video/content":{"get":{"operationId":"downloadWorkerVideo","parameters":[{"name":"capability","required":true,"in":"query","schema":{"type":"string"}},{"name":"authorization","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Session-bound video capability (worker only)","tags":["VideoAttachment"]}},"/v1/agents/{id}/worker/view":{"get":{"operationId":"getAgentWorkerView","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WorkerViewStoppedDto"},{"$ref":"#/components/schemas/WorkerViewLiveDto"}]}}}},"429":{"description":"One capture per agent per two seconds; Retry-After: 2"},"503":{"description":"Observation transport unavailable or worker image unsupported"}},"summary":"Observe the current browser tab without waking or extending the worker","tags":["worker-view"]}},"/v1/orgs/{orgId}/agents/{id}/worker/view":{"get":{"operationId":"getPartnerWorkerView","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"authorization","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WorkerViewStoppedDto"},{"$ref":"#/components/schemas/WorkerViewLiveDto"}]}}}},"429":{"description":"Retry-After: 2"},"503":{"description":"Observation unavailable"}},"summary":"Observe an organization agent browser; requires worker:logs:read","tags":["worker-view"]}},"/v1/agents/{id}/worker/events":{"get":{"operationId":"streamAgentWorkerEvents","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Watch this agent's worker while it works: status, activity, artifacts (team-gated)","tags":["agent-worker"]}},"/v1/agents/{id}/worker":{"get":{"operationId":"getAgentWorker","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentWorkerDto"}}}}},"summary":"This agent's hands: its grant, its state, and its recent sessions (team-gated)","tags":["agent-worker"]}},"/v1/agents/{id}/worker/options":{"get":{"operationId":"getAgentWorkerOptions","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentWorkerOptionsDto"}}}}},"summary":"The presets and the tool names this installation can offer this agent (team-gated)","tags":["agent-worker"]}},"/v1/agents/{id}/worker/grant":{"put":{"operationId":"writeAgentWorkerGrant","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteAgentWorkerGrantDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentWorkerDto"}}}}},"summary":"Give this agent hands, or take them away — profile, tools and destinations","tags":["agent-worker"]}},"/v1/agents/{id}/worker/image/{imageId}":{"get":{"operationId":"getAgentWorkerImage","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"imageId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentWorkerImageDto"}}}}},"summary":"A picture this agent’s worker took, base64 (team-gated)","tags":["agent-worker"]}},"/v1/agents/{id}/worker/sessions":{"get":{"operationId":"listAgentWorkerLogSessions","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"minimum":0,"maximum":1000000,"default":0,"type":"integer"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":10000,"default":100,"type":"integer"}},{"name":"tail","required":false,"in":"query","schema":{"minimum":0,"maximum":10000,"default":0,"type":"integer"}},{"name":"turnId","required":false,"in":"query","schema":{"type":"string","maxLength":160,"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/WorkerLogHistoryDto"}}}]}}}}},"summary":"","tags":["worker-logs"]}},"/v1/agents/{id}/worker/sessions/{sessionId}/log":{"get":{"operationId":"getAgentWorkerLog","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"sessionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"minimum":0,"maximum":1000000,"default":0,"type":"integer"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":10000,"default":100,"type":"integer"}},{"name":"tail","required":false,"in":"query","schema":{"minimum":0,"maximum":10000,"default":0,"type":"integer"}},{"name":"turnId","required":false,"in":"query","schema":{"type":"string","maxLength":160,"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/WorkerLogDto"}}}]}}}}},"summary":"","tags":["worker-logs"]}},"/v1/agents/{id}/worker/sessions/{sessionId}/log/download":{"get":{"operationId":"downloadAgentWorkerLog","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"sessionId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"","tags":["worker-logs"]}},"/v1/agents/{id}/worker/sessions/{sessionId}/log/events":{"get":{"operationId":"streamAgentWorkerLog","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"sessionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"minimum":0,"maximum":1000000,"default":0,"type":"integer"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":10000,"default":100,"type":"integer"}},{"name":"tail","required":false,"in":"query","schema":{"minimum":0,"maximum":10000,"default":0,"type":"integer"}},{"name":"turnId","required":false,"in":"query","schema":{"type":"string","maxLength":160,"nullable":true}}],"responses":{"200":{"description":""}},"summary":"","tags":["worker-logs"]}},"/v1/orgs/{orgId}/agents/{id}/worker/sessions":{"get":{"operationId":"listPartnerWorkerLogSessions","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}},{"name":"authorization","required":true,"in":"header","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"minimum":0,"maximum":1000000,"default":0,"type":"integer"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":10000,"default":100,"type":"integer"}},{"name":"tail","required":false,"in":"query","schema":{"minimum":0,"maximum":10000,"default":0,"type":"integer"}},{"name":"turnId","required":false,"in":"query","schema":{"type":"string","maxLength":160,"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/WorkerLogHistoryDto"}}}]}}}}},"summary":"","tags":["worker-logs"]}},"/v1/orgs/{orgId}/agents/{id}/worker/sessions/{sessionId}/log":{"get":{"operationId":"getPartnerWorkerLog","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}},{"name":"authorization","required":true,"in":"header","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"sessionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"minimum":0,"maximum":1000000,"default":0,"type":"integer"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":10000,"default":100,"type":"integer"}},{"name":"tail","required":false,"in":"query","schema":{"minimum":0,"maximum":10000,"default":0,"type":"integer"}},{"name":"turnId","required":false,"in":"query","schema":{"type":"string","maxLength":160,"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/WorkerLogDto"}}}]}}}}},"summary":"","tags":["worker-logs"]}},"/v1/orgs/{orgId}/agents/{id}/worker/sessions/{sessionId}/log/download":{"get":{"operationId":"downloadPartnerWorkerLog","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}},{"name":"authorization","required":true,"in":"header","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"sessionId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"","tags":["worker-logs"]}},"/v1/orgs/{orgId}/agents/{id}/worker/sessions/{sessionId}/log/events":{"get":{"operationId":"streamPartnerWorkerLog","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}},{"name":"authorization","required":true,"in":"header","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"sessionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"minimum":0,"maximum":1000000,"default":0,"type":"integer"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":10000,"default":100,"type":"integer"}},{"name":"tail","required":false,"in":"query","schema":{"minimum":0,"maximum":10000,"default":0,"type":"integer"}},{"name":"turnId","required":false,"in":"query","schema":{"type":"string","maxLength":160,"nullable":true}}],"responses":{"200":{"description":""}},"summary":"","tags":["worker-logs"]}},"/v1/agents/{agentId}/secrets":{"put":{"operationId":"setAgentSecret","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSecretDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretMetaDto"}}}}},"summary":"Merge credentials into a scope (encrypted; other keys are kept)","tags":["agent-secrets"]},"get":{"operationId":"listAgentSecrets","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"scope","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SecretMetaDto"}}}}}},"summary":"List credential metadata — this agent's plus the team-shared scope (no values)","tags":["agent-secrets"]},"delete":{"operationId":"purgeAgentSecrets","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"userId","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"summary":"Delete this agent's credentials (offboarding; team-shared ones are kept)","tags":["agent-secrets"]}},"/v1/agents/{agentId}/secrets/keys":{"delete":{"operationId":"deleteAgentSecretKey","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"scope","required":true,"in":"query","description":"Which scope the key lives in","schema":{"type":"string","enum":["shared","agent","user"]}},{"name":"key","required":true,"in":"query","description":"The \"service:key\" name to remove","schema":{"example":"gmail:app_password","type":"string"}},{"name":"userId","required":false,"in":"query","description":"Target user id — required only for user scope","schema":{"nullable":true,"type":"string"}}],"responses":{"204":{"description":""}},"summary":"Delete a single credential from a scope (idempotent)","tags":["agent-secrets"]}},"/v1/agents/{agentId}/fill-secrets":{"post":{"operationId":"createAgentFillSecret","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFillSecretDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FillSecretReceiptDto"}}}}},"summary":"Create a short-lived write-only browser secret","tags":["agent-secrets"]}},"/v1/agents/{agentId}/fill-secrets/{ref}":{"delete":{"operationId":"revokeAgentFillSecret","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"ref","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"summary":"Revoke a browser secret reference","tags":["agent-secrets"]}},"/v1/agents/{id}/grant":{"get":{"operationId":"getAgentGrantAccess","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentGrantAccessDto"}}}}},"summary":"Whether the caller may change this agent's permissions (team-gated)","tags":["agent-grant"]}},"/v1/teams/{teamId}/devices":{"get":{"operationId":"listTeamDevices","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentDeviceDto"}}}}}},"summary":"Every device this team owns, and which agent each belongs to (team-gated)","tags":["agent-device"]}},"/v1/agents/{id}/devices":{"get":{"operationId":"listAgentDevices","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentDeviceDto"}}}}}},"summary":"This agent's devices: connected or not, when each was last seen, and what it declared (team-gated)","tags":["agent-device"]},"post":{"operationId":"registerAgentDevice","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterAgentDeviceDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredAgentDeviceDto"}}}}},"summary":"Register a device for this agent and answer its key — once (team-gated)","tags":["agent-device"]}},"/v1/agents/{id}/devices/{deviceId}/disconnect":{"post":{"operationId":"disconnectAgentDevice","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"deviceId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDeviceDto"}}}}},"summary":"Drop this device’s live connection now. Its key keeps working (team-gated)","tags":["agent-device"]}},"/v1/agents/{id}/devices/{deviceId}":{"delete":{"operationId":"revokeAgentDevice","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"deviceId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDeviceDto"}}}}},"summary":"Revoke this device’s key and close its connection immediately (team-gated)","tags":["agent-device"]}},"/v1/teams/{teamId}/mcp-servers":{"get":{"operationId":"listTeamMcpServers","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/McpServerDto"}}}}}},"summary":"Every MCP server this team has registered, and which agents use each (team-gated)","tags":["agent-mcp"]},"post":{"operationId":"registerMcpServer","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterMcpServerDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerDto"}}}}},"summary":"Register an MCP server for a team and discover its tools (owner or admin)","tags":["agent-mcp"]}},"/v1/agents/{id}/mcp-servers":{"get":{"operationId":"listAgentMcpServers","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/McpServerDto"}}}}}},"summary":"The MCP servers this agent uses, with the other agents on each beside it","tags":["agent-mcp"]},"post":{"operationId":"attachMcpServer","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachMcpServerDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/McpServerDto"}}}}}},"summary":"Give this agent a server the team already registered (owner or admin)","tags":["agent-mcp"]}},"/v1/teams/{teamId}/mcp-servers/{id}":{"patch":{"operationId":"updateMcpServer","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMcpServerDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerDto"}}}}},"summary":"Rename a server, or change which credentials it is handed (owner or admin)","tags":["agent-mcp"]},"delete":{"operationId":"removeMcpServer","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Remove a registration. Its credentials stay on the secrets screen (owner or admin)","tags":["agent-mcp"]}},"/v1/teams/{teamId}/mcp-servers/{id}/credentials":{"put":{"operationId":"fillMcpServerCredential","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FillMcpCredentialDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerDto"}}}}},"summary":"Store a credential this server needs, in the team's shared scope, and dial again (owner or admin). Write-only: the value is never returned","tags":["agent-mcp"]}},"/v1/teams/{teamId}/mcp-servers/{id}/credentials/move":{"post":{"operationId":"moveMcpServerCredential","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveMcpCredentialDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerDto"}}}}},"summary":"Move a value already stored in an agent's or a member's scope into the team's shared one, where this server reads it, and dial again (owner or admin)","tags":["agent-mcp"]}},"/v1/teams/{teamId}/mcp-servers/{id}/refresh":{"post":{"operationId":"refreshMcpServer","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerDto"}}}}},"summary":"Ask the server what it can do, now, and cache the answer (owner or admin)","tags":["agent-mcp"]}},"/v1/agents/{id}/mcp-servers/{serverId}":{"delete":{"operationId":"detachMcpServer","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"serverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/McpServerDto"}}}}}},"summary":"Take a server away from THIS agent. No other agent is affected (owner or admin)","tags":["agent-mcp"]}},"/v1/mcp-contexts/jwks":{"get":{"operationId":"getMcpContextJwks","parameters":[],"responses":{"200":{"description":""}},"summary":"Public keys for MCP caller verification","tags":["mcp-contexts"]}},"/v1/teams/{teamId}/concierge/run":{"post":{"operationId":"runConcierge","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunConciergeDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConciergeReplyDto"}}}}},"summary":"Run one concierge turn for the team (member-gated, persisted).","tags":["concierge"]}},"/v1/teams/{teamId}/concierge/stream":{"post":{"operationId":"streamConcierge","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunConciergeDto"}}}},"responses":{"201":{"description":""}},"summary":"Stream one concierge turn as SSE (member-gated, persisted).","tags":["concierge"]}},"/v1/agents/import":{"post":{"operationId":"importAgent","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportAgentDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ImportedAgentDto"}}}]}}}}},"summary":"Import a portable package (idempotent upsert)","tags":["agents"]}},"/v1/agents/{id}/export":{"post":{"operationId":"exportAgent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportAgentDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PackageRefDto"}}}]}}}}},"summary":"Export an agent to a portable package","tags":["agents"]}},"/v1/teams/{teamId}/skills/import":{"post":{"operationId":"importTeamSkill","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"},"name":{"type":"string","description":"What to call the skill. Overrides the `name` in the archive`s own frontmatter, and is REQUIRED when the archive does not carry one"}}}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ImportedSkillDto"}}}]}}}}},"summary":"Upload a skill that is a folder — a SKILL.md plus the files it refers to — as a `.zip`. Refuses an archive that points outside its own folder, that unpacks to more than a skill may hold, or that is more than one skill (team-gated)","tags":["skill"]}},"/v1/agents/{id}/grant-requests":{"get":{"operationId":"getAgentGrantRequests","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GrantRequestDto"}}}}}},"summary":"Permission requests of this agent waiting for an answer — empty unless the caller is the team's owner or administrator","tags":["agent-grant-request"]}},"/v1/agents/{id}/grant-requests/{requestId}/decision":{"post":{"operationId":"decideAgentGrantRequest","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"requestId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecideGrantRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantRequestDecidedDto"}}}}},"summary":"Allow or decline a permission request; the turn of whoever asked goes on in their conversation (owner or administrator)","tags":["agent-grant-request"]}},"/v1/teams/{teamId}/grant-requests":{"get":{"operationId":"getTeamGrantRequestCounts","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GrantRequestCountDto"}}}}}},"summary":"How many permission requests wait per agent of the team — empty unless the caller is the team's owner or administrator","tags":["agent-grant-request"]}},"/v1/agents/{id}/links":{"get":{"operationId":"listAgentLinks","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentLinkViewDto"}}}}},"summary":"Both sides of this agent’s connections — who it may ask, and who may ask it","tags":["agent-link"]},"post":{"operationId":"createAgentLink","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentLinkDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentLinkViewDto"}}}}},"summary":"Let this agent ask another agent of the same team. The colleague answers with its own turn — its own knowledge, its own secrets, its own servers (owner or admin)","tags":["agent-link"]}},"/v1/agents/{id}/links/{linkId}":{"delete":{"operationId":"removeAgentLink","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"linkId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentLinkViewDto"}}}}},"summary":"Revoke one connection. The opposite direction, if there is one, stays (owner or admin)","tags":["agent-link"]}},"/v1/teams/{teamId}/artifacts":{"get":{"operationId":"listArtifacts","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"kind","required":false,"in":"query","description":"Show only this kind. Omit for everything","schema":{"type":"string","enum":["page","document","image","archive","data",null],"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ArtifactListDto"}}}]}}}}},"summary":"Everything this team`s agents have produced — newest first, with a signed link to each and how much of the team`s allowance they take. `kind` narrows it to one sort of thing; the total is never narrowed with it (team-gated)","tags":["artifacts"]}},"/v1/teams/{teamId}/artifacts/{artifactId}":{"delete":{"operationId":"deleteArtifact","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"artifactId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"summary":"Take one down — its row and its bytes, together and for good. The link stops working immediately, including for whoever was already sent it. Another team`s id answers «not found», exactly as an id that never existed does (team-gated)","tags":["artifacts"]}},"/v1/teams/{teamId}/artifacts/{artifactId}/publication":{"post":{"operationId":"publishArtifact","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"artifactId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishArtifactDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ArtifactPublicationDto"}}}]}}}}},"summary":"Give this material a PERMANENT public address that anybody holding it can open — a person`s decision, never an agent`s. Optionally name the sites allowed to embed it in a frame; nobody may until named. Refused while a live address exists — revoke that one first, deliberately (team-gated)","tags":["artifacts"]},"patch":{"operationId":"updateArtifactPublication","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"artifactId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateArtifactPublicationDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ArtifactPublicationDto"}}}]}}}}},"summary":"Change which sites may embed the published page in a frame. The address itself does not change; the new list applies to the next request (team-gated)","tags":["artifacts"]},"delete":{"operationId":"revokeArtifactPublication","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"artifactId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ArtifactPublicationDto"}}}]}}}}},"summary":"Stop the public address answering, immediately and with no grace period — including for whoever was already sent it. The record survives; publishing again mints a NEW address and never revives this one (team-gated)","tags":["artifacts"]}},"/v1/teams/{teamId}/leads/{leadId}/merges":{"get":{"operationId":"listTeamLeadMerges","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"leadId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/LeadMergeListDto"}}}]}}}}},"summary":"What was attached to this person — the anonymous conversations they turned out to have had, when, and whether a member has since put them back (team-gated)","tags":["lead"]}},"/v1/teams/{teamId}/leads/{leadId}/merges/{mergeId}/revert":{"post":{"operationId":"revertTeamLeadMerge","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mergeId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/LeadMergeDto"}}}]}}}}},"summary":"Put an attached anonymous history back where it came from — for when the person it was attached to is not the person who wrote it (team-gated)","tags":["lead"]}},"/v1/teams/{teamId}/embed-keys":{"post":{"operationId":"issueTeamEmbedKey","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmbedKeyDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/IssuedEmbedKeyDto"}}}]}}}}},"summary":"Mint a server-to-server key for this team`s website backend. It can do exactly one thing — ask for an embed token naming one visitor — and the credential is shown once. Give it an `expiresAt` if you can: revoking needs somebody to remember the key exists (team-gated).","tags":["agent-embed-key"]},"get":{"operationId":"listTeamEmbedKeys","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmbedKeyDto"}}}}]}}}}},"summary":"This team`s embed keys, newest first. Never carries a secret — only the public half, when each was last used, and whether it is revoked (team-gated).","tags":["agent-embed-key"]}},"/v1/teams/{teamId}/embed-keys/{keyId}":{"delete":{"operationId":"revokeTeamEmbedKey","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"keyId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/EmbedKeyDto"}}}]}}}}},"summary":"Stop this key working, immediately and with no grace period. The record of it survives so an incident can still be read (team-gated).","tags":["agent-embed-key"]}},"/v1/agents/{id}/card":{"get":{"operationId":"readAgentCardPanel","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AgentCardPanelDto"}}}]}}}}},"summary":"This agent`s card exactly as a reader of the link would receive it, plus the live link if there is one. The preview is what makes «see before you send» possible: it is built by the same code that answers the link (team-gated).","tags":["agent-card"]}},"/v1/agents/{id}/card/link":{"post":{"operationId":"issueAgentCardLink","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/IssuedAgentCardLinkDto"}}}]}}}}},"summary":"Mint the address this agent`s card is served on. Anybody holding it can read the card and nothing else. The address is shown ONCE. Refused while a live link already exists — revoke that one first, deliberately, rather than breaking it by surprise (team-gated).","tags":["agent-card"]},"delete":{"operationId":"revokeAgentCardLink","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AgentCardLinkDto"}}}]}}}}},"summary":"Stop this agent`s card link answering, immediately and with no grace period. The record of it survives so an incident can still be read (team-gated).","tags":["agent-card"]}},"/v1/agents/{id}/card/findable":{"put":{"operationId":"setAgentCardFindable","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAgentCardFindableDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AgentCardPanelDto"}}}]}}}}},"summary":"Turn the well-known path on or off for this agent — owner or admin only. Off is the default and the concierge may never be findable. The response is the panel, so the screen can show the new state without a second read.","tags":["agent-card"]}},"/agent-cards/{token}":{"get":{"operationId":"readAgentCard","parameters":[{"name":"token","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"The agent card at this link, in A2A 1.0`s shape and with an EMPTY `supportedInterfaces` — nothing here accepts an inbound A2A call yet, and a card naming a dead address is worse than no card. Still readable by a 0.3 client. No session: the token is the right. Unknown, revoked, switched-off and deleted all answer 404 alike.","tags":["agent-card"]}},"/agents/{id}/card/well-known":{"get":{"operationId":"readAgentCardWellKnown","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"The agent card at this agent's well-known path, in A2A 1.0`s shape. Unlike the token link, the id in the path is not a secret — what gates this route is the findability switch a team owner or admin turns on. Off (the default), a switched-off agent, and an agent that never existed all answer this exact same refusal — the switch's whole point is not to confirm that any of the three is which.","tags":["agent-card"]}},"/v1/agents/{id}/channels/bridle":{"get":{"operationId":"getAgentBridleChannel","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentChannelStatusDto"}}}}},"summary":"Whether this agent is published on Bridle, whether this deployment can publish at all, and the limits it enforces (team-gated)","tags":["agent-channel"]},"post":{"operationId":"publishAgentToBridle","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentChannelDto"}}}}},"summary":"Publish this agent on Bridle so an embedded chat can reach it (team-gated)","tags":["agent-channel"]},"delete":{"operationId":"unpublishAgentFromBridle","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentChannelDto"}}}}},"summary":"Stop answering embedded chats for this agent (team-gated)","tags":["agent-channel"]}},"/v1/agents/{id}/channels/bridle/access":{"put":{"operationId":"setAgentBridleChannelAccess","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetChannelAccessDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentChannelDto"}}}}},"summary":"Open or close what the visitors of this agent`s embed may do — worker tools, durable memory, the schedule, and whether reasoning is shown (team-gated). Everything is closed until this is called; raising `schedule` requires echoing the agent`s id in `confirm`.","tags":["agent-channel"]}},"/agents/{id}/channels/bridle/visitor":{"post":{"operationId":"issueIdentifiedVisitorToken","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-embed-key","in":"header","description":"The team`s embed key, from `POST /v1/teams/{teamId}/embed-keys`.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentifyVisitorDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentifiedVisitorTokenDto"}}}}},"summary":"Mint an embed token naming ONE known person, for a team`s own website backend. Authenticated by the team`s embed key in the `X-Embed-Key` header — not by a session — and it opens no other route. The person is recorded at this moment, so they appear in the team`s lead list with the details you send and come back to the same lead next time.","tags":["agent-channel"]}},"/v1/agents/{id}/channels/bridle/token":{"post":{"operationId":"issueAgentBridleEmbedToken","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueEmbedTokenDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedTokenDto"}}}}},"summary":"Mint a short-lived browser token for this agent`s embed (team-gated)","tags":["agent-channel"]}},"/v1/agents/{id}/channels/bridle/video-uploads":{"post":{"operationId":"beginChannelVideoUpload","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelVideoUploadDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoUploadDto"}}}}},"summary":"","tags":["agent-channel"]}},"/v1/agents/{id}/channels/bridle/video-uploads/{attachmentId}/complete":{"post":{"operationId":"completeChannelVideoUpload","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"attachmentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelVideoTicketDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelVideoAttachmentDto"}}}}},"summary":"","tags":["agent-channel"]}},"/a2a/v1/agents/{id}":{"post":{"operationId":"callAgentA2a","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-embed-key","in":"header","description":"An API key issued by the agent`s team, from `POST /v1/teams/{teamId}/embed-keys`.","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":""}},"summary":"The agent's A2A endpoint, JSON-RPC 2.0. Methods: message/send, message/stream, tasks/get, SendMessage, SendStreamingMessage, GetTask — the name picks the A2A revision, `message/send`+`message/stream`+`tasks/get` answering 0.3 shapes and `SendMessage`+`SendStreamingMessage`+`GetTask` answering 1.0 ones. The two streaming methods answer Server-Sent Events (`text/event-stream`), one JSON-RPC response per event: the task, then the answer in pieces, then a final status. Authenticated by an API key the agent`s team issued, in the `X-Embed-Key` header; there is no session and no anonymous access. The task id is the turn id, so a task can be read back for as long as the conversation exists. Answers a JSON-RPC document, never this api`s `{ success, data }` envelope.","tags":["agent-a2a"]}},"/v1/agents/{id}/channels/a2a":{"get":{"operationId":"getAgentA2aChannel","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"summary":"Whether this agent answers A2A — the binding, or `null` when it has never been published (team-gated). While it is enabled the agent`s card carries an address, a transport and an authentication scheme; while it is not, the card says the agent is readable and not callable.","tags":["agent-channel"]},"post":{"operationId":"publishAgentToA2a","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentChannelDto"}}}}},"summary":"Open this agent to other agents over A2A, and put its address on its card (team-gated). Callers must present an API key this team issued: publishing opens the agent to NAMED partners, not to the internet.","tags":["agent-channel"]},"delete":{"operationId":"unpublishAgentFromA2a","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentChannelDto"}}}}},"summary":"Stop answering A2A for this agent (team-gated). The address disappears from its card on the next read, and a call to it is refused.","tags":["agent-channel"]}},"/v1/agents/{id}/channels/a2a/access":{"put":{"operationId":"setAgentA2aChannelAccess","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetA2aChannelAccessDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentChannelDto"}}}}},"summary":"Open or close whether partners calling over A2A see the agent`s reasoning and tool steps as side remarks on a streamed task (team-gated). Closed until this is called. The other three rights cannot be opened on an A2A binding.","tags":["agent-channel"]}},"/v1/agents/{id}/channels/telegram":{"get":{"operationId":"getAgentTelegram","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramChannelDto"}}}}},"summary":"","tags":["telegram"]},"post":{"operationId":"connectAgentTelegram","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectTelegramDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramChannelDto"}}}}},"summary":"","tags":["telegram"]},"delete":{"operationId":"disconnectAgentTelegram","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"summary":"","tags":["telegram"]}},"/v1/agents/{id}/channels/telegram/access":{"put":{"operationId":"setAgentTelegramAccess","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetTelegramAccessDto"}}}},"responses":{"204":{"description":""}},"summary":"","tags":["telegram"]}},"/v1/agents/{id}/channels/telegram/invitations":{"post":{"operationId":"createAgentTelegramInvitation","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramInviteDto"}}}}},"summary":"","tags":["telegram"]}},"/v1/agents/{id}/channels/telegram/accounts":{"get":{"operationId":"listAgentTelegramAccounts","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TelegramLinkDto"}}}}}},"summary":"","tags":["telegram"]}},"/v1/agents/{id}/channels/telegram/accounts/{accountId}":{"delete":{"operationId":"unlinkAgentTelegramAccount","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"accountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"summary":"","tags":["telegram"]}},"/v1/telegram/webhooks/{webhookId}":{"post":{"operationId":"receiveTelegramUpdate","parameters":[{"name":"webhookId","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-telegram-bot-api-secret-token","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramUpdateDto"}}}},"responses":{"200":{"description":""}},"summary":"","tags":["telegram-webhook"]}},"/v1/agents/{id}/calls":{"post":{"operationId":"startAgentCall","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartCallDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDto"}}}}},"summary":"Begin recording a call for this agent (team-gated; the caller owns it)","tags":["agent-call"]}},"/v1/agents/{id}/calls/recording":{"get":{"operationId":"listRecordingAgentCalls","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingCallsDto"}}}}},"summary":"The caller’s calls with this agent that never ended — what a reloaded tab asks","tags":["agent-call"]}},"/v1/agents/{id}/calls/{callId}":{"get":{"operationId":"readAgentCall","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"callId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallWithSegmentsDto"}}}}},"summary":"One call and every phrase heard on it, oldest first","tags":["agent-call"]}},"/v1/agents/{id}/calls/{callId}/segments":{"post":{"operationId":"appendAgentCallSegments","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"callId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppendCallSegmentsDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallAppendResultDto"}}}}},"summary":"Write the phrases heard since the last append (idempotent on `seq`)","tags":["agent-call"]}},"/v1/agents/{id}/calls/{callId}/finish":{"post":{"operationId":"finishAgentCall","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"callId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallWithSegmentsDto"}}}}},"summary":"End the call: store the transcript, summarise it, and say so in the conversation","tags":["agent-call"]}},"/v1/agents/{agentId}/trigger-key":{"post":{"operationId":"issueAgentTriggerKey","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/TriggerKeyDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"Issue or rotate an agent trigger key (direct team owner/admin)","tags":["trigger"]},"delete":{"operationId":"revokeAgentTriggerKey","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""}},"security":[{"bearer":[]}],"summary":"","tags":["trigger"]}},"/v1/agents/{agentId}/triggers":{"post":{"operationId":"triggerAgent","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"authorization","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerInputDto"}}}},"responses":{"202":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/TriggerRunDto"}}}]}}}},"409":{"description":"Idempotency key already used with different input"},"429":{"description":"One new event per agent per minute","headers":{"Retry-After":{"schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"Accept an asynchronous system turn using an agent trigger bearer key","tags":["trigger"]}},"/v1/agents/{agentId}/triggers/{runId}":{"get":{"operationId":"getAgentTriggerRun","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"runId","required":true,"in":"path","schema":{"type":"string"}},{"name":"authorization","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/TriggerRunDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["trigger"]}},"/v1/orgs/{orgId}/agents/{agentId}/triggers":{"post":{"operationId":"triggerOrganizationAgent","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationTriggerInputDto"}}}},"responses":{"202":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/TriggerRunDto"}}}]}}}},"429":{"description":"One new event per agent per minute","headers":{"Retry-After":{"schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"Accept a system turn as an existing organization member; requires chat:run","tags":["trigger"]}},"/v1/orgs/{orgId}/agents/{agentId}/triggers/{runId}":{"get":{"operationId":"getOrganizationTriggerRun","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"runId","required":true,"in":"path","schema":{"type":"string"}},{"name":"externalUserId","required":true,"in":"query","schema":{"minLength":1,"maxLength":200,"type":"string"}},{"name":"externalTeamId","required":true,"in":"query","schema":{"minLength":1,"maxLength":200,"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/TriggerRunDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["trigger"]}},"/v1/orgs/{orgId}/agents/{agentId}/service-access":{"post":{"operationId":"grantAgentServiceAccess","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}},{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerAgentAccessInputDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerAgentAccessDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/orgs/{orgId}/chat/memberships":{"put":{"operationId":"syncPartnerChatMembership","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncPartnerMembershipDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerMembershipDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/partner/chat/memberships":{"put":{"operationId":"syncPartnerChatMembershipByKey","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncPartnerMembershipDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerMembershipDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/orgs/{orgId}/chat/guest-conversations":{"post":{"operationId":"createGuestServiceConversation","parameters":[{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGuestConversationDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerConversationDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/partner/chat/guest-conversations":{"post":{"operationId":"createGuestServiceConversationByKey","parameters":[{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGuestConversationDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerConversationDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/orgs/{orgId}/chat/conversations/{id}":{"delete":{"operationId":"closeGuestServiceConversation","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/partner/chat/conversations/{id}":{"delete":{"operationId":"closeGuestServiceConversationByKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":""},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/orgs/{orgId}/chat/conversations":{"post":{"operationId":"createPartnerConversation","parameters":[{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePartnerConversationDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerConversationDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]},"get":{"operationId":"listServiceConversations","parameters":[{"name":"agentId","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"nullable":true}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":2000,"nullable":true}},{"name":"limit","required":false,"in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerConversationListDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/partner/chat/conversations":{"post":{"operationId":"createPartnerConversationByKey","parameters":[{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePartnerConversationDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerConversationDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]},"get":{"operationId":"listServiceConversationsByKey","parameters":[{"name":"agentId","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"nullable":true}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":2000,"nullable":true}},{"name":"limit","required":false,"in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerConversationListDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/orgs/{orgId}/chat/conversations/{id}/events":{"post":{"operationId":"appendApplicationEvent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppendApplicationEventDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ChatEventDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]},"get":{"operationId":"getServiceConversationEvents","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"after","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":240,"nullable":true}},{"name":"limit","required":false,"in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerConversationEventsDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/partner/chat/conversations/{id}/events":{"post":{"operationId":"appendApplicationEventByKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppendApplicationEventDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ChatEventDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]},"get":{"operationId":"getServiceConversationEventsByKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"after","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":240,"nullable":true}},{"name":"limit","required":false,"in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerConversationEventsDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/orgs/{orgId}/chat/conversations/{id}/context":{"get":{"operationId":"getPartnerConversationContext","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"kind","required":false,"in":"query","schema":{"type":"string","enum":["member","guest",null],"nullable":true}},{"name":"externalUserId","required":true,"in":"query","schema":{"minLength":1,"maxLength":200,"type":"string"}},{"name":"externalTeamId","required":true,"in":"query","schema":{"minLength":1,"maxLength":200,"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerContextMetadataDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]},"put":{"operationId":"bindPartnerConversationContext","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindPartnerContextDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerContextVersionDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/partner/chat/conversations/{id}/context":{"get":{"operationId":"getPartnerConversationContextByKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"kind","required":false,"in":"query","schema":{"type":"string","enum":["member","guest",null],"nullable":true}},{"name":"externalUserId","required":true,"in":"query","schema":{"minLength":1,"maxLength":200,"type":"string"}},{"name":"externalTeamId","required":true,"in":"query","schema":{"minLength":1,"maxLength":200,"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerContextMetadataDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]},"put":{"operationId":"bindPartnerConversationContextByKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BindPartnerContextDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerContextVersionDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/orgs/{orgId}/chat/conversations/{id}/messages":{"post":{"operationId":"submitPartnerMessage","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitPartnerMessageDto"}}}},"responses":{"202":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerRunDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]},"get":{"operationId":"getPartnerHistory","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"nullable":true}},{"name":"limit","required":false,"in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"nullable":true}},{"name":"externalUserId","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"nullable":true}},{"name":"externalTeamId","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerHistoryDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/partner/chat/conversations/{id}/messages":{"post":{"operationId":"submitPartnerMessageByKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitPartnerMessageDto"}}}},"responses":{"202":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerRunDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]},"get":{"operationId":"getPartnerHistoryByKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"nullable":true}},{"name":"limit","required":false,"in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"nullable":true}},{"name":"externalUserId","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"nullable":true}},{"name":"externalTeamId","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerHistoryDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/orgs/{orgId}/chat/conversations/{id}/attachments":{"post":{"operationId":"uploadPartnerAttachment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file","externalUserId","externalTeamId"],"properties":{"file":{"type":"string","format":"binary"},"externalUserId":{"type":"string"},"externalTeamId":{"type":"string"}}}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerAttachmentDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"AGNT2-622 — a file for the next message, on the cabinet's rules. The\nlimits are judged twice, as in the cabinet: multer stops reading at the\nbyte ceiling and refuses an unreadable type before buffering it, and the\nservice judges both again because an edge filter is not a guard.","tags":["partnerChat"]}},"/v1/partner/chat/conversations/{id}/attachments":{"post":{"operationId":"uploadPartnerAttachmentByKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file","externalUserId","externalTeamId"],"properties":{"file":{"type":"string","format":"binary"},"externalUserId":{"type":"string"},"externalTeamId":{"type":"string"}}}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerAttachmentDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"AGNT2-622 — a file for the next message, on the cabinet's rules. The\nlimits are judged twice, as in the cabinet: multer stops reading at the\nbyte ceiling and refuses an unreadable type before buffering it, and the\nservice judges both again because an edge filter is not a guard.","tags":["partnerChat"]}},"/v1/orgs/{orgId}/chat/conversations/{id}/video-uploads":{"post":{"operationId":"beginPartnerVideoUpload","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerVideoUploadDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoUploadDto"}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/partner/chat/conversations/{id}/video-uploads":{"post":{"operationId":"beginPartnerVideoUploadByKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerVideoUploadDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoUploadDto"}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/orgs/{orgId}/chat/conversations/{id}/video-uploads/{attachmentId}/complete":{"post":{"operationId":"completePartnerVideoUpload","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"attachmentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerActorDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerAttachmentDto"}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/partner/chat/conversations/{id}/video-uploads/{attachmentId}/complete":{"post":{"operationId":"completePartnerVideoUploadByKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"attachmentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerActorDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerAttachmentDto"}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/orgs/{orgId}/chat/conversations/{id}/attachments/{attachmentId}/content":{"get":{"operationId":"getPartnerAttachmentContent","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"attachmentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"nullable":true}},{"name":"limit","required":false,"in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"nullable":true}},{"name":"externalUserId","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"nullable":true}},{"name":"externalTeamId","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"nullable":true}}],"responses":{"200":{"description":""},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"AGNT2-622 — the bytes of one attachment, served as a download a browser\ncannot run: `nosniff` and a sandboxing CSP, so a text file is never read\nas markup on this origin.","tags":["partnerChat"]}},"/v1/partner/chat/conversations/{id}/attachments/{attachmentId}/content":{"get":{"operationId":"getPartnerAttachmentContentByKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"attachmentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"cursor","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"nullable":true}},{"name":"limit","required":false,"in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"nullable":true}},{"name":"externalUserId","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"nullable":true}},{"name":"externalTeamId","required":false,"in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"nullable":true}}],"responses":{"200":{"description":""},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"AGNT2-622 — the bytes of one attachment, served as a download a browser\ncannot run: `nosniff` and a sandboxing CSP, so a text file is never read\nas markup on this origin.","tags":["partnerChat"]}},"/v1/orgs/{orgId}/chat/conversations/{id}/runs/{runId}":{"get":{"operationId":"getPartnerRun","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"runId","required":true,"in":"path","schema":{"type":"string"}},{"name":"kind","required":false,"in":"query","schema":{"type":"string","enum":["member","guest",null],"nullable":true}},{"name":"externalUserId","required":true,"in":"query","schema":{"minLength":1,"maxLength":200,"type":"string"}},{"name":"externalTeamId","required":true,"in":"query","schema":{"minLength":1,"maxLength":200,"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerRunDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/partner/chat/conversations/{id}/runs/{runId}":{"get":{"operationId":"getPartnerRunByKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"runId","required":true,"in":"path","schema":{"type":"string"}},{"name":"kind","required":false,"in":"query","schema":{"type":"string","enum":["member","guest",null],"nullable":true}},{"name":"externalUserId","required":true,"in":"query","schema":{"minLength":1,"maxLength":200,"type":"string"}},{"name":"externalTeamId","required":true,"in":"query","schema":{"minLength":1,"maxLength":200,"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerRunDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/orgs/{orgId}/chat/conversations/{id}/runs/{runId}/events":{"get":{"description":"SSE: turn {type,turnId,ts}, text {type,text}, tool_call {type,name,id,detail?}, tool_result {type,name,ok,error?}, done {type,stopReason,iterations,text}, run_status {type,status,reason,toolErrors,timings}, error {type,code}. event equals data.type. Thinking is private. done precedes run_status on turn completion, including max_iterations. Last-Event-ID omitted or runId:0 replays from the beginning, including completed runs; runId:N resumes after N.","operationId":"streamPartnerRun","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"runId","required":true,"in":"path","schema":{"type":"string"}},{"name":"kind","required":false,"in":"query","schema":{"type":"string","enum":["member","guest",null],"nullable":true}},{"name":"externalUserId","required":true,"in":"query","schema":{"minLength":1,"maxLength":200,"type":"string"}},{"name":"externalTeamId","required":true,"in":"query","schema":{"minLength":1,"maxLength":200,"type":"string"}},{"name":"last-event-id","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":""},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/partner/chat/conversations/{id}/runs/{runId}/events":{"get":{"description":"SSE: turn {type,turnId,ts}, text {type,text}, tool_call {type,name,id,detail?}, tool_result {type,name,ok,error?}, done {type,stopReason,iterations,text}, run_status {type,status,reason,toolErrors,timings}, error {type,code}. event equals data.type. Thinking is private. done precedes run_status on turn completion, including max_iterations. Last-Event-ID omitted or runId:0 replays from the beginning, including completed runs; runId:N resumes after N.","operationId":"streamPartnerRunByKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"runId","required":true,"in":"path","schema":{"type":"string"}},{"name":"kind","required":false,"in":"query","schema":{"type":"string","enum":["member","guest",null],"nullable":true}},{"name":"externalUserId","required":true,"in":"query","schema":{"minLength":1,"maxLength":200,"type":"string"}},{"name":"externalTeamId","required":true,"in":"query","schema":{"minLength":1,"maxLength":200,"type":"string"}},{"name":"last-event-id","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":""},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partnerChat"]}},"/v1/orgs/{orgId}/chat/agents/{agentId}/telegram/invitations":{"post":{"operationId":"createPartnerTelegramInvitation","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerActorDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramInviteDto"}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"summary":"","tags":["partnerChat"]}},"/v1/orgs/{orgId}/chat/agents/{agentId}/telegram/accounts":{"delete":{"operationId":"unlinkPartnerTelegramAccount","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerActorDto"}}}},"responses":{"204":{"description":""},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"summary":"","tags":["partnerChat"]}},"/v1/partner/self":{"get":{"description":"Discover organization and deployment using any valid organization key. No additional scope required. Unknown keys return CREDENTIAL_REJECTED; known revoked/expired keys return CREDENTIAL_REVOKED/CREDENTIAL_EXPIRED (401).","operationId":"getPartnerSelf","parameters":[{"name":"organizationId","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/PartnerSelfDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["partner"]}},"/v1/orgs/{orgId}/provisionings":{"post":{"operationId":"createOrganizationProvisioning","parameters":[{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID bound to the service credential","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProvisioningDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ProvisioningDto"}}}]}}}},"202":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ProvisioningDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationProvisioning"]}},"/v1/partner/provisionings":{"post":{"operationId":"createOrganizationProvisioningByKey","parameters":[{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProvisioningDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ProvisioningDto"}}}]}}}},"202":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ProvisioningDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationProvisioning"]}},"/v1/orgs/{orgId}/teams/{teamId}/agents/provisionings":{"post":{"operationId":"addOrganizationProvisioningAgent","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID bound to the service credential","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddProvisioningAgentDto"}}}},"responses":{"202":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ProvisioningDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationProvisioning"]}},"/v1/partner/teams/{teamId}/agents/provisionings":{"post":{"operationId":"addOrganizationProvisioningAgentByKey","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"idempotency-key","required":true,"in":"header","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddProvisioningAgentDto"}}}},"responses":{"202":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ProvisioningDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationProvisioning"]}},"/v1/orgs/{orgId}/teams/{teamId}/agents/{externalAgentId}":{"delete":{"operationId":"retireOrganizationProvisioningAgent","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"externalAgentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID bound to the service credential","schema":{"type":"string"}}],"responses":{"204":{"description":"Agent retired; external identity available for a new provisioning."},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationProvisioning"]}},"/v1/partner/teams/{teamId}/agents/{externalAgentId}":{"delete":{"operationId":"retireOrganizationProvisioningAgentByKey","parameters":[{"name":"teamId","required":true,"in":"path","schema":{"type":"string"}},{"name":"externalAgentId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"204":{"description":"Agent retired; external identity available for a new provisioning."},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationProvisioning"]}},"/v1/orgs/{orgId}/operations/{operationId}/profile":{"put":{"operationId":"updateOrganizationProvisioningProfile","parameters":[{"name":"operationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID bound to the service credential","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProvisioningProfileDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ProvisioningDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationProvisioning"]}},"/v1/partner/operations/{operationId}/profile":{"put":{"operationId":"updateOrganizationProvisioningProfileByKey","parameters":[{"name":"operationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProvisioningProfileDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ProvisioningDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationProvisioning"]}},"/v1/orgs/{orgId}/operations/{operationId}/configuration":{"put":{"operationId":"configureOrganizationProvisioning","parameters":[{"name":"operationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID bound to the service credential","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigureProvisioningDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ProvisioningDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationProvisioning"]}},"/v1/partner/operations/{operationId}/configuration":{"put":{"operationId":"configureOrganizationProvisioningByKey","parameters":[{"name":"operationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigureProvisioningDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ProvisioningDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationProvisioning"]}},"/v1/orgs/{orgId}/operations/{operationId}/retry":{"post":{"operationId":"retryOrganizationProvisioning","parameters":[{"name":"operationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID bound to the service credential","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryProvisioningDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ProvisioningDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationProvisioning"]}},"/v1/partner/operations/{operationId}/retry":{"post":{"operationId":"retryOrganizationProvisioningByKey","parameters":[{"name":"operationId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryProvisioningDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ProvisioningDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationProvisioning"]}},"/v1/orgs/{orgId}/operations/{operationId}":{"get":{"operationId":"getOrganizationProvisioning","parameters":[{"name":"operationId","required":true,"in":"path","schema":{"type":"string"}},{"name":"orgId","required":true,"in":"path","description":"Organization ID bound to the service credential","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ProvisioningDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationProvisioning"]}},"/v1/partner/operations/{operationId}":{"get":{"operationId":"getOrganizationProvisioningByKey","parameters":[{"name":"operationId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ProvisioningDto"}}}]}}}},"429":{"description":"TOO_MANY_REQUESTS: organization minute/hour/day request allowance exhausted. details: scope, limit, windowSeconds, retryAfterSeconds. Retry-After is seconds. AGENT_CONCURRENCY_LIMIT is a separate capacity refusal; QUOTA_EXCEEDED names the quota and periodEndsAt for monthly spend.","headers":{"Retry-After":{"description":"Seconds before retrying a transient refusal","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationProvisioning"]}},"/v1/admin/orgs/{orgId}/provisionings":{"get":{"operationId":"listPlatformOrganizationProvisionings","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"type":"number"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ProvisioningAuditPageDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["adminOrganizationProvisioning"]}},"/v1/orgs/{orgId}/policy":{"get":{"operationId":"getOrganizationPolicy","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationPolicyViewDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationPolicies"]},"post":{"operationId":"createOrganizationPolicy","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveOrganizationPolicyDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationPolicyDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationPolicies"]},"patch":{"description":"Atomically save and apply or submit for platform review. Does not create an unsubmitted draft.","operationId":"updateOrganizationPolicy","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveOrganizationPolicyDto"}}}},"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationPolicyDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationPolicies"]}},"/v1/orgs/{orgId}/policy/preview":{"post":{"operationId":"previewOrganizationPolicy","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveOrganizationPolicyDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationPolicyPreviewDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationPolicies"]}},"/v1/orgs/{orgId}/policy/limit-request":{"post":{"operationId":"requestOrganizationAgentLimit","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestOrganizationLimitDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationPolicyDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationPolicies"]}},"/v1/orgs/{orgId}/policy/submit":{"post":{"deprecated":true,"description":"Compatibility endpoint for existing drafts. New saves apply or submit atomically.","operationId":"submitOrganizationPolicy","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyTransitionDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationPolicyDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationPolicies"]}},"/v1/admin/orgs/{orgId}/policy":{"get":{"operationId":"getPlatformOrganizationPolicy","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationPolicyViewDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["adminOrganizationPolicies"]}},"/v1/admin/orgs/{orgId}/policy/approve":{"post":{"operationId":"approvePlatformOrganizationPolicy","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyTransitionDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationPolicyDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["adminOrganizationPolicies"]}},"/v1/admin/orgs/{orgId}/policy/reject":{"post":{"operationId":"rejectPlatformOrganizationPolicy","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectOrganizationPolicyDto"}}}},"responses":{"201":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationPolicyDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["adminOrganizationPolicies"]}},"/v1/admin/org-policies":{"get":{"operationId":"listPendingOrganizationPolicies","parameters":[],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationPolicyDto"}}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["adminOrganizationPolicies"]}},"/v1/orgs/{orgId}/analytics/live":{"get":{"operationId":"getOrganizationLive","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationLiveDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationAnalytics"]}},"/v1/orgs/{orgId}/analytics/year":{"get":{"operationId":"getOrganizationYear","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationYearDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationAnalytics"]}},"/v1/orgs/{orgId}/analytics":{"get":{"description":"Direct owner/admin JWT or organization key with analytics:read. Cost prices only; unpriced events are excluded from cost, never treated as zero-priced.","operationId":"getOrganizationAnalytics","parameters":[{"name":"orgId","required":true,"in":"path","schema":{"type":"string"}},{"name":"period","required":false,"in":"query","description":"UTC calendar period, through now; default 30d","schema":{"type":"string","enum":["7d","30d","month",null],"nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/OrganizationAnalyticsDto"}}}]}}}}},"security":[{"bearer":[]}],"summary":"","tags":["organizationAnalytics"]}},"/v1/billing/products":{"get":{"operationId":"getBillingProducts","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProductOfferDto"}}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Plans on sale","tags":["billing"]}},"/v1/billing/subscriptions/current":{"get":{"operationId":"getCurrentSubscription","parameters":[{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"The team's subscription, if it has one that has not finished","tags":["billing"]}},"/v1/billing/subscriptions":{"post":{"operationId":"startSubscription","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartSubscriptionDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartedSubscriptionDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Start a subscription and get the link the payer must approve at","tags":["billing"]}},"/v1/billing/subscriptions/{id}/cancel":{"post":{"operationId":"cancelSubscription","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelSubscriptionDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionDto"}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Stop future charges","tags":["billing"]}},"/v1/usage/summary":{"get":{"operationId":"getUsageSummary","parameters":[{"name":"teamId","required":true,"in":"query","description":"Whose spend. Membership is checked.","schema":{"example":"team-3f9c…","type":"string"}},{"name":"from","required":false,"in":"query","description":"Start of the period, inclusive. Omit BOTH bounds for the current month.","schema":{"type":"string","format":"date-time","example":"2026-08-01T00:00:00.000Z","nullable":true}},{"name":"to","required":false,"in":"query","description":"End of the period, exclusive. Half a range is refused, not guessed.","schema":{"type":"string","format":"date-time","example":"2026-09-01T00:00:00.000Z","nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/UsageSummaryDto"}}}]}}}}},"summary":"A team's consumption for a period — total, by agent, by visitor","tags":["usage"]}},"/v1/usage/total":{"get":{"operationId":"getUsageTotal","parameters":[{"name":"agentId","required":false,"in":"query","description":"One agent — the resale number.","schema":{"nullable":true,"example":"agent-3f9c…","type":"string"}},{"name":"leadId","required":false,"in":"query","description":"One visitor.","schema":{"nullable":true,"example":"lead-3f9c…","type":"string"}},{"name":"threadId","required":false,"in":"query","description":"One conversation. Filled by the passes that own a thread — the memory pass and the summariser; a turn's own tokens are found by `turnId`.","schema":{"nullable":true,"example":"chat-thread-3f9c…","type":"string"}},{"name":"turnId","required":false,"in":"query","description":"One exchange — what a single answer cost. The assistant message of a turn is stored under `${turnId}:assistant`, so a screen showing a reply already has this id.","schema":{"nullable":true,"example":"turn-3f9c…","type":"string"}},{"name":"teamId","required":true,"in":"query","description":"Whose spend. Membership is checked.","schema":{"example":"team-3f9c…","type":"string"}},{"name":"from","required":false,"in":"query","description":"Start of the period, inclusive. Omit BOTH bounds for the current month.","schema":{"type":"string","format":"date-time","example":"2026-08-01T00:00:00.000Z","nullable":true}},{"name":"to","required":false,"in":"query","description":"End of the period, exclusive. Half a range is refused, not guessed.","schema":{"type":"string","format":"date-time","example":"2026-09-01T00:00:00.000Z","nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UsageTotalDto"}}}}]}}}}},"summary":"One number: a team's, an agent's, a visitor's, a conversation's or a turn's","tags":["usage"]}},"/v1/usage/quota":{"get":{"operationId":"getUsageQuota","parameters":[{"name":"teamId","required":true,"in":"query","description":"Whose spend. Membership is checked.","schema":{"example":"team-3f9c…","type":"string"}},{"name":"from","required":false,"in":"query","description":"Start of the period, inclusive. Omit BOTH bounds for the current month.","schema":{"type":"string","format":"date-time","example":"2026-08-01T00:00:00.000Z","nullable":true}},{"name":"to","required":false,"in":"query","description":"End of the period, exclusive. Half a range is refused, not guessed.","schema":{"type":"string","format":"date-time","example":"2026-09-01T00:00:00.000Z","nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/QuotaStateDto"}}}]}}}}},"summary":"A team's ceiling for the current period, and how much of it is left","tags":["usage"]}},"/v1/usage/agents":{"get":{"operationId":"getUsageByAgent","parameters":[{"name":"teamId","required":true,"in":"query","description":"Whose spend. Membership is checked.","schema":{"example":"team-3f9c…","type":"string"}},{"name":"from","required":false,"in":"query","description":"Start of the period, inclusive. Omit BOTH bounds for the current month.","schema":{"type":"string","format":"date-time","example":"2026-08-01T00:00:00.000Z","nullable":true}},{"name":"to","required":false,"in":"query","description":"End of the period, exclusive. Half a range is refused, not guessed.","schema":{"type":"string","format":"date-time","example":"2026-09-01T00:00:00.000Z","nullable":true}}],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UsageSliceDto"}}}}]}}}}},"summary":"Consumption per agent — one line per agent that spent anything","tags":["usage"]}},"/v1/billing/payments":{"get":{"operationId":"listPayments","parameters":[{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaymentDto"}}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"What the provider actually collected from a team, one row per movement","tags":["billing"]}},"/v1/billing/payments/reconciliation":{"get":{"operationId":"getPaymentReconciliation","parameters":[{"name":"teamId","required":true,"in":"query","description":"Whose subscription. Membership is checked.","schema":{"example":"team-3f9c…","type":"string"}},{"name":"subscriptionId","required":true,"in":"query","schema":{"example":"subscription-3f9c…","type":"string"}},{"name":"since","required":false,"in":"query","description":"Compare from here. Defaults to 90 days back.","schema":{"type":"string","format":"date-time","example":"2026-06-01T00:00:00.000Z","nullable":true}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaymentDiscrepancyDto"}}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Where this api's record of a subscription's payments and the provider's own statement disagree — never auto-resolved","tags":["billing"]}},"/v1/billing/invoices/mine":{"get":{"operationId":"listPayerInvoices","parameters":[],"responses":{"200":{"description":"Successfully received model","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceDto"}}}}]}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"Own historical invoices, independent of team membership","tags":["billing"]}},"/v1/billing/invoices":{"get":{"operationId":"listInvoices","parameters":[{"name":"teamId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceDto"}}}}}},"security":[{"defaultBearerAuth":[]}],"summary":"What a team was billed for, one row per subscription period","tags":["billing"]}}},"info":{"title":"Agentfy 2.0 API","description":"Core + ephemeral agent brain","version":"0.1","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"defaultBearerAuth":{"scheme":"Bearer","bearerFormat":"Bearer","description":"JWT Bearer token","name":"Authorization","type":"http","in":"Header"}},"schemas":{"SingleModel":{"type":"object","properties":{"success":{"type":"boolean","example":true}},"required":["success"]},"CredentialAccessDto":{"type":"object","properties":{"organizationId":{"type":"string"},"environment":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["analytics:read","worker:logs:read","provision:create","provision:read","identity:authorize","identity:manage","chat:membership","chat:create","chat:read","chat:conversation:read","chat:event:append","chat:run","chat:context"]}}},"required":["organizationId","environment","scopes"]},"CredentialDto":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"namespace":{"type":"string"},"environment":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string","nullable":true},"kind":{"enum":["provisioning","identity_issuer","server_chat"],"type":"string","deprecated":true},"scopes":{"type":"array","items":{"type":"string","enum":["analytics:read","worker:logs:read","provision:create","provision:read","identity:authorize","identity:manage","chat:membership","chat:create","chat:read","chat:conversation:read","chat:event:append","chat:run","chat:context"]}},"issuedBy":{"type":"string"},"version":{"type":"number"},"predecessorId":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"lastUsedAt":{"type":"string","nullable":true,"format":"date-time"},"revokedAt":{"type":"string","nullable":true,"format":"date-time"},"rotatedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["id","organizationId","namespace","environment","name","prefix","kind","scopes","issuedBy","version","predecessorId","createdAt","expiresAt","lastUsedAt","revokedAt","rotatedAt"]},"IssuedCredentialDto":{"type":"object","properties":{"credential":{"$ref":"#/components/schemas/CredentialDto"},"secret":{"type":"string"}},"required":["credential","secret"]},"CreateCredentialDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["provisioning","identity_issuer","server_chat",null],"deprecated":true,"description":"Compatibility metadata only; scopes determine access.","nullable":true},"scopes":{"type":"array","items":{"type":"string","enum":["analytics:read","worker:logs:read","provision:create","provision:read","identity:authorize","identity:manage","chat:membership","chat:create","chat:read","chat:conversation:read","chat:event:append","chat:run","chat:context"]}},"expiresAt":{"type":"string","format":"date-time","nullable":true},"approveIdentityIssuance":{"type":"boolean","nullable":true},"approveServerChat":{"type":"boolean","nullable":true}},"required":["name","scopes"]},"RotateCredentialDto":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"overlapHours":{"type":"integer","minimum":0,"maximum":24,"default":0}},"required":["expectedVersion","overlapHours"]},"RequestRateDefaultsDto":{"type":"object","properties":{"minute":{"type":"number"},"hour":{"type":"number"},"day":{"type":"number"}},"required":["minute","hour","day"]},"OrganizationMemberDto":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"userId":{"type":"string"},"role":{"enum":["owner","admin","developer","billing","support"],"type":"string"}},"required":["id","organizationId","userId","role"]},"OrganizationDto":{"type":"object","properties":{"requestRateMinute":{"type":"number","nullable":true},"requestRateHour":{"type":"number","nullable":true},"requestRateDay":{"type":"number","nullable":true},"requestRateDefaults":{"$ref":"#/components/schemas/RequestRateDefaultsDto"},"id":{"type":"string"},"name":{"type":"string"},"namespace":{"type":"string"},"environment":{"enum":["test","production"],"type":"string"},"status":{"enum":["pending","active","suspended","closed"],"type":"string"},"permissions":{"type":"array","items":{"type":"string","enum":["agents.read","overview.read","analytics.read","settings.read","settings.write","operators.manage","commercial.read","integration.read","diagnostics.read"]}},"loginPolicy":{"enum":["external_only","linking_allowed"],"type":"string"},"redirectAllowlist":{"type":"array","items":{"type":"string"}},"agreementReference":{"type":"string"},"monthlyLimitUsdCents":{"type":"number","description":"Monthly spending budget in USD cents; 0 means unlimited"},"canEditMonthlyBudget":{"type":"boolean"},"monthlySpendUsdPico":{"type":"string","description":"Current UTC calendar month spend in USD picodollars"},"monthlyBudgetResetsAt":{"type":"string","description":"Start of the next calendar month in UTC"},"members":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationMemberDto"}}},"required":["id","name","namespace","environment","status","permissions"]},"CreateOrganizationDto":{"type":"object","properties":{"namespace":{"type":"string","maxLength":100,"pattern":"^[a-z0-9][a-z0-9:_-]{2,99}$"},"environment":{"type":"string","enum":["test","production"]},"name":{"type":"string","minLength":1,"maxLength":120},"loginPolicy":{"type":"string","default":"external_only","enum":["external_only","linking_allowed"]},"redirectAllowlist":{"type":"array","default":[],"uniqueItems":true,"maxItems":20,"items":{"type":"string","maxLength":2048}},"agreementReference":{"type":"string","deprecated":true,"description":"Legacy metadata; not required for free organizations","maxLength":500},"monthlyLimitUsdCents":{"type":"integer","description":"Active organization monthly spending budget in USD cents. 0 means unlimited. At the budget, agents receive 429 QUOTA_EXCEEDED until the next calendar month (UTC) or a budget increase.","minimum":0,"maximum":2147483647}},"required":["namespace","name"]},"OrganizationSettingsDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"loginPolicy":{"type":"string","default":"external_only","enum":["external_only","linking_allowed"]},"redirectAllowlist":{"type":"array","default":[],"uniqueItems":true,"maxItems":20,"items":{"type":"string","maxLength":2048}},"agreementReference":{"type":"string","deprecated":true,"description":"Legacy metadata; not required for free organizations","maxLength":500},"monthlyLimitUsdCents":{"type":"integer","description":"Active organization monthly spending budget in USD cents. 0 means unlimited. At the budget, agents receive 429 QUOTA_EXCEEDED until the next calendar month (UTC) or a budget increase.","minimum":0,"maximum":2147483647}},"required":["name"]},"SetOrganizationOperatorDto":{"type":"object","properties":{"userId":{"type":"string","minLength":1,"maxLength":100},"role":{"type":"string","enum":["owner","admin","developer","billing","support"]}},"required":["userId","role"]},"UserDto":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"locale":{"nullable":true,"enum":["en","ru","uk"],"type":"string","description":"The language the person last used the app in; null until the app has said"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","createdAt","updatedAt"]},"UpdateUserDto":{"type":"object","properties":{"name":{"type":"string","minLength":2,"example":"John Doe","nullable":true},"locale":{"type":"string","enum":["en","ru","uk",null],"description":"The language the person uses the app in; letters other people send them are written in it","nullable":true}}},"RegisterUserDto":{"type":"object","properties":{"email":{"type":"string","format":"email","example":"john@example.com"},"password":{"type":"string","minLength":8,"example":"secret123"},"name":{"type":"string","minLength":2,"example":"John Doe"},"language":{"type":"string","enum":["en","ru","uk",null],"description":"The language the app was shown in; the first team is named in it. English when absent.","nullable":true}},"required":["email","password","name"]},"AuthDto":{"type":"object","properties":{"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"user":{"$ref":"#/components/schemas/UserDto"}},"required":["accessToken","refreshToken","user"]},"LoginUserDto":{"type":"object","properties":{"email":{"type":"string","format":"email","example":"john@example.com"},"password":{"type":"string","minLength":1,"example":"secret123"}},"required":["email","password"]},"RefreshTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string"}},"required":["refreshToken"]},"AuthPrincipalDto":{"type":"object","properties":{"accountId":{"type":"string"},"actorId":{"type":"string"},"source":{"enum":["direct","partner"],"type":"string"},"audience":{"enum":["agentfy:user","agentfy:partner"],"type":"string"},"organizationId":{"type":"string","nullable":true},"environment":{"enum":["test","production"],"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"linkId":{"type":"string","nullable":true},"issuerId":{"type":"string","nullable":true},"familyId":{"type":"string"},"contextId":{"type":"string","nullable":true},"accountVersion":{"type":"number"},"actorVersion":{"type":"number"},"contextVersion":{"type":"number","nullable":true}},"required":["accountId","actorId","source","audience","organizationId","environment","scopes","linkId","issuerId","familyId","contextId","accountVersion","actorVersion","contextVersion"]},"ForgotPasswordDto":{"type":"object","properties":{"email":{"type":"string","format":"email","example":"john@example.com"},"locale":{"type":"string","enum":["en","ru","uk",null],"description":"The language of the letter; English when absent","nullable":true}},"required":["email"]},"LinkTokenDto":{"type":"object","properties":{"token":{"type":"string","maxLength":256,"description":"The token from the link in the letter"}},"required":["token"]},"ResetPasswordDto":{"type":"object","properties":{"token":{"type":"string","maxLength":256,"description":"The token from the link in the letter"},"password":{"type":"string","minLength":8,"example":"secret123"}},"required":["token","password"]},"ChangePasswordDto":{"type":"object","properties":{"currentPassword":{"type":"string"},"newPassword":{"type":"string","minLength":8,"example":"secret123"}},"required":["currentPassword","newPassword"]},"PendingEmailDto":{"type":"object","properties":{"email":{"type":"string","nullable":true},"expiresAt":{"type":"string","nullable":true}},"required":["email","expiresAt"]},"ChangeEmailDto":{"type":"object","properties":{"email":{"type":"string","format":"email","example":"john@example.com"},"currentPassword":{"type":"string"},"locale":{"type":"string","enum":["en","ru","uk",null],"description":"The language of the letter; English when absent","nullable":true}},"required":["email","currentPassword"]},"ConfirmEmailDto":{"type":"object","properties":{"token":{"type":"string","maxLength":256,"description":"The token from the link in the letter"},"locale":{"type":"string","enum":["en","ru","uk",null],"description":"The language of the letter; English when absent","nullable":true}},"required":["token"]},"ScopedTeamDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"enum":["owner","admin","member"],"type":"string"}},"required":["id","name","role"]},"TeamLlmTierDto":{"type":"object","properties":{"planMax":{"enum":["simple","smart","genius"],"type":"string","description":"What the team's plan allows. Options above it cannot be chosen."},"chosen":{"nullable":true,"enum":["simple","smart","genius"],"type":"string","description":"What the team chose for itself, or null for «as high as the plan allows»."},"max":{"enum":["simple","smart","genius"],"type":"string","description":"What binds: the lower of the plan’s ceiling and the team’s choice. No model call of this team runs above it."}},"required":["planMax","max"]},"TeamDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"key":{"type":"string","nullable":true,"example":"myteam","description":"The team's code name — what /teams/<here>/… accepts instead of the id. Null when the team has never claimed one."},"planId":{"type":"string","nullable":true},"llmTier":{"$ref":"#/components/schemas/TeamLlmTierDto"},"role":{"enum":["owner","admin","member"],"type":"string","description":"The caller's role in this team"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","llmTier","role","createdAt","updatedAt"]},"CreateTeamDto":{"type":"object","properties":{"name":{"type":"string","minLength":2,"example":"Acme Store"},"key":{"type":"string","example":"myteam","minLength":3,"maxLength":32,"description":"The team's code name — the short thing a person types instead of its id, as in /teams/myteam/skills. Lower case, digits and hyphens; folded to lower case, so MyTeam and myteam are the same name. Optional: a team without one is addressed by its id.","nullable":true}},"required":["name"]},"UpdateTeamDto":{"type":"object","properties":{"name":{"type":"string","minLength":2,"example":"Acme Store","nullable":true},"key":{"type":"string","example":"myteam","minLength":3,"maxLength":32,"description":"A new code name for the team. The one it replaces is retired permanently and can never be claimed by another team, so an address that used to work stops working rather than leading somewhere else.","nullable":true},"maxLlmTier":{"type":"string","enum":["simple","smart","genius",null],"description":"The highest model level the team's agents may reach — simple, smart or genius. A ceiling, not a starting point: an ordinary question is still answered by the junior model, and a harder one climbs no further than this. Must be within what the team's plan allows (see llmTier.planMax); null means «as high as the plan allows».","nullable":true}}},"TeamMemberUserDto":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"hasRegistered":{"type":"boolean","description":"False for invited users that have not registered yet"}},"required":["id","email","hasRegistered"]},"TeamMemberDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"role":{"enum":["owner","admin","member"],"type":"string"},"user":{"$ref":"#/components/schemas/TeamMemberUserDto"},"createdAt":{"type":"string"}},"required":["id","teamId","role","user","createdAt"]},"UpdateTeamMemberRoleDto":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member"]}},"required":["role"]},"TeamInvitationDto":{"type":"object","properties":{"id":{"type":"string","description":"Also the address of the invitation page: /invitations/{id}."},"teamId":{"type":"string"},"teamName":{"type":"string"},"email":{"type":"string","example":"colleague@example.com"},"role":{"type":"string","enum":["admin","member"]},"status":{"enum":["pending","accepted","declined","revoked"],"type":"string"},"invitedBy":{"type":"string","nullable":true,"description":"Who asked, by name or address."},"createdAt":{"type":"string"}},"required":["id","teamId","teamName","email","role","status","createdAt"]},"CreateTeamInvitationDto":{"type":"object","properties":{"email":{"type":"string","format":"email","example":"colleague@example.com"},"role":{"type":"string","enum":["admin","member",null],"default":"member","description":"Ownership is handed over inside the team, never by invitation.","nullable":true},"locale":{"type":"string","enum":["en","ru","uk",null],"description":"The language of the letter; English when absent","nullable":true}},"required":["email"]},"TeamInvitationCreatedDto":{"type":"object","properties":{"invitation":{"$ref":"#/components/schemas/TeamInvitationDto"},"emailSent":{"type":"boolean","description":"Whether the invitation letter left. False with no mail transport or a refused letter: the inviter passes the link on."}},"required":["invitation","emailSent"]},"ConversationTimelineEventDto":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"timestamp":{"type":"string"},"turnId":{"type":"string","nullable":true},"status":{"type":"string","nullable":true},"role":{"type":"string","nullable":true},"characters":{"type":"number","nullable":true},"attachmentCount":{"type":"number","nullable":true},"attachmentTypes":{"type":"array","items":{"type":"string"}},"endedAt":{"type":"string","nullable":true},"durationMs":{"type":"number","nullable":true},"models":{"type":"array","items":{"type":"string"}},"tokens":{"type":"number","nullable":true},"errorCode":{"type":"string","nullable":true},"toolName":{"type":"string","nullable":true},"toolCallId":{"type":"string","nullable":true},"serverId":{"type":"string","nullable":true},"argumentNames":{"type":"array","items":{"type":"string"}},"resultBytes":{"type":"number","nullable":true},"reason":{"type":"string","nullable":true},"stage":{"type":"string","nullable":true}},"required":["id","kind","timestamp","turnId","status","role","characters","attachmentCount","attachmentTypes","endedAt","durationMs","models","tokens","errorCode","toolName","toolCallId","serverId","argumentNames","resultBytes","reason","stage"]},"ConversationTimelinePageDto":{"type":"object","properties":{"conversationId":{"type":"string"},"focusTurnId":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/ConversationTimelineEventDto"}},"total":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"}},"required":["conversationId","focusTurnId","items","total","page","pageSize"]},"McpDiagnosticConversationDto":{"type":"object","properties":{"threadId":{"type":"string"},"organizationId":{"type":"string"},"teamId":{"type":"string"},"agentId":{"type":"string"},"actorKind":{"type":"string"},"externalTeamId":{"type":"string","nullable":true},"active":{"type":"boolean"},"allowedMcpTools":{"type":"array","items":{"type":"string"}},"createdAt":{"format":"date-time","type":"string"}},"required":["threadId","organizationId","teamId","agentId","actorKind","externalTeamId","active","allowedMcpTools","createdAt"]},"McpDiagnosticThreadDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"agentId":{"type":"string","nullable":true}},"required":["id","teamId","agentId"]},"McpDiagnosticAgentDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"teamId":{"type":"string"},"status":{"type":"string"}},"required":["id","name","teamId","status"]},"McpDiagnosticServerDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"teamId":{"type":"string"},"credentialAgentId":{"type":"string","nullable":true},"trustedContext":{"type":"boolean"},"lastError":{"type":"string","nullable":true},"discoveredAt":{"format":"date-time","type":"string","nullable":true}},"required":["id","name","url","teamId","credentialAgentId","trustedContext","lastError","discoveredAt"]},"McpDiagnosticContextDto":{"type":"object","properties":{"serverId":{"type":"string"},"version":{"type":"number"},"updatedAt":{"format":"date-time","type":"string"},"expiresAt":{"format":"date-time","type":"string"},"revokedAt":{"format":"date-time","type":"string","nullable":true}},"required":["serverId","version","updatedAt","expiresAt","revokedAt"]},"McpDecisionDto":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"organizationId":{"type":"string","nullable":true},"teamId":{"type":"string","nullable":true},"agentId":{"type":"string"},"serverId":{"type":"string","nullable":true},"conversationId":{"type":"string","nullable":true},"turnId":{"type":"string","nullable":true},"toolCallId":{"type":"string","nullable":true},"toolName":{"type":"string","nullable":true},"stage":{"type":"string"},"decision":{"type":"string"},"reason":{"type":"string","nullable":true}},"required":["id","createdAt","organizationId","teamId","agentId","serverId","conversationId","turnId","toolCallId","toolName","stage","decision","reason"]},"McpDiagnosticDto":{"type":"object","properties":{"conversationId":{"type":"string"},"organizationId":{"type":"string","nullable":true},"conversation":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/McpDiagnosticConversationDto"}]},"thread":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/McpDiagnosticThreadDto"}]},"agent":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/McpDiagnosticAgentDto"}]},"teamMismatch":{"type":"boolean"},"servers":{"type":"array","items":{"$ref":"#/components/schemas/McpDiagnosticServerDto"}},"contexts":{"type":"array","items":{"$ref":"#/components/schemas/McpDiagnosticContextDto"}},"decisions":{"type":"array","items":{"$ref":"#/components/schemas/McpDecisionDto"}},"decisionsTruncated":{"type":"boolean"},"retentionDays":{"type":"number"}},"required":["conversationId","organizationId","conversation","thread","agent","teamMismatch","servers","contexts","decisions","decisionsTruncated","retentionDays"]},"McpDecisionPageDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/McpDecisionDto"}},"total":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"},"retentionDays":{"type":"number"}},"required":["items","total","page","pageSize","retentionDays"]},"McpDenialCountDto":{"type":"object","properties":{"reason":{"type":"string"},"count":{"type":"number"}},"required":["reason","count"]},"McpDenialSummaryDto":{"type":"object","properties":{"since":{"format":"date-time","type":"string"},"total":{"type":"number"},"reasons":{"type":"array","items":{"$ref":"#/components/schemas/McpDenialCountDto"}}},"required":["since","total","reasons"]},"PlatformAdminDto":{"type":"object","properties":{"userId":{"type":"string"},"email":{"type":"string"},"platformRole":{"type":"string","nullable":true,"enum":["admin"]}},"required":["userId","email"]},"OrganizationRequestRateDto":{"type":"object","properties":{"requestRateMinute":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Requests per 60 seconds; null restores the environment default","nullable":true},"requestRateHour":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Requests per 3600 seconds; null restores the environment default","nullable":true},"requestRateDay":{"type":"integer","minimum":1,"maximum":2147483647,"description":"Requests per 86400 seconds; null restores the environment default","nullable":true}},"required":["requestRateMinute","requestRateHour","requestRateDay"]},"OrganizationStatusDto":{"type":"object","properties":{"status":{"type":"string","enum":["pending","active","suspended","closed"]}},"required":["status"]},"OidcOptionsDto":{"type":"object","properties":{"name":{"type":"string","nullable":true},"loginUrl":{"type":"string","nullable":true},"passwordEnabled":{"type":"boolean"}},"required":["passwordEnabled"]},"OidcRedeemDto":{"type":"object","properties":{"handoff":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"verifier":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["handoff","verifier"]},"OidcAuthDto":{"type":"object","properties":{"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"user":{"$ref":"#/components/schemas/UserDto"},"logoutHandle":{"type":"string"}},"required":["accessToken","refreshToken","user","logoutHandle"]},"OidcLogoutDto":{"type":"object","properties":{"handle":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"refreshToken":{"type":"string","maxLength":16384}},"required":["handle","refreshToken"]},"OidcUrlDto":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]},"OverviewOrganizationAgentDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"teamId":{"type":"string"},"teamName":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"ownerId":{"type":"string"},"ownerEmail":{"type":"string","nullable":true},"model":{"type":"string","nullable":true},"tier":{"type":"string","nullable":true},"toolCount":{"type":"number"},"lastActivityAt":{"format":"date-time","type":"string","nullable":true}},"required":["id","name","teamId","teamName","type","status","ownerId","ownerEmail","model","tier","toolCount","lastActivityAt"]},"OrganizationAgentPageDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OverviewOrganizationAgentDto"}},"total":{"type":"number"},"page":{"type":"number"},"pageSize":{"type":"number"}},"required":["items","total","page","pageSize"]},"AgentConfigurationHeartbeatDto":{"type":"object","properties":{"configured":{"type":"boolean"},"enabled":{"type":"boolean"},"intervalMin":{"type":"number","nullable":true},"lastRunAt":{"format":"date-time","type":"string","nullable":true}},"required":["configured","enabled","intervalMin","lastRunAt"]},"AgentConfigurationChannelHeartbeatDto":{"type":"object","properties":{"channel":{"type":"string"},"enabled":{"type":"boolean"},"intervalMin":{"type":"number"},"lastRunAt":{"format":"date-time","type":"string","nullable":true}},"required":["channel","enabled","intervalMin","lastRunAt"]},"AgentConfigurationSkillDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"body":{"type":"string"},"frontmatter":{"type":"object","additionalProperties":true}},"required":["id","name","body","frontmatter"]},"AgentConfigurationMcpDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"transport":{"type":"string"},"secretKeys":{"type":"array","items":{"type":"string"}}},"required":["id","name","url","transport","secretKeys"]},"AgentConfigurationSecretDto":{"type":"object","properties":{"pendingKeys":{"description":"Declared credential key names with no stored value yet.","type":"array","items":{"type":"string"}},"userId":{"type":"string","nullable":true,"description":"User addressed by a user-scoped credential; no credential value."},"scope":{"type":"string"},"keys":{"type":"array","items":{"type":"string"}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["pendingKeys","userId","scope","keys","createdAt","updatedAt"]},"AgentConfigurationFolderDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"AgentConfigurationPeerDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"AgentConfigurationChannelDto":{"type":"object","properties":{"type":{"type":"string"},"externalId":{"type":"string"},"enabled":{"type":"boolean"},"allowHands":{"type":"boolean"},"allowMemory":{"type":"boolean"},"allowSchedule":{"type":"boolean"},"allowVisibility":{"type":"boolean"}},"required":["type","externalId","enabled","allowHands","allowMemory","allowSchedule","allowVisibility"]},"AgentConfigurationCardLinkDto":{"type":"object","properties":{"publicId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"revokedAt":{"format":"date-time","type":"string","nullable":true},"lastServedAt":{"format":"date-time","type":"string","nullable":true}},"required":["publicId","createdAt","revokedAt","lastServedAt"]},"AgentConfigurationAccessDto":{"type":"object","properties":{"channelUserId":{"type":"string"},"userId":{"type":"string","nullable":true},"status":{"type":"string"},"strategy":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"}},"required":["channelUserId","userId","status","strategy","createdAt"]},"AgentConfigurationDto":{"type":"object","properties":{"model":{"type":"string","nullable":true,"description":"Configured modelId; null means automatic model selection."},"tier":{"type":"string","nullable":true,"description":"Team maxLlmTier ceiling, not the selected tier of a turn; null means plan default."},"id":{"type":"string"},"soul":{"type":"string","nullable":true},"user":{"type":"string","nullable":true},"heartbeat":{"type":"string","nullable":true},"config":{"type":"object","additionalProperties":true},"maxTurnIterations":{"type":"number","nullable":true},"promptLogEnabled":{"type":"boolean"},"autostart":{"$ref":"#/components/schemas/AgentConfigurationHeartbeatDto"},"channelHeartbeats":{"type":"array","items":{"$ref":"#/components/schemas/AgentConfigurationChannelHeartbeatDto"}},"skills":{"type":"array","items":{"$ref":"#/components/schemas/AgentConfigurationSkillDto"}},"mcpServers":{"type":"array","items":{"$ref":"#/components/schemas/AgentConfigurationMcpDto"}},"secrets":{"type":"array","items":{"$ref":"#/components/schemas/AgentConfigurationSecretDto"}},"knowledgeFolders":{"type":"array","items":{"$ref":"#/components/schemas/AgentConfigurationFolderDto"}},"asks":{"type":"array","items":{"$ref":"#/components/schemas/AgentConfigurationPeerDto"}},"askedBy":{"type":"array","items":{"$ref":"#/components/schemas/AgentConfigurationPeerDto"}},"channels":{"type":"array","items":{"$ref":"#/components/schemas/AgentConfigurationChannelDto"}},"cardLinks":{"type":"array","items":{"$ref":"#/components/schemas/AgentConfigurationCardLinkDto"}},"discoveryEnabled":{"type":"boolean"},"access":{"type":"array","items":{"$ref":"#/components/schemas/AgentConfigurationAccessDto"}}},"required":["model","tier","id","soul","user","heartbeat","config","maxTurnIterations","promptLogEnabled","autostart","channelHeartbeats","skills","mcpServers","secrets","knowledgeFolders","asks","askedBy","channels","cardLinks","discoveryEnabled","access"]},"TeamOverviewDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"memberCount":{"type":"number","description":"People in the team."},"agentCount":{"type":"number","description":"Agents the team owns, every status included."},"createdAt":{"type":"string"},"lastActivityAt":{"type":"string","nullable":true,"description":"When anyone last exchanged a message with any of the team's agents. The time only — the platform admin does not see conversations. Null when the team has never had one."}},"required":["id","name","memberCount","agentCount","createdAt"]},"TeamOverviewPageDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TeamOverviewDto"}},"total":{"type":"number","description":"Teams on the platform, not on this page."},"scopeTotal":{"type":"number","description":"The same rows counted with the search and the filters ignored — the \"of 126\" in \"12 of 126\". Equal to `total` when nothing is narrowing."},"page":{"type":"number"},"pageSize":{"type":"number"}},"required":["items","total","scopeTotal","page","pageSize"]},"OverviewTallyDto":{"type":"object","properties":{"key":{"type":"string","description":"The word the database holds — a role, a status."},"count":{"type":"number"}},"required":["key","count"]},"TeamRecordOwnerDto":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true}},"required":["id","email"]},"TeamRecordDto":{"type":"object","properties":{"organizationPaid":{"type":"boolean","description":"Usage paid by the organization; team tariff ceilings do not apply."},"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string"},"planId":{"type":"string","nullable":true,"description":"The billing plan this team is on. Null when it has never been put on one."},"memberCount":{"type":"number","description":"People in the team."},"membersByRole":{"description":"Those people by their role in this team — owner, admin, member.","type":"array","items":{"$ref":"#/components/schemas/OverviewTallyDto"}},"owner":{"nullable":true,"description":"The account holding the team's oldest `owner` membership. Null when the team has no owner row at all — a real state, and a different one from an owner whose name is unset.","type":"object","allOf":[{"$ref":"#/components/schemas/TeamRecordOwnerDto"}]},"agentCount":{"type":"number","description":"Agents the team owns, every status included."},"agentsByStatus":{"description":"Those agents by status — active, disabled, archived.","type":"array","items":{"$ref":"#/components/schemas/OverviewTallyDto"}},"lastActivityAt":{"type":"string","nullable":true,"description":"When anyone last exchanged a message with any of the team's agents. The time only — the platform admin does not see conversations. Null when the team has never had one."}},"required":["organizationPaid","id","name","createdAt","memberCount","membersByRole","agentCount","agentsByStatus"]},"UserMembershipDto":{"type":"object","properties":{"teamId":{"type":"string"},"teamName":{"type":"string"},"role":{"type":"string","description":"The role inside that team — owner | admin | member. A team admin is NOT a platform admin."}},"required":["teamId","teamName","role"]},"UserOverviewDto":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"createdAt":{"type":"string","description":"When the account was created. There is deliberately no \"last signed in\" here — nothing in the system records a sign-in yet."},"memberships":{"description":"Every team this person belongs to.","type":"array","items":{"$ref":"#/components/schemas/UserMembershipDto"}},"platformAdmin":{"type":"boolean","description":"Whether this person administers the PLATFORM. Not to be confused with the per-team role above: a team admin is not a platform admin."}},"required":["id","email","createdAt","memberships","platformAdmin"]},"UserOverviewPageDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UserOverviewDto"}},"total":{"type":"number","description":"People matching the filter, not on this page."},"scopeTotal":{"type":"number","description":"The same rows counted with the search and the filters ignored — the \"of 126\" in \"12 of 126\". Equal to `total` when nothing is narrowing."},"page":{"type":"number"},"pageSize":{"type":"number"}},"required":["items","total","scopeTotal","page","pageSize"]},"UserRecordTeamDto":{"type":"object","properties":{"teamId":{"type":"string"},"teamName":{"type":"string"},"role":{"type":"string","description":"The role inside that team — owner | admin | member. A team admin is NOT a platform admin."}},"required":["teamId","teamName","role"]},"UserRecordDto":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"createdAt":{"type":"string","description":"When the account was created. There is deliberately no \"last signed in\" — nothing in the system records a sign-in yet."},"platformAdmin":{"type":"boolean","description":"Whether this person administers the PLATFORM. Not the per-team role: a team admin is not a platform admin."},"registered":{"type":"boolean","description":"Whether the account has ever been given a password — false means an invited stub who never finished signing up. Derived from a count in the database; the hash is never read."},"teamCount":{"type":"number","description":"Teams this person belongs to, in total."},"memberships":{"description":"The first 20 of those teams, oldest membership first. Compare with teamCount: a person in more teams than that has the rest left off on purpose.","type":"array","items":{"$ref":"#/components/schemas/UserRecordTeamDto"}},"agentCount":{"type":"number","description":"Agents whose owner is this person, anywhere on the platform — including in teams they have since left."}},"required":["id","email","createdAt","platformAdmin","registered","teamCount","memberships","agentCount"]},"AgentOverviewDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"teamId":{"type":"string"},"teamName":{"type":"string"},"ownerId":{"type":"string"},"ownerEmail":{"type":"string","nullable":true,"description":"Null when the owning account no longer exists."},"ownerName":{"type":"string","nullable":true},"type":{"type":"string","description":"standard | concierge"},"status":{"type":"string","description":"active | disabled | archived"},"autostartEnabled":{"type":"boolean","description":"Whether the agent wakes itself up on a schedule. The flag only, never the prompt."},"createdAt":{"type":"string"}},"required":["id","name","teamId","teamName","ownerId","type","status","autostartEnabled","createdAt"]},"AgentOverviewPageDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AgentOverviewDto"}},"total":{"type":"number","description":"Agents matching the filter, not on this page."},"scopeTotal":{"type":"number","description":"The same rows counted with the search and the filters ignored — the \"of 126\" in \"12 of 126\". Equal to `total` when nothing is narrowing."},"page":{"type":"number"},"pageSize":{"type":"number"}},"required":["items","total","scopeTotal","page","pageSize"]},"AgentRecordAutostartDto":{"type":"object","properties":{"configured":{"type":"boolean","description":"Whether this agent has a heartbeat row at all. False means nobody has ever decided — which is not the same as having decided against it."},"enabled":{"type":"boolean","description":"Whether it currently wakes itself up. False when not configured."},"intervalMin":{"type":"number","nullable":true,"description":"Minutes between self-initiated turns. Null when not configured."},"lastRunAt":{"type":"string","nullable":true,"description":"When it last woke itself. Null both when it is not configured and when it is configured but has never run — the two are told apart by `configured`."}},"required":["configured","enabled"]},"AgentRecordHoldingsDto":{"type":"object","properties":{"conversations":{"type":"number","description":"Conversation threads. The conversations themselves are not shown."},"messages":{"type":"number","description":"Messages across those threads. The messages themselves are not shown."},"memories":{"type":"number","description":"Notes the agent has kept. Their text is not shown."},"skills":{"type":"number","description":"Skills this agent uses. The skills belong to the TEAM (AGNT2-269), so this counts connections rather than possessions; their text is not shown."},"secrets":{"type":"number","description":"Stored credentials. Neither their values nor their names are shown."},"accessGrants":{"type":"number","description":"Grants saying who inside the team may use this agent."},"activityEntries":{"type":"number","description":"Entries in its activity log."}},"required":["conversations","messages","memories","skills","secrets","accessGrants","activityEntries"]},"AgentRecordActivityDto":{"type":"object","properties":{"kind":{"type":"string","description":"What kind of thing it was — answer, silent_tick, memory_written…"},"outcome":{"type":"string","description":"How it ended — done, failed…"},"createdAt":{"type":"string"}},"required":["kind","outcome","createdAt"]},"AgentRecordDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true,"description":"Null when nobody has written one. An emptied description reads the same way."},"teamId":{"type":"string"},"teamName":{"type":"string"},"ownerId":{"type":"string"},"ownerEmail":{"type":"string","nullable":true,"description":"Null when the owning account no longer exists."},"ownerName":{"type":"string","nullable":true},"type":{"type":"string","description":"standard | concierge"},"status":{"type":"string","description":"active | disabled | archived"},"runtimeProfile":{"type":"string","description":"none | light | browser | heavy | warm — whether a turn may raise a worker at all."},"externalId":{"type":"string","nullable":true,"description":"The package origin id it was imported under. Null when it was created on this installation rather than imported."},"promptLogEnabled":{"type":"boolean","description":"Whether prompt recording is enabled for platform diagnostics (AGNT2-154). The flag only — the recordings live behind their own screen."},"promptLogRetentionDays":{"type":"number","description":"Configured retention window for full prompt recordings, in days."},"hasPersona":{"type":"boolean","description":"Whether a persona (SOUL.md) has been written. Never the persona itself."},"hasUserContext":{"type":"boolean","description":"Whether per-user context (USER.md) has been written. Never the text itself."},"hasHeartbeatText":{"type":"boolean","description":"Whether a heartbeat prompt (HEARTBEAT.md) has been written. Never the text itself."},"autostart":{"$ref":"#/components/schemas/AgentRecordAutostartDto"},"holdings":{"description":"How much this agent holds. Counts only — none of it is readable from the panel.","allOf":[{"$ref":"#/components/schemas/AgentRecordHoldingsDto"}]},"lastMessageAt":{"type":"string","nullable":true,"description":"When the newest message in any of its threads was sent. The clock only. Null when it has never been spoken to."},"lastActivity":{"nullable":true,"description":"The newest entry of its activity log — what kind and how it ended, never the summary text. Null when it has never done anything.","type":"object","allOf":[{"$ref":"#/components/schemas/AgentRecordActivityDto"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","teamId","teamName","ownerId","type","status","runtimeProfile","promptLogEnabled","promptLogRetentionDays","hasPersona","hasUserContext","hasHeartbeatText","autostart","holdings","createdAt","updatedAt"]},"AgentLogCauseDto":{"type":"object","properties":{"name":{"type":"string","nullable":true,"description":"The error’s class — TypeError, LlmTimedOutError, PrismaClientInitializationError."},"message":{"type":"string","description":"The error’s message, with anything credential-shaped masked BEFORE it was stored."},"code":{"type":"string","nullable":true,"description":"The domain code, when the failure was a classified one (LLM_TIMED_OUT…)."}},"required":["message"]},"AgentLogEntryDto":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","description":"answer, silent_tick, tick_failed, memory_written…"},"outcome":{"type":"string","description":"done, refused, failed"},"code":{"type":"string","description":"The event code — answer.failed, tick.silent, memory.written…"},"humanInitiated":{"type":"boolean","description":"true when a person asked for it in a conversation"},"turnId":{"type":"string","nullable":true,"description":"The turn this row came out of — the key a complaint is looked up by."},"ms":{"type":"number","nullable":true,"description":"How long the turn lived before it ended, when the row recorded it."},"cause":{"nullable":true,"description":"Why it broke. Present on a failed turn or a failed tick; null on every other row.","type":"object","allOf":[{"$ref":"#/components/schemas/AgentLogCauseDto"}]},"createdAt":{"type":"string"}},"required":["id","kind","outcome","code","humanInitiated","createdAt"]},"AgentLogPageDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AgentLogEntryDto"}},"total":{"type":"number","description":"Rows matching the turn filter — all of them, not only the ones returned."},"limit":{"type":"number","description":"The limit that was applied."}},"required":["items","total","limit"]},"PromptLogSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"agentId":{"type":"string"},"teamId":{"type":"string"},"userId":{"type":"string","nullable":true,"description":"Null for a self-initiated tick."},"turnId":{"type":"string","nullable":true},"step":{"type":"number","description":"Which model round-trip of the turn, 1-based."},"streamed":{"type":"boolean","description":"The streamed path (extended thinking) or the blocking one."},"model":{"type":"string"},"bytes":{"type":"number","description":"Size of the stored prompt in bytes."},"messageCount":{"type":"number"},"toolCount":{"type":"number"},"createdAt":{"type":"string"}},"required":["id","agentId","teamId","step","streamed","model","bytes","messageCount","toolCount","createdAt"]},"PromptLogPageDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PromptLogSummaryDto"}},"total":{"type":"number","description":"Recordings matching the filter, not on this page."},"page":{"type":"number"},"pageSize":{"type":"number"},"retentionDays":{"type":"number","description":"How long a recording is kept. Nothing older than this exists."}},"required":["items","total","page","pageSize","retentionDays"]},"PromptLogVolumeDto":{"type":"object","properties":{"rows":{"type":"number"},"bytes":{"type":"number"},"agents":{"type":"number","description":"Agents with at least one recording."},"bytesPerRequest":{"type":"number","description":"Average size of one model round-trip."},"bytesPerTurn":{"type":"number","description":"Average size of one whole exchange."},"oldest":{"type":"string","nullable":true},"newest":{"type":"string","nullable":true},"retentionDays":{"type":"number"}},"required":["rows","bytes","agents","bytesPerRequest","bytesPerTurn","retentionDays"]},"PromptLogEntryDto":{"type":"object","properties":{"id":{"type":"string"},"agentId":{"type":"string"},"teamId":{"type":"string"},"userId":{"type":"string","nullable":true,"description":"Null for a self-initiated tick."},"turnId":{"type":"string","nullable":true},"step":{"type":"number","description":"Which model round-trip of the turn, 1-based."},"streamed":{"type":"boolean","description":"The streamed path (extended thinking) or the blocking one."},"model":{"type":"string"},"bytes":{"type":"number","description":"Size of the stored prompt in bytes."},"messageCount":{"type":"number"},"toolCount":{"type":"number"},"createdAt":{"type":"string"},"systemPrompt":{"type":"string","description":"The assembled system prompt, verbatim."},"messages":{"type":"array","items":{"type":"object"},"description":"The conversation as sent: `{ role, content }`, content being text or content blocks."},"tools":{"type":"array","items":{"type":"object"},"description":"Every tool declared for this request, with its input schema."},"maxTokens":{"type":"number","nullable":true},"thinkingBudget":{"type":"number","nullable":true,"description":"Extended-thinking budget, when one was asked for."}},"required":["id","agentId","teamId","step","streamed","model","bytes","messageCount","toolCount","createdAt","systemPrompt","messages","tools"]},"AuditEntryDto":{"type":"object","properties":{"id":{"type":"string"},"actorId":{"type":"string","description":"The platform administrator who did it."},"actorEmail":{"type":"string","description":"Their email as it read at the moment of the action. Frozen on purpose: an account can be renamed, and can leave."},"action":{"enum":["agent.status","agent.promptRecording","agent.autostart","team.rename","team.plan","agent.delete","setting.change","setting.reset","setting.inventory.view"],"type":"string","description":"What was done — agent.status, agent.autostart, team.rename, agent.delete."},"targetType":{"enum":["agent","team","user","setting"],"type":"string","description":"What kind of thing it was done to."},"targetId":{"type":"string"},"targetLabel":{"type":"string","description":"The name the target had at the time. For a deletion this is all that is left of it."},"teamId":{"type":"string","nullable":true,"description":"The tenant whose data was touched. Null when the target is not inside one."},"before":{"type":"object","additionalProperties":true,"description":"What the touched fields held BEFORE. Only the fields this action changed — never the whole record."},"after":{"type":"object","additionalProperties":true,"nullable":true,"description":"What they hold now. Null for a deletion: there is no after."},"consequences":{"type":"object","additionalProperties":true,"nullable":true,"description":"The numbers the operator was shown before confirming a destructive action, as they were shown. Null for everything else. It cannot be recomputed — the rows it counted are gone."},"createdAt":{"type":"string"}},"required":["id","actorId","actorEmail","action","targetType","targetId","targetLabel","before","createdAt"]},"AuditPageDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AuditEntryDto"}},"total":{"type":"number","description":"Rows matching the filter, not rows on this page."},"page":{"type":"number"},"pageSize":{"type":"number"},"retentionDays":{"type":"number","description":"How long a row is kept. The screen says this out loud rather than letting a reader assume the trail is forever."}},"required":["items","total","page","pageSize","retentionDays"]},"AdminAgentConsequenceDto":{"type":"object","properties":{"name":{"type":"string","description":"The agent’s name, so the dialog can name what it is about to lose."},"conversations":{"type":"number"},"messages":{"type":"number","description":"Every message in every one of those conversations."},"memories":{"type":"number","description":"Notes the agent wrote about the people who use it."},"skills":{"type":"number","description":"Skills this agent uses. NOT destroyed with it (AGNT2-269): a skill belongs to the team and other agents may be using the same one — the agent simply stops using them."},"secrets":{"type":"number","description":"Credentials this agent owns. The team’s shared credentials are NOT counted: they have no agent and survive it."},"accessGrants":{"type":"number"},"activityEntries":{"type":"number","description":"Entries in its work history."},"promptRecordings":{"type":"number","description":"Recorded prompts — conversations, so they are named separately."}},"required":["name","conversations","messages","memories","skills","secrets","accessGrants","activityEntries","promptRecordings"]},"AdminAgentStateDto":{"type":"object","properties":{"promptLogEnabled":{"type":"boolean"},"id":{"type":"string"},"name":{"type":"string"},"teamId":{"type":"string"},"status":{"type":"string","description":"Where it is now — the action having been applied."}},"required":["promptLogEnabled","id","name","teamId","status"]},"AdminAgentStatusDto":{"type":"object","properties":{"status":{"type":"string","enum":["active","disabled"],"description":"Where to move the agent. Only active and disabled: both directions are reversible and neither destroys anything. Archiving is not offered here — it also hides the agent from its owner’s own list, which is a change to their screen rather than to their agent."}},"required":["status"]},"AdminAgentPromptRecordingDto":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Record full prompts for platform diagnostics. Existing recordings keep their expiry."}},"required":["enabled"]},"AdminAgentDeletedDto":{"type":"object","properties":{"id":{"type":"string"},"removed":{"description":"What went with it, measured inside the transaction that deleted it.","allOf":[{"$ref":"#/components/schemas/AdminAgentConsequenceDto"}]}},"required":["id","removed"]},"AdminAgentDeleteDto":{"type":"object","properties":{"confirmName":{"type":"string","description":"The agent’s current name, repeated back exactly. Without it the deletion is refused with DELETE_NOT_CONFIRMED — the endpoint does not rely on the caller having read the numbers."}},"required":["confirmName"]},"AdminTeamStateDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The name it now has."}},"required":["id","name"]},"AdminTeamRenameDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"The team’s new name. The id every other row points at does not move."}},"required":["name"]},"AdminTeamPlanDto":{"type":"object","properties":{"id":{"type":"string"},"planId":{"type":"string","nullable":true,"description":"The tariff it is on now, or null."}},"required":["id","planId"]},"AdminTeamPlanChangeDto":{"type":"object","properties":{"planId":{"type":"string","example":"pro","description":"The tariff to move this team onto, or null to clear it. Refused with UNKNOWN_PLAN if it names no tariff this build prices.","nullable":true}},"required":["planId"]},"LlmCredentialDto":{"type":"object","properties":{"id":{"type":"string"},"vendor":{"enum":["anthropic","openai"],"type":"string","description":"Which vendor this key talks to."},"label":{"type":"string","description":"What a person calls this key. Not unique."},"tiers":{"type":"array","items":{"type":"string","enum":["simple","smart","genius"]},"description":"The model levels this key serves. An empty list means every level — the state of every key added before levels existed."},"last4":{"type":"string","description":"The last four characters of the key — the only part of it this api ever returns. Match it against the vendor console to know which key a row is."},"state":{"enum":["active","resting","needs_attention","disabled"],"type":"string","description":"active — in the pool. resting — out of quota, back by itself at restingUntil. needs_attention — the vendor refused the key; it never returns on its own and a person must look. disabled — somebody switched it off."},"restingUntil":{"type":"string","nullable":true,"description":"When a resting key comes back. Null unless state is resting."},"attentionReason":{"type":"string","nullable":true},"lastUsedAt":{"type":"string","nullable":true},"requestCount":{"type":"number","description":"How many model calls have gone through this key."},"tokenCount":{"type":"number","description":"How many tokens have gone through this key."},"createdAt":{"type":"string"}},"required":["id","vendor","label","tiers","last4","state","requestCount","tokenCount","createdAt"]},"LlmCredentialListDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LlmCredentialDto"}}},"required":["items"]},"CreateLlmCredentialDto":{"type":"object","properties":{"vendor":{"type":"string","enum":["anthropic","openai"]},"label":{"type":"string","maxLength":120,"description":"What to call this key on the screen — the vendor workspace, usually."},"secret":{"type":"string","minLength":12,"maxLength":500,"description":"The key itself. Stored as an AES-256-GCM envelope and never returned by any endpoint, including this one."},"tiers":{"type":"array","items":{"type":"string","enum":["simple","smart","genius"]},"description":"Which model levels this key serves — simple, smart, genius. Omitted or empty means every level, which is what every key did before levels existed. One key may serve several levels, and a level may be served by keys of a different vendor than the level below it.","nullable":true}},"required":["vendor","label","secret"]},"UpdateLlmCredentialDto":{"type":"object","properties":{"label":{"type":"string","maxLength":120,"description":"The new name for this key on the screen. The only editable field: the vendor is a fact about the key, and its value is replaced on its own route.","nullable":true}}},"ReplaceLlmCredentialSecretDto":{"type":"object","properties":{"secret":{"type":"string","minLength":12,"maxLength":500,"description":"The new key. Sealed on arrival into the same row, replacing the old value, which no endpoint can return afterwards — nor this one."}},"required":["secret"]},"UpdateLlmCredentialTiersDto":{"type":"object","properties":{"tiers":{"type":"array","items":{"type":"string","enum":["simple","smart","genius"]},"description":"The levels this key serves from now on. Empty means every level."}},"required":["tiers"]},"SettingCheckDto":{"type":"object","properties":{"checkedAt":{"type":"string"},"status":{"type":"string","enum":["reachable","unauthorized","unavailable","disabled"]},"message":{"type":"string"}},"required":["checkedAt","status","message"]},"SettingRefDto":{"type":"object","properties":{"store":{"enum":["vault","env"],"type":"string","description":"Which kind of store the value lives in. `vault` is HashiCorp Vault reached by External Secrets, which is how this deployment already gets its keys; `env` is a plain Kubernetes Secret or a developer’s .env."},"address":{"type":"string","description":"The address inside that store. For `vault` this is External Secrets’ `remoteRef.key` — a path under the store’s mount, e.g. \"prod/agentfy-api\" — with no leading \"secret/\" or \"data/\", which the store supplies. For `env` it is the variable’s name.","example":"prod/agentfy-api"},"property":{"type":"string","nullable":true,"description":"External Secrets’ `remoteRef.property` — the key inside that Vault secret. Because the api’s own ExternalSecret uses `dataFrom: extract`, this is also the name of the environment variable the value arrives in. Null when the whole secret is extracted.","example":"ANTHROPIC_API_KEY"}},"required":["store","address"]},"UnpricedSpendDto":{"type":"object","properties":{"unit":{"enum":["input_tokens","output_tokens","cache_write_tokens","cache_write_1h_tokens","cache_read_tokens","seconds","minutes","bytes","runs"],"type":"string","description":"Which kind of the model’s spend has no rate: `input_tokens`, `output_tokens`, `cache_write_tokens`, `cache_write_1h_tokens` or `cache_read_tokens`. All five are billed separately by the vendor and priced separately here, so one of them missing is a real hole even when the other four are declared."},"label":{"type":"string","description":"The same thing in words, for a screen: \"input\", \"output\", \"cache writes\", \"cache reads\"."},"reason":{"enum":["never","expired","scheduled"],"type":"string","description":"`never` — no rate for this model and unit was ever declared. `expired` — there was one and its period has ended, so spend was priced yesterday and is not today. `scheduled` — a rate is declared and starts later, so spend until then is unpriced."},"endedAt":{"type":"string","nullable":true,"description":"When the rate that used to cover this ended. Null unless `reason` is `expired`."},"startsAt":{"type":"string","nullable":true,"description":"When a declared rate for this begins. Null unless `reason` is `scheduled`."}},"required":["unit","label","reason"]},"UnpricedModelDto":{"type":"object","properties":{"provider":{"type":"string","description":"The vendor this model’s spend is filed under — the one the api is configured to call, exactly as the ledger records it. Never inferred from the model’s name."},"model":{"type":"string","description":"The model as it is set in the platform’s settings."},"spend":{"description":"The kinds of this model’s spend that no rate covers. Non-empty whenever this object is present at all: a fully priced model is reported as null rather than as an empty list.","type":"array","items":{"$ref":"#/components/schemas/UnpricedSpendDto"}}},"required":["provider","model","spend"]},"PlatformSettingDto":{"type":"object","properties":{"enabled":{"type":"boolean"},"lastCheck":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/SettingCheckDto"}]},"version":{"type":"number","description":"Optimistic concurrency version; zero when not stored."},"scope":{"enum":["platform","plan"],"type":"string","description":"`platform` — one value for the whole installation, protecting us rather than a tariff. `plan` — a value belonging to a TARIFF, which `scopeKey` names. They are deliberately different kinds of row: mixing them is how somebody raises the platform ceiling believing they widened one customer."},"scopeKey":{"type":"string","description":"The tariff this row is about, for a plan setting. Empty for a platform one."},"code":{"type":"string","description":"The code, e.g. llm.model.smart. Stable; it is the identifier."},"group":{"enum":["plan","operations","llm","embedding","runtime"],"type":"string","description":"Which section of the screen it belongs to."},"type":{"enum":["string","json"],"type":"string","description":"How the value is stored: one line of text, or a JSON document."},"format":{"enum":["text","integer","boolean","json","choice"],"type":"string","description":"What the value IS, as opposed to how it is stored: text, a whole number, a switch, or a JSON document. A limit is stored as a real JSON number and a switch as a real boolean, so the editor draws the right field and the reader never parses text."},"choices":{"nullable":true,"description":"For a `choice` setting, the words it accepts, in the order to offer them. Null for every other format.","type":"array","items":{"type":"string"}},"secret":{"type":"boolean","description":"Whether this code’s value is a secret. A secret is never stored here and never returned: the row records where it lives and whether it is there."},"important":{"type":"boolean","description":"Whether this is one of the few an operator usually wants. It is a property of the code, not a flag somebody ticks, so the \"important\" view is a filter over this same list rather than a second list that can drift from it."},"title":{"type":"string"},"description":{"type":"string","description":"What changes when this changes. Shown under the field."},"envName":{"type":"string","description":"The environment variable this code overrides — or, for a secret, the one its value arrives in."},"source":{"enum":["database","env","default"],"type":"string","description":"Where the value in force actually comes from: a row in this table, the process environment, or nothing at all."},"value":{"type":"string","nullable":true,"description":"The value in force, as an operator would type it. ALWAYS NULL FOR A SECRET — not redacted, absent: there is no endpoint in this api that answers with a secret’s value."},"ref":{"nullable":true,"description":"Where the value lives, when a row records it. Null otherwise.","type":"object","allOf":[{"$ref":"#/components/schemas/SettingRefDto"}]},"filled":{"type":"boolean","description":"Whether the value in force is non-empty. For a secret this is the only thing said about its content."},"updatedById":{"type":"string","nullable":true,"description":"The platform administrator who wrote this row last. Null if nobody has."},"updatedAt":{"type":"string","nullable":true,"description":"When it was last written. Null while the environment is in force."},"unpriced":{"nullable":true,"description":"For a model setting whose spend cannot be fully priced: the vendor, the model, and which kinds of spend have no rate. Null for every other setting and for a model that is fully priced. It never blocks the save — selecting a model before declaring its rates is a legitimate order of work.","type":"object","allOf":[{"$ref":"#/components/schemas/UnpricedModelDto"}]}},"required":["enabled","version","scope","scopeKey","code","group","type","format","secret","important","title","description","envName","source","filled"]},"PlatformSettingListDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PlatformSettingDto"}}},"required":["items"]},"SecretInventoryEntryDto":{"type":"object","properties":{"name":{"type":"string","description":"The environment variable’s name, as the schema declares it."},"group":{"type":"string","description":"The section it belongs to — the first part of its name."},"state":{"enum":["filled","missing","optional-empty","default-only","undeclared"],"type":"string","description":"filled · missing (declared, required, empty — the row this screen exists for) · optional-empty (declared optional and deliberately unset, NOT a problem) · default-only (running on the schema’s own default, so not empty and not configured either) · undeclared (present but declared nowhere)."},"optional":{"type":"boolean","description":"Whether the schema declares it optional. Read from the schema, never guessed from an empty value."},"vaultPath":{"type":"string","nullable":true,"description":"Where the value comes from, when a settings row records it: the Vault path External Secrets pulls it with, as `path#key`. Null when nobody has written that down."},"updatedById":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true}},"required":["name","group","state","optional"]},"SecretInventoryDto":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/SecretInventoryEntryDto"}},"missing":{"type":"number","description":"Declared, required and empty. The number an operator came for."},"defaultOnly":{"type":"number","description":"Running on the schema’s own default: not empty, not configured."},"undeclared":{"type":"number","description":"Present in the environment and declared nowhere."},"declared":{"type":"number","description":"How many secrets the code declares at all."}},"required":["entries","missing","defaultOnly","undeclared","declared"]},"SettingRefInputDto":{"type":"object","properties":{"store":{"type":"string","enum":["vault","env"],"description":"Which kind of store. `vault` is Vault reached by External Secrets — the road this deployment already runs; `env` is a plain Kubernetes Secret or a developer’s .env."},"address":{"type":"string","maxLength":256,"description":"The address inside the store. For `vault`, External Secrets’ `remoteRef.key`: a path under the store’s mount, e.g. \"prod/agentfy-api\", with no \"secret/\" or \"data/\" in front of it — the store supplies both."},"property":{"type":"string","maxLength":256,"description":"External Secrets’ `remoteRef.property` — the key inside that Vault secret. Because the api’s own ExternalSecret uses `dataFrom: extract`, this is also the environment variable the value arrives in.","nullable":true}},"required":["store","address"]},"UpdatePlatformSettingDto":{"type":"object","properties":{"enabled":{"type":"boolean","nullable":true},"secretAction":{"type":"string","enum":["keep","replace","clear","import",null],"nullable":true},"secretValue":{"type":"string","maxLength":8192,"description":"Only with replace. Never returned or audited.","nullable":true},"version":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Version from the last read; zero creates a setting."},"value":{"type":"string","maxLength":65536,"description":"The value, exactly as it was typed — text even for a `json` setting, so an unparseable document is refused with a message about THIS setting rather than by the HTTP body parser. Send this for an ordinary code; sending it for a secret is refused.","nullable":true},"ref":{"allOf":[{"$ref":"#/components/schemas/SettingRefInputDto"}],"nullable":true,"description":"Where the secret lives. Send this for a secret code; sending it for an ordinary one is refused. Use secretAction=replace and secretValue for encrypted database credentials."}},"required":["version"]},"SettingVersionDto":{"type":"object","properties":{"version":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["version"]},"UsagePriceDto":{"type":"object","properties":{"id":{"type":"string"},"side":{"enum":["cost","charge"],"type":"string"},"provider":{"type":"string","description":"`\"\"` when the rate names no particular vendor."},"model":{"type":"string","description":"`\"\"` when the rate names no particular model."},"kind":{"type":"string"},"unit":{"type":"string"},"usdPerUnit":{"type":"string","description":"US dollars per one unit, as an exact decimal string."},"effectiveFrom":{"type":"string"},"effectiveTo":{"type":"string","nullable":true,"description":"`null` — still in force."},"note":{"type":"string","nullable":true}},"required":["id","side","provider","model","kind","unit","usdPerUnit","effectiveFrom"]},"SelectedUnpricedModelDto":{"type":"object","properties":{"provider":{"type":"string","description":"The vendor this model’s spend is filed under — the one the api is configured to call, exactly as the ledger records it. Never inferred from the model’s name."},"model":{"type":"string","description":"The model as it is set in the platform’s settings."},"spend":{"description":"The kinds of this model’s spend that no rate covers. Non-empty whenever this object is present at all: a fully priced model is reported as null rather than as an empty list.","type":"array","items":{"$ref":"#/components/schemas/UnpricedSpendDto"}},"selectedAs":{"description":"The settings that currently select this model, e.g. [\"llm.model.smart\"]. One model can serve two levels, and then it is one rate to declare rather than two.","type":"array","items":{"type":"string"}}},"required":["provider","model","spend","selectedAs"]},"UsagePriceListDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UsagePriceDto"}},"unpricedSinceBoot":{"type":"number","description":"Ledger lines written with no rate to price them, since this api process started. Not zero on a healthy build the moment a new provider or model is used before a rate is declared for it — see `system/usage/price`'s README."},"unpricedModels":{"description":"Models currently selected in the platform’s settings whose spend cannot be fully priced — each with the kinds of spend that have no rate. Empty on a platform whose selected models are all priced.","type":"array","items":{"$ref":"#/components/schemas/SelectedUnpricedModelDto"}}},"required":["items","unpricedSinceBoot","unpricedModels"]},"UsagePriceAddResultDto":{"type":"object","properties":{"price":{"$ref":"#/components/schemas/UsagePriceDto"},"gapMs":{"type":"number","description":"Milliseconds between the previous rate for this key ending and this one starting. Present only when there is a gap — nothing was priced for this key in between."}},"required":["price"]},"CreateUsagePriceDto":{"type":"object","properties":{"provider":{"type":"string","maxLength":120,"description":"Which vendor. `\"\"` for a rate that names none."},"model":{"type":"string","maxLength":200,"description":"The exact model or profile string. Omitted or `\"\"` for none.","nullable":true},"kind":{"type":"string","minLength":1,"maxLength":120,"description":"What was consumed, e.g. `llm_tokens`."},"unit":{"type":"string","minLength":1,"maxLength":120,"description":"The unit the quantity is counted in, e.g. `input_tokens`."},"usdPerUnit":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"US dollars per one unit, as a plain decimal string — e.g. \"0.0000139\". Up to twelve decimal places (the rate card's grain); more than that is refused rather than rounded."},"effectiveFrom":{"type":"string","format":"date-time","description":"In force from this instant, inclusive."},"note":{"type":"string","maxLength":2000,"description":"Where the number came from — a vendor page, a contract, an estimate.","nullable":true}},"required":["provider","kind","unit","usdPerUnit","effectiveFrom"]},"CloseUsagePriceDto":{"type":"object","properties":{"effectiveTo":{"type":"string","format":"date-time","description":"The rate stops applying from this instant, exclusive."}},"required":["effectiveTo"]},"UpdateUsagePriceNoteDto":{"type":"object","properties":{"note":{"type":"string","maxLength":2000,"description":"Where the number came from. Omit or send empty to clear it.","nullable":true}}},"AdminUsageTotalDto":{"type":"object","properties":{"kind":{"type":"string","example":"llm_tokens"},"unit":{"type":"string","example":"input_tokens"},"provider":{"type":"string","example":"anthropic"},"model":{"type":"string","example":"claude-haiku-4-5-20251001"},"quantity":{"type":"number","example":128400},"events":{"type":"number","example":62},"costUsd":{"type":"string","example":"0.038421000000","description":"What this line cost the PLATFORM — the vendor's own charge, an exact decimal string."},"unpricedEvents":{"type":"number","example":0}},"required":["kind","unit","quantity","events","costUsd","unpricedEvents"]},"AdminTeamUsageDto":{"type":"object","properties":{"teamId":{"type":"string","example":"team-3f9c…"},"from":{"format":"date-time","type":"string","example":"2026-09-01T00:00:00.000Z"},"to":{"format":"date-time","type":"string","example":"2026-10-01T00:00:00.000Z"},"totals":{"type":"array","items":{"$ref":"#/components/schemas/AdminUsageTotalDto"}},"totalCostUsd":{"type":"string","example":"4.912800000000","description":"Every line above, added — what this team cost the platform this period."},"unpricedEvents":{"type":"number","example":0,"description":"Ledger lines this period no rate covered, so not in `totalCostUsd`."}},"required":["teamId","from","to","totals","totalCostUsd","unpricedEvents"]},"DraftOptionDto":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"image":{"type":"string"}},"required":["id","kind","label","description","image"]},"DraftCapabilityDto":{"type":"object","properties":{"id":{"type":"string","maxLength":160},"enabled":{"type":"boolean"},"reason":{"type":"string","maxLength":500}},"required":["id","enabled","reason"]},"AgentDraftDto":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"description":{"type":"string","maxLength":1000},"soul":{"type":"string","maxLength":12000},"capabilities":{"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/DraftCapabilityDto"}},"egress":{"maxItems":200,"type":"array","items":{"type":"string","maxLength":255}},"heartbeatPrompt":{"type":"string","maxLength":4000},"heartbeatIntervalMin":{"type":"integer","minimum":1,"maximum":1440}},"required":["name","description","soul","capabilities","egress","heartbeatPrompt","heartbeatIntervalMin"]},"DraftReplyDto":{"type":"object","properties":{"draft":{"$ref":"#/components/schemas/AgentDraftDto"},"nextQuestion":{"type":"string"}},"required":["draft","nextQuestion"]},"DraftRequestDto":{"type":"object","properties":{"teamId":{"type":"string","maxLength":160},"answer":{"type":"string","maxLength":4000},"draft":{"$ref":"#/components/schemas/AgentDraftDto"},"locked":{"type":"array","maxItems":110,"items":{"type":"string","maxLength":170}},"language":{"type":"string","enum":["en","ru","uk"]},"clarification":{"type":"integer","minimum":0,"maximum":3}},"required":["teamId","answer","draft","locked","language","clarification"]},"AgentCapabilitiesDto":{"type":"object","properties":{"pin":{"type":"boolean","description":"May this agent be personally pinned?"},"editSoul":{"type":"boolean","description":"May the persona documents (SOUL.md / USER.md) be edited?"},"systemPromptSource":{"enum":["stored","code"],"type":"string","description":"Where the system prompt comes from — the stored soul, or code"},"chatSurface":{"enum":["agent","team"],"type":"string","description":"Which endpoint drives a turn in this agent's thread — its own runtime, or the team's concierge endpoint. Reading the history is the same route either way"},"rename":{"type":"boolean","description":"May name and description be changed?"},"disable":{"type":"boolean","description":"May it be switched off?"},"archive":{"type":"boolean","description":"May it be archived?"},"conciergeArchive":{"type":"boolean","description":"May the concierge archive it, and take it back out, from a conversation? A separate question from `archive`, which asks whether anyone may at all"},"delete":{"type":"boolean","description":"May it be deleted?"},"secrets":{"type":"boolean","description":"Does it have secrets of its own?"},"autostart":{"type":"boolean","description":"Does it have autostart (the heartbeat engine)?"},"readChat":{"type":"boolean","description":"May it read its own conversation back — the last messages, and a search over them?"},"skills":{"type":"boolean","description":"Does it have skills?"},"exportPackage":{"type":"boolean","description":"May it be exported as a package?"},"importPackage":{"type":"boolean","description":"May an imported package overwrite it?"},"editConfig":{"type":"boolean","description":"May its runtime config (tools, knowledge) be written?"},"editRuntimeProfile":{"type":"boolean","description":"May its execution profile be written — may it be given hands, or have them taken away? A separate question from `editConfig`: the concierge has no config blob and answers this one yes"},"embedOnSite":{"type":"boolean","description":"May it be put on somebody`s website — published on a channel, given a visitor grant, handed an embed token? `false` shuts every one of those doors, and the Website section is not drawn. Whether this deployment can publish AT ALL is a different question, answered by the channel status read"},"mcpServers":{"type":"boolean","description":"May it use the team`s registered MCP servers — tools that live on somebody else`s machine? `false` refuses the attach on the api and the MCPs section is not drawn (AGNT2-329)"},"askAgent":{"type":"boolean","description":"May it ask another agent of the same team a question — the connections a person granted it? `false` refuses the grant on the api and the Connections section is not drawn (AGNT2-332)"},"publishCard":{"type":"boolean","description":"May this agent be given a card — the A2A visiting card with its name, its description and the skills it uses — on a link its owner hands to somebody outside the company? `false` refuses the issue on the api and the card section is not drawn (AGNT2-334)"},"publishPage":{"type":"boolean","description":"May it publish a page — a set of files with one entry point — and hand the person a link to it? It grants publishing and rewriting its own; never listing the team`s pages and never deleting one (AGNT2-350)"},"tools":{"nullable":true,"description":"The toolset the type is entitled to; null = whatever config.tools says","type":"array","items":{"type":"string"}}},"required":["pin","editSoul","systemPromptSource","chatSurface","rename","disable","archive","conciergeArchive","delete","secrets","autostart","readChat","skills","exportPackage","importPackage","editConfig","editRuntimeProfile","embedOnSite","mcpServers","askAgent","publishCard","publishPage","tools"]},"AgentAutostartDto":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether autostart is opted in (the engine sweeps it)"},"intervalMin":{"type":"number","description":"Minutes between self-initiated turns"},"lastRunAt":{"type":"string","nullable":true,"description":"When the last tick fired — the scheduled slot (null until the first run)"},"updatedAt":{"type":"string","description":"When the engine row was last written — by a config save OR by a tick. Dates the current obligation, so \"just switched on\" is not read as \"not ticking\"."}},"required":["enabled","intervalMin","updatedAt"]},"AgentDto":{"type":"object","properties":{"maxTurnIterations":{"type":"number","nullable":true,"minimum":1,"description":"Configured maximum model steps per turn; null means 8. Execution is bounded by the deployment ceiling (default 50)."},"pinned":{"type":"boolean","description":"Pinned by the current user (list projection)"},"pinnedAt":{"type":"string","nullable":true,"format":"date-time"},"id":{"type":"string"},"teamId":{"type":"string"},"ownerId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"enum":["active","disabled","archived","idle"],"type":"string"},"type":{"enum":["standard","concierge"],"type":"string","description":"WHAT this agent is. Server-assigned — it cannot be set by a request or a package."},"capabilities":{"description":"What this type allows, from the one declaration the write guards read. Build the interface from THIS, not from `type`.","allOf":[{"$ref":"#/components/schemas/AgentCapabilitiesDto"}]},"soul":{"type":"string","nullable":true},"user":{"type":"string","nullable":true},"heartbeat":{"type":"string","nullable":true,"description":"HEARTBEAT.md — the packaged prompt TEXT. Says nothing about autostart."},"config":{"type":"object","additionalProperties":true},"runtimeProfile":{"enum":["none","light","browser","heavy","warm"],"type":"string","description":"Whether this agent's turns may raise a worker, and which one. `none` — the default for every agent — means it answers from the model alone and starts nothing"},"autostart":{"nullable":true,"description":"Autostart engine state, or null when it was never configured. NOT derived from `heartbeat`.","type":"object","allOf":[{"$ref":"#/components/schemas/AgentAutostartDto"}]},"promptLogEnabled":{"type":"boolean","description":"Whether this agent's prompts are recorded in full for the admin panel. False unless a platform administrator enables it."},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","teamId","ownerId","name","status","type","capabilities","config","runtimeProfile","promptLogEnabled","createdAt","updatedAt"]},"CreatedDraftDto":{"type":"object","properties":{"agent":{"$ref":"#/components/schemas/AgentDto"},"failedCapabilities":{"type":"array","items":{"type":"string"}}},"required":["agent","failedCapabilities"]},"CreateDraftDto":{"type":"object","properties":{"teamId":{"type":"string","maxLength":160},"draft":{"$ref":"#/components/schemas/AgentDraftDto"}},"required":["teamId","draft"]},"OrganizationAgentScheduleDto":{"type":"object","properties":{"channel":{"type":"string"},"enabled":{"type":"boolean"},"intervalMin":{"type":"number"},"lastRunAt":{"type":"string","nullable":true}},"required":["channel","enabled","intervalMin","lastRunAt"]},"OrganizationAgentMcpDto":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"transport":{"type":"string"},"discoveredAt":{"type":"string","nullable":true},"lastError":{"type":"string","nullable":true}},"required":["name","url","transport","discoveredAt","lastError"]},"OrganizationAgentSecretDto":{"type":"object","properties":{"name":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["name","createdAt","updatedAt"]},"OrganizationAgentTelegramDto":{"type":"object","properties":{"username":{"type":"string"},"status":{"type":"string"}},"required":["username","status"]},"OrganizationAgentChannelDto":{"type":"object","properties":{"address":{"type":"string"},"type":{"type":"string"},"enabled":{"type":"boolean"}},"required":["address","type","enabled"]},"OrganizationAgentDto":{"type":"object","properties":{"description":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"capabilities":{"$ref":"#/components/schemas/AgentCapabilitiesDto"},"keepWarm":{"type":"boolean"},"longRunning":{"type":"boolean"},"heartbeatLastRunAt":{"type":"string","nullable":true},"channelSchedules":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationAgentScheduleDto"}},"mcpDetails":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationAgentMcpDto"}},"secretMetadata":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationAgentSecretDto"}},"restrictedKnowledgeFolders":{"type":"array","items":{"type":"string"}},"telegram":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/OrganizationAgentTelegramDto"}]},"cardAddress":{"type":"string","nullable":true},"cardDiscoverable":{"type":"boolean"},"cardLinkPublished":{"type":"boolean"},"id":{"type":"string"},"name":{"type":"string"},"teamId":{"type":"string"},"teamName":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"ownerId":{"type":"string"},"ownerName":{"type":"string","nullable":true},"modelId":{"type":"string","nullable":true},"maxLlmTier":{"type":"string","nullable":true},"tools":{"type":"array","items":{"type":"string"}},"mcpServers":{"type":"array","items":{"type":"string"}},"skills":{"type":"array","items":{"type":"string"}},"heartbeatEnabled":{"type":"boolean"},"heartbeatIntervalMin":{"type":"number","nullable":true},"lastActivityAt":{"type":"string","nullable":true},"channels":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationAgentChannelDto"}},"outgoingAgents":{"type":"array","items":{"type":"string"}},"incomingAgents":{"type":"array","items":{"type":"string"}},"knowledgeFolders":{"type":"array","items":{"type":"string"}},"secretNames":{"type":"array","items":{"type":"string"}},"promptLogEnabled":{"type":"boolean"},"canOpenAgent":{"type":"boolean"}},"required":["description","createdAt","updatedAt","capabilities","keepWarm","longRunning","heartbeatLastRunAt","channelSchedules","mcpDetails","secretMetadata","restrictedKnowledgeFolders","telegram","cardAddress","cardDiscoverable","cardLinkPublished","id","name","teamId","teamName","type","status","ownerId","ownerName","modelId","maxLlmTier","tools","mcpServers","skills","heartbeatEnabled","heartbeatIntervalMin","lastActivityAt","channels","outgoingAgents","incomingAgents","knowledgeFolders","secretNames","promptLogEnabled","canOpenAgent"]},"AgentPinDto":{"type":"object","properties":{"pinned":{"type":"boolean"},"pinnedAt":{"type":"string","nullable":true,"format":"date-time"}},"required":["pinned","pinnedAt"]},"CreateAgentDto":{"type":"object","properties":{"teamId":{"type":"string","example":"team-3f9c…"},"name":{"type":"string","minLength":2,"example":"Store assistant"},"description":{"type":"string","example":"Answers product questions in the store widget.","nullable":true},"soul":{"type":"string","description":"SOUL.md — persona / system prompt","nullable":true},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Runtime-compatible agent.config.json","nullable":true}},"required":["teamId","name"]},"UpdateAgentDto":{"type":"object","properties":{"maxTurnIterations":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Maximum model steps per turn. Default 8; must not exceed AGENT_MAX_TURN_ITERATIONS (deployment default 50). Team owner/admin only. Heartbeats remain capped at 8. Set 8 to restore the default.","example":20,"nullable":true},"name":{"type":"string","minLength":2,"example":"Store assistant","nullable":true},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["active","disabled","archived","idle",null],"description":"Prefer the disable/enable/archive routes","nullable":true},"soul":{"type":"string","description":"SOUL.md — persona / system prompt","nullable":true},"user":{"type":"string","description":"USER.md — per-user context","nullable":true},"heartbeat":{"type":"string","description":"HEARTBEAT.md — heartbeat prompt","nullable":true},"config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"nullable":true}}},"ScopedAgentDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}},"required":["id","teamId","name","status"]},"SkillAuthorDto":{"type":"object","properties":{"type":{"enum":["user","agent","unknown"],"type":"string","description":"`user` — a person wrote it in the cabinet. `agent` — an agent brought it or wrote it. `unknown` — nobody recorded an author, which is true of every skill that predates the move to team ownership."},"id":{"type":"string","nullable":true,"description":"The user or agent id, or null when `type` is `unknown`"}},"required":["type"]},"SkillSourceDto":{"type":"object","properties":{"kind":{"type":"string","enum":["github"],"description":"What kind of source it is. `github` is the only one today"},"owner":{"type":"string","description":"The GitHub account or organisation — `agentfy`"},"repo":{"type":"string","description":"The repository — `skills`"},"path":{"type":"string","description":"The skill`s folder inside the repository. Empty when the repository IS the skill"},"ref":{"type":"string","description":"The branch or tag it is followed on — `main`"},"url":{"type":"string","description":"The link to the folder, for a person to open"},"version":{"type":"string","description":"The commit the content was taken at — the VERSION. It is the last commit that touched THIS FOLDER, not the tip of the branch, so a repository holding many skills does not report an update on all of them every time one of them changes"},"trusted":{"type":"boolean","description":"Is this an agentfy skill? True only when GitHub`s own name for the repository the content came out of is on the server`s list — never because the link contains a word. It says where the text came from, not that the text is safe"},"repoId":{"type":"number","nullable":true,"description":"GitHub`s numeric id for the repository. Evidence, never the gate"},"installedAt":{"type":"string","description":"When the content was last taken from there (ISO 8601)"},"checkedAt":{"type":"string","nullable":true,"description":"When the source was last asked about without taking anything (ISO 8601), or null if nobody has since the last pull"},"locallyModified":{"type":"boolean","description":"Has anybody edited the skill since it was pulled? Computed from the skill`s own content on every read, so no road that edits a skill can forget to set it. An update is refused while this is true unless it is asked for again, explicitly"}},"required":["kind","owner","repo","path","ref","url","version","trusted","installedAt","locallyModified"]},"SkillListItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Skill id"},"teamId":{"type":"string","description":"The team that owns it"},"name":{"type":"string","description":"Its name — `skills/<name>/SKILL.md`, unique within the team"},"description":{"type":"string","nullable":true,"description":"The one line the shared list shows under the name. Read out of the skill`s own frontmatter rather than stored beside it, so the list and the document cannot disagree"},"body":{"type":"string","description":"The skill itself — the markdown under the frontmatter"},"author":{"description":"Who created it","allOf":[{"$ref":"#/components/schemas/SkillAuthorDto"}]},"source":{"nullable":true,"description":"Where it was pulled from, or null — AGNT2-272. Null is the ordinary case: a skill somebody typed has no source. When it is set it carries the version installed and whether the text has been edited since","type":"object","allOf":[{"$ref":"#/components/schemas/SkillSourceDto"}]},"createdAt":{"type":"string","description":"When it was created (ISO 8601)"},"updatedAt":{"type":"string","description":"When it was last rewritten (ISO 8601)"},"agentIds":{"description":"The agents of this team that use this skill, oldest attachment first. Empty means nobody has picked it up yet — which is a normal state, not a broken one","type":"array","items":{"type":"string"}}},"required":["id","teamId","name","body","author","createdAt","updatedAt","agentIds"]},"SkillListDto":{"type":"object","properties":{"items":{"description":"The team`s skills, by name","type":"array","items":{"$ref":"#/components/schemas/SkillListItemDto"}}},"required":["items"]},"SkillDto":{"type":"object","properties":{"id":{"type":"string","description":"Skill id"},"teamId":{"type":"string","description":"The team that owns it"},"name":{"type":"string","description":"Its name — `skills/<name>/SKILL.md`, unique within the team"},"description":{"type":"string","nullable":true,"description":"The one line the shared list shows under the name. Read out of the skill`s own frontmatter rather than stored beside it, so the list and the document cannot disagree"},"body":{"type":"string","description":"The skill itself — the markdown under the frontmatter"},"author":{"description":"Who created it","allOf":[{"$ref":"#/components/schemas/SkillAuthorDto"}]},"source":{"nullable":true,"description":"Where it was pulled from, or null — AGNT2-272. Null is the ordinary case: a skill somebody typed has no source. When it is set it carries the version installed and whether the text has been edited since","type":"object","allOf":[{"$ref":"#/components/schemas/SkillSourceDto"}]},"createdAt":{"type":"string","description":"When it was created (ISO 8601)"},"updatedAt":{"type":"string","description":"When it was last rewritten (ISO 8601)"}},"required":["id","teamId","name","body","author","createdAt","updatedAt"]},"CreateSkillDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"Its name, unique within the team. It becomes a folder name when the agent using it is exported, so a path separator is refused rather than rewritten"},"description":{"type":"string","maxLength":500,"description":"The one line the shared list shows under the name","nullable":true},"body":{"type":"string","minLength":1,"maxLength":100000,"description":"The skill itself — markdown, as the agent will read it"}},"required":["name","body"]},"UpdateSkillDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120,"nullable":true},"description":{"type":"string","maxLength":500,"nullable":true},"body":{"type":"string","minLength":1,"maxLength":100000,"nullable":true}}},"AttachSkillDto":{"type":"object","properties":{"skillId":{"type":"string","minLength":1,"description":"The id of a skill THIS AGENT`S TEAM owns"}},"required":["skillId"]},"SkillFileDto":{"type":"object","properties":{"id":{"type":"string","description":"The file`s id within this skill"},"path":{"type":"string","description":"Where it sits inside the skill — `reference/deadlines.csv`. Relative to the skill`s own folder, which is where it lands when an agent using the skill is exported"},"contentType":{"type":"string","description":"Its media type, as it was uploaded"},"size":{"type":"number","description":"Its size in bytes"},"createdAt":{"type":"string","description":"When it was added (ISO 8601)"},"url":{"type":"string","description":"A short-lived signed link to the bytes. Minted for THIS response and never stored — read it now or ask for the list again"}},"required":["id","path","contentType","size","createdAt","url"]},"SkillFileListDto":{"type":"object","properties":{"items":{"description":"The skill`s files, by path","type":"array","items":{"$ref":"#/components/schemas/SkillFileDto"}},"usedBytes":{"type":"number","description":"What they add up to, in bytes"},"maxBytes":{"type":"number","description":"The most one skill`s files may add up to, in bytes"},"maxFiles":{"type":"number","description":"The most files one skill may carry"},"maxFileBytes":{"type":"number","description":"The most one file may be, in bytes"}},"required":["items","usedBytes","maxBytes","maxFiles","maxFileBytes"]},"InstallSkillFromLinkDto":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":500,"description":"The link to the skill`s folder on GitHub — `https://github.com/agentfy/skills/tree/main/support/refund`. A link to its SKILL.md works too, as does the repository itself when the repository is one skill"},"name":{"type":"string","maxLength":120,"description":"What to call it here. Leave it out to use the name the skill gives itself, which is almost always right","nullable":true}},"required":["url"]},"SkillSourceStatusDto":{"type":"object","properties":{"source":{"description":"The source as it is recorded here","allOf":[{"$ref":"#/components/schemas/SkillSourceDto"}]},"latestVersion":{"type":"string","description":"The commit the source is at now"},"hasUpdate":{"type":"boolean","description":"Is there anything newer up there than what is installed?"},"locallyModified":{"type":"boolean","description":"Would updating overwrite an edit made here? If so, it has to be asked for twice"}},"required":["source","latestVersion","hasUpdate","locallyModified"]},"SkillSourceUpdateDto":{"type":"object","properties":{"source":{"description":"The source, now at the version pulled","allOf":[{"$ref":"#/components/schemas/SkillSourceDto"}]},"previousVersion":{"type":"string","description":"The version it was on before"},"changed":{"type":"boolean","description":"Did anything actually change? False when the source had nothing new — which is a normal outcome and worth saying out loud rather than reporting as an update"},"overwroteLocalChanges":{"type":"boolean","description":"Was a local edit overwritten? True only when the caller asked for that"}},"required":["source","previousVersion","changed","overwroteLocalChanges"]},"UpdateSkillFromSourceDto":{"type":"object","properties":{"overwriteLocalChanges":{"type":"boolean","default":false,"description":"Yes, I know the skill was edited here, and the edit may be lost. Without it an edited skill is refused rather than overwritten","nullable":true}}},"KnowledgeFolderDto":{"type":"object","properties":{"id":{"type":"string","description":"The folder`s id within this team"},"name":{"type":"string","description":"What it is called — unique within the team"},"restricted":{"type":"boolean","description":"Closed? An OPEN folder (the default) is readable by every agent of the team. A CLOSED one is readable only by the agents in `agentIds` — and a closed folder with an empty `agentIds` is readable by nobody, which is the designed answer and not an oversight"},"general":{"type":"boolean","description":"The team`s one general folder: where a document goes when the upload named no folder, and where everything uploaded before folders existed was put. It cannot be deleted and cannot be closed"},"documents":{"type":"number","description":"How many documents are in it"},"agentIds":{"description":"The agents holding a key to it. Always empty on an OPEN folder, where every agent of the team reads it anyway","type":"array","items":{"type":"string"}},"createdAt":{"type":"string","description":"When it was made (ISO 8601)"},"updatedAt":{"type":"string","description":"When it was last renamed, opened or closed (ISO 8601)"}},"required":["id","name","restricted","general","documents","agentIds","createdAt","updatedAt"]},"KnowledgeFolderListDto":{"type":"object","properties":{"items":{"description":"The team`s folders — the general one first, then by name","type":"array","items":{"$ref":"#/components/schemas/KnowledgeFolderDto"}}},"required":["items"]},"CreateKnowledgeFolderDto":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"description":"What to call it. Unique within the team"},"restricted":{"type":"boolean","description":"Make it closed straight away (default false — open to every agent of the team). A closed folder is read by nobody until agents are given access","default":false,"nullable":true}},"required":["name"]},"UpdateKnowledgeFolderDto":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"description":"A new name. Absent leaves it alone","nullable":true},"restricted":{"type":"boolean","description":"Close it (true) or open it (false). Absent leaves it alone. Closing a folder that has been given to no agent hides it from all of them — that is what closing means","nullable":true}}},"KnowledgeDocumentDto":{"type":"object","properties":{"id":{"type":"string","description":"The document`s id within this team"},"name":{"type":"string","description":"What it is called — the natural key within the team"},"folderId":{"type":"string","description":"The folder it is in (AGNT2-316) — which is also what decides which of the team`s agents may read it"},"contentType":{"type":"string","description":"Its media type, as it was uploaded"},"bytes":{"type":"number","description":"Its size in bytes"},"chunkCount":{"type":"number","description":"How many pieces it was cut into — how many places a search can find it in, and how many vectors it took"},"uploadedById":{"type":"string","nullable":true,"description":"The member who uploaded it, when a person did"},"createdAt":{"type":"string","description":"When it was first uploaded (ISO 8601)"},"updatedAt":{"type":"string","description":"When it was last replaced (ISO 8601)"},"url":{"type":"string","description":"A short-lived signed link to the original file. Minted for THIS response and never stored — read it now or ask again"}},"required":["id","name","folderId","contentType","bytes","chunkCount","createdAt","updatedAt"]},"KnowledgeDocumentListDto":{"type":"object","properties":{"items":{"description":"The team`s documents, newest first","type":"array","items":{"$ref":"#/components/schemas/KnowledgeDocumentDto"}},"usedBytes":{"type":"number","description":"What they add up to, in bytes"},"chunks":{"type":"number","description":"Vectors this corpus occupies in the team`s namespace"},"maxDocumentBytes":{"type":"number","description":"The most one document may be, in bytes"},"maxDocumentChars":{"type":"number","description":"The most text one document may add to the corpus, in characters — the ceiling that actually decides what an ingest costs. A PDF or a spreadsheet is mostly not text, so this and `maxDocumentBytes` are two different limits and either one can be the one that refuses a file"},"acceptedExtensions":{"description":"The file extensions this version accepts","type":"array","items":{"type":"string"}},"acceptedArchiveExtensions":{"description":"The ARCHIVE extensions this version unpacks (AGNT2-319). A file with one of these is not a document: it is sent to `uploadKnowledgeArchive`, which unpacks it and answers with a line per file inside. Kept apart from `acceptedExtensions` for exactly that reason — the two lists go to two different routes","type":"array","items":{"type":"string"}},"maxArchiveEntries":{"type":"number","description":"The most files one archive may carry — past this it is refused whole"}},"required":["items","usedBytes","chunks","maxDocumentBytes","maxDocumentChars","acceptedExtensions","acceptedArchiveExtensions","maxArchiveEntries"]},"KnowledgeExtractionDto":{"type":"object","properties":{"format":{"type":"string","description":"Which reader opened it — `pdf`, `docx`, `sheet`, `csv`, `text`"},"shape":{"type":"string","description":"How it was cut — `prose` packs paragraphs, `table` packs whole rows with their column names"},"chars":{"type":"number","description":"Characters that went into the corpus — what the ingest is priced on"},"pages":{"type":"number","description":"Pages, when the format has them"},"pagesWithoutText":{"type":"number","description":"How many of those pages held no text at all — how much of it is pictures"},"sheets":{"type":"number","description":"Sheets read, for a workbook"},"rows":{"type":"number","description":"Rows read across every sheet"},"preview":{"type":"string","description":"The opening of what was actually read, verbatim. Read it: it is the only way to catch a file that extracted successfully and wrongly"}},"required":["format","shape","chars","preview"]},"KnowledgeUploadDto":{"type":"object","properties":{"document":{"description":"The document as it is now stored","allOf":[{"$ref":"#/components/schemas/KnowledgeDocumentDto"}]},"replaced":{"type":"boolean","description":"True when a document of this name was already there"},"reindexed":{"type":"boolean","description":"False when the bytes were identical to what was already stored: nothing was re-cut, nothing was embedded and nothing was charged"},"indexed":{"type":"number","description":"Vectors written by this upload"},"contextualised":{"type":"number","description":"How many pieces were given the one-or-two-sentence preface that says where in the document they came from (AGNT2-314). Normally every piece; 0 when the model that writes them could not be reached, which leaves the document searchable exactly as it would have been before that feature and is reported rather than refused"},"dropped":{"type":"number","description":"Vectors removed because a previous version was replaced"},"provider":{"type":"string","description":"The vendor that made them — `openai`, or `voyage`"},"model":{"type":"string","description":"Written into every vector row; a search returns only rows that carry it"},"dimensions":{"type":"number","description":"Width of every vector written; a search compares only rows of its own width"},"extracted":{"description":"What was read out of the file. Absent when nothing was — identical bytes are not opened at all","allOf":[{"$ref":"#/components/schemas/KnowledgeExtractionDto"}]}},"required":["document","replaced","reindexed","indexed","contextualised","dropped","provider","model","dimensions"]},"KnowledgeArchiveItemDto":{"type":"object","properties":{"path":{"type":"string","description":"Its path inside the archive, as the archive spells it"},"name":{"type":"string","description":"The document`s name — the file at the end of that path"},"folderPath":{"type":"string","description":"The directory it was in, which becomes the name of the knowledge folder it goes to. Absent for a file at the root of the archive"},"outcome":{"type":"string","description":"`added`, `replaced`, `unchanged` — identical bytes, nothing was charged — or `refused`"},"folderId":{"type":"string","description":"The folder it actually landed in"},"documentId":{"type":"string","description":"The document it became"},"chunkCount":{"type":"number","description":"Pieces it was cut into — how many places a search can find it in"},"code":{"type":"string","description":"The api code of the refusal, for a client that wants its own wording"},"message":{"type":"string","description":"Why it was refused, in the words the person reads"},"details":{"type":"object","additionalProperties":true,"description":"The refusal`s own numbers — the ceiling, what was left, the folder that already holds this name — exactly as the same refusal carries them when it arrives as an error body. A client that writes its own sentence needs them; without them a row here would be the one refusal in this feature readable in only one language"}},"required":["path","name","outcome"]},"KnowledgeArchiveDto":{"type":"object","properties":{"items":{"description":"One row per file in the archive, in the archive`s own order","type":"array","items":{"$ref":"#/components/schemas/KnowledgeArchiveItemDto"}},"added":{"type":"number","description":"Files that were not in the knowledge and now are"},"replaced":{"type":"number","description":"Files that took the place of a document of the same name"},"unchanged":{"type":"number","description":"Files whose bytes were already stored: nothing re-cut, nothing charged"},"refused":{"type":"number","description":"Files that did not go in — each row says why"}},"required":["items","added","replaced","unchanged","refused"]},"KnowledgeMatchDto":{"type":"object","properties":{"chunkId":{"type":"string","description":"The piece`s id"},"documentId":{"type":"string","description":"The document it came from"},"documentName":{"type":"string","description":"What that document is called"},"ordinal":{"type":"number","description":"Its place in that document, from 0"},"text":{"type":"string","description":"The passage itself, exactly as it was embedded"},"score":{"type":"number","description":"How well it answers the question, higher is better. It is a rank-fusion score, NOT a similarity: it orders the passages within one answer and cannot be compared between two answers or tested against a threshold"},"similarity":{"type":"number","description":"Cosine similarity to the question, higher is closer. Absent when only the word search found this passage; anything below 0.3 is never returned by the meaning search at all"},"lexicalRank":{"type":"number","description":"Its place, from 1, in the word search`s own ranking. Absent when the words of the question do not appear in this passage and only its meaning matched"}},"required":["chunkId","documentId","documentName","ordinal","text","score"]},"KnowledgeSearchDto":{"type":"object","properties":{"items":{"description":"The passages, closest first","type":"array","items":{"$ref":"#/components/schemas/KnowledgeMatchDto"}},"minScore":{"type":"number","description":"The similarity the MEANING half of the search makes a passage beat. It says nothing about the word half, which has no such floor: a word is in a passage or it is not"}},"required":["items","minScore"]},"SearchKnowledgeDto":{"type":"object","properties":{"question":{"type":"string","maxLength":4000,"description":"The question, in the words a person would ask it. It is searched two ways at once — by meaning, and by the words it actually contains — so full sentences work well and an exact article code, product name or clause number is found literally"},"topK":{"type":"integer","minimum":1,"maximum":20,"description":"How many passages to answer with (default 5)","default":5,"nullable":true}},"required":["question"]},"MoveKnowledgeDocumentDto":{"type":"object","properties":{"folderId":{"type":"string","description":"The folder to move it into. Must belong to this team"}},"required":["folderId"]},"HeartbeatStatusDto":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the heartbeat is opted in (swept)"},"intervalMin":{"type":"number","description":"Minutes between self-initiated turns"},"effectiveIntervalMin":{"type":"number","description":"The cadence actually in force right now — equal to intervalMin unless a temporary speed-up is running, in which case it is the faster one (AGNT2-149). The form edits intervalMin; an indicator showing what the engine is doing reads this."},"boostUntil":{"type":"string","nullable":true,"description":"When the temporary speed-up ends (null when none is running). Derived from the clock, so an expired speed-up reads null with nothing having been cleaned up — AGNT2-149."},"boostsLeft":{"type":"number","description":"How many temporary speed-ups the agent may still start in the current window"},"prompt":{"type":"string","description":"The synthetic user message a tick sends (may be empty)"},"lastRunAt":{"type":"string","nullable":true,"description":"When the last tick fired (null until the first run)"},"nextDueAt":{"type":"string","nullable":true,"description":"lastRunAt + effectiveIntervalMin — when the next tick is due (null until the first run). Counts down against the SPED-UP cadence while one is running, because that is when the tick really comes."},"updatedAt":{"type":"string","nullable":true,"description":"When the engine row was last written — by a config save OR by a tick (null when the agent has no heartbeat row). Dates the current obligation — AGNT2-120."},"blockedReason":{"nullable":true,"enum":["owner_not_in_team","team_quota_exhausted"],"type":"string","description":"Why this schedule cannot fire at all, or null when nothing is wrong (AGNT2-224). `owner_not_in_team` means the agent's owner has left the agent's team: a tick is authorized as the owner inside the team, so no tick will ever run again until somebody changes that — it is not a delay and it does not heal. Derived from the data, so the screen can say it BEFORE the next tick is due rather than after one has failed."}},"required":["enabled","intervalMin","effectiveIntervalMin","boostsLeft","prompt"]},"UpdateHeartbeatDto":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Opt-in flag — a disabled heartbeat is never swept","nullable":true},"intervalMin":{"type":"integer","minimum":10,"maximum":1440,"description":"Minutes between self-initiated turns (10..1440). Each tick is a full model turn, so the floor is what bounds the spend.","nullable":true},"prompt":{"type":"string","maxLength":2000,"description":"HEARTBEAT.md — the synthetic user message a tick sends. It is re-sent to the model on every round-trip of every tick, so it is capped at 2000 characters.","nullable":true}}},"ConversationScheduleDto":{"type":"object","properties":{"channel":{"type":"string","description":"The transport this schedule was asked for on — `web` for a cabinet thread, a channel binding's own name for an embedded one. A routing label, never a principal."},"channelUserId":{"type":"string","description":"Who, inside that transport. A visitor key on a channel — opaque, untrusted, and never a user of this product."},"prompt":{"type":"string","description":"The standing instruction, verbatim"},"enabled":{"type":"boolean","description":"Whether this schedule is running"},"intervalMin":{"type":"number","description":"Minutes between wake-ups for this schedule"},"lastRunAt":{"type":"string","nullable":true,"description":"When this schedule last fired (null until its first run)"},"createdAt":{"format":"date-time","type":"string","description":"When this schedule was first left with the agent"},"updatedAt":{"format":"date-time","type":"string","description":"When it was last written"}},"required":["channel","channelUserId","prompt","enabled","intervalMin","lastRunAt","createdAt","updatedAt"]},"ActivityChangeDto":{"type":"object","properties":{"field":{"type":"string","description":"Which field moved, as a code (`interval`, `text`, `enabled`, `status`, `agent`, `note`). Rows written before AGNT2-258 carry a Russian word here instead — print it verbatim."},"from":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}],"description":"The value before; null when there was none"},"to":{"nullable":true,"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}],"description":"The value after"},"unit":{"nullable":true,"enum":["chars","minutes"],"type":"string","description":"How to read the numbers; absent means \"as they are\""}},"required":["field"]},"ActivityEventDto":{"type":"object","properties":{"id":{"type":"string","description":"Event id"},"kind":{"enum":["check","answer","silent_tick","tick_failed","agent_created","agent_archived","heartbeat_updated","heartbeat_boosted","memory_written","device_used","worker_session","grant_changed"],"type":"string","description":"Which kind of event this is"},"outcome":{"enum":["done","refused","failed"],"type":"string","description":"Whether it happened or was refused — a refusal is a row, never a gap"},"humanInitiated":{"type":"boolean","description":"true when a person asked for it in a conversation"},"code":{"enum":["fill_secret.created","fill_secret.used","fill_secret.refused","check.scheduled","check.rescheduled","check.ready","check.gave_up","check.cancelled","tick.answered","tick.silent","tick.owner_not_in_team","tick.failed","tick.team_quota_exhausted","answer.given","answer.interrupted","answer.failed","memory.nothing_to_write","memory.written","memory.refused","memory.gave_up","turn.mutation_limit","agent.created","agent.create_refused","agent.archived","agent.restored","agent.archive_refused","agent.restore_refused","heartbeat.updated","heartbeat.unchanged","heartbeat.schedule_in_tick","heartbeat.stale_enable","heartbeat.update_refused","boost.started","boost.refused","boost.stopped","boost.stop_refused","device.picture_taken","device.tool_called","device.offline","device.too_often","device.tool_failed","device.foreign","session.started","session.stopped","session.tool_called","session.artifact","grant.changed","grant.refused","grant.requested","grant.approved","legacy"],"type":"string","description":"WHAT happened, as a code (AGNT2-258). The screen turns this and `params` into the line a person reads, in the language that person is reading in — which is why the sentence is no longer stored. `legacy` means the row predates this and could not be named."},"params":{"type":"object","additionalProperties":true,"nullable":true,"description":"The values that code's phrase needs — a name, a topic, a date, a count"},"summary":{"type":"string","nullable":true,"description":"The sentence this row was written with, in the language it happened in. Null for everything since AGNT2-258. Show it only when `code` is `legacy` — and show `summaryLang` with it, so the reader is told why one line is in another language."},"summaryLang":{"type":"string","nullable":true,"description":"Which language `summary` is in (`ru` for every row that has one)"},"changes":{"description":"What moved, as before→after pairs; empty when nothing did","type":"array","items":{"$ref":"#/components/schemas/ActivityChangeDto"}},"detail":{"type":"object","additionalProperties":true,"nullable":true,"description":"Small counters and reasons (spent/limit, tool names, refusal reason). The technical cause of a failed turn — the error class and message — is NOT here (AGNT2-395): the owner sees that the turn broke and the turn id to quote; the cause is in the admin panel."},"turnId":{"type":"string","nullable":true,"description":"The turn this came out of; null for events with no turn"},"userId":{"type":"string","nullable":true,"description":"The member whose turn it was; null when nobody was there"},"createdAt":{"type":"string","description":"When it happened (ISO 8601)"}},"required":["id","kind","outcome","humanInitiated","code","changes","createdAt"]},"ActivityPageDto":{"type":"object","properties":{"items":{"description":"The page rows, newest → oldest","type":"array","items":{"$ref":"#/components/schemas/ActivityEventDto"}},"nextCursor":{"type":"string","nullable":true,"description":"Pass back as `?cursor=` for the page of OLDER rows; null at the end"},"hasMore":{"type":"boolean","description":"Whether any older row exists beyond this page"},"retentionDays":{"type":"number","description":"How many days of history this deployment keeps"}},"required":["items","hasMore","retentionDays"]},"RunAgentDto":{"type":"object","properties":{"message":{"type":"string","minLength":1,"example":"What time is it? And who are you?"},"timezone":{"example":"Europe/Moscow","description":"The caller's IANA timezone; answers and relative time reasoning use it.","type":"string","nullable":true},"attachmentIds":{"maxItems":5,"type":"array","items":{"type":"string"},"description":"Attachment ids from the upload route, at most 5","nullable":true}},"required":["message"]},"ToolInvocationDto":{"type":"object","properties":{"id":{"type":"string","description":"Provider tool-use id linking call ↔ result"},"name":{"type":"string","description":"Tool name"},"input":{"type":"object","description":"Arguments the model passed"},"ok":{"type":"boolean","description":"True if the tool resolved; false if it threw or was unknown"},"output":{"type":"object","description":"Result fed back as tool_result. Present when ok, and on a failure the tool itself reported (e.g. an MCP isError), where it holds the structured error details"},"error":{"type":"string","description":"Failure message when !ok"}},"required":["id","name","input","ok"]},"TurnStepDto":{"type":"object","properties":{"turn":{"type":"number","description":"1-based iteration index"},"assistantText":{"type":"string","description":"The model's text for this turn (may be empty)"},"toolCalls":{"description":"Tool calls made this turn with their results","type":"array","items":{"$ref":"#/components/schemas/ToolInvocationDto"}},"usage":{"type":"object","description":"Per-turn token usage"},"stopReason":{"type":"string","description":"Provider stop reason for this turn (end_turn / tool_use / …)"}},"required":["turn","assistantText","toolCalls","stopReason"]},"RunResultDto":{"type":"object","properties":{"unverifiedActions":{"type":"boolean","description":"Heuristic warning: action claims without tool calls; does not block the response"},"text":{"type":"string","description":"The agent's final reply"},"iterations":{"type":"number","description":"How many LLM turns the loop took"},"model":{"type":"string"},"stopReason":{"type":"string","description":"Typed loop outcome: completed | max_iterations | tool_error"},"steps":{"description":"The ordered reasoning trace (how the agent thinks)","type":"array","items":{"$ref":"#/components/schemas/TurnStepDto"}}},"required":["text","iterations","model","stopReason","steps"]},"SubmitChatFormDto":{"type":"object","properties":{"formId":{"type":"string","minLength":1,"example":"form-6f1a2c3d-1111-4222-8333-444455556666","description":"The form being answered, as the agent minted it when it asked."},"values":{"type":"object","additionalProperties":{},"example":{"repo_url":"https://github.com/acme/private","token":"ghp_…"},"description":"The answers, keyed by field name. Strings for text and single-choice fields, an array of strings for a checkbox group, a boolean for a single checkbox."},"timezone":{"type":"string","example":"Europe/Moscow","description":"The caller's IANA timezone; answers and relative time reasoning use it.","nullable":true}},"required":["formId","values"]},"LiveTurnKindTypes":{"type":"string","enum":["message","form"],"description":"Typed by the person, or an answer to a form — only a typed message may be sent again"},"LiveTurnDto":{"type":"object","properties":{"turnId":{"type":"string","description":"The turn id the stream announced in its `turn` frame"},"startedAt":{"type":"string","description":"When the turn began (ISO 8601)"},"message":{"type":"string","description":"The person’s message as the conversation will keep it once the turn ends"},"kind":{"description":"Typed by the person, or an answer to a form — only a typed message may be sent again","allOf":[{"$ref":"#/components/schemas/LiveTurnKindTypes"}]}},"required":["turnId","startedAt","message","kind"]},"LiveTurnStatusTypes":{"type":"string","enum":["running","completed","limited","stopped","failed","unknown"],"description":"`stopped` only when «Стоп» ended it; `unknown` when no record is left (the process running it died, or it is not yours)"},"LiveTurnStatusDto":{"type":"object","properties":{"turnId":{"type":"string"},"status":{"description":"`stopped` only when «Стоп» ended it; `unknown` when no record is left (the process running it died, or it is not yours)","allOf":[{"$ref":"#/components/schemas/LiveTurnStatusTypes"}]},"code":{"type":"string","description":"The failure code, for a `failed` turn that had one"}},"required":["turnId","status"]},"StopTurnResultDto":{"type":"object","properties":{"stopped":{"type":"boolean","description":"True when the turn was running and is now being stopped; false when it had already ended"}},"required":["stopped"]},"ChatThreadDto":{"type":"object","properties":{"id":{"type":"string","description":"Thread id"},"agentId":{"type":"string","description":"The agent this thread belongs to"},"teamId":{"type":"string","description":"The owning team (the read is gated to the caller's team)"},"channel":{"type":"string","description":"Channel key, e.g. `web` for the browser chat"},"channelUserId":{"type":"string","description":"Participant key within the channel (the userId for `web`)"},"createdAt":{"type":"string","description":"When the thread was opened (ISO 8601)"}},"required":["id","agentId","teamId","channel","channelUserId","createdAt"]},"ChatThreadPageDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true,"description":"Pass back as `?cursor=` to fetch the page of OLDER rows; null when the oldest row is already here"},"hasMore":{"type":"boolean","description":"Whether any older row exists beyond this page"},"items":{"description":"The page rows, oldest → newest","type":"array","items":{"$ref":"#/components/schemas/ChatThreadDto"}}},"required":["hasMore","items"]},"ChatAttachmentDto":{"type":"object","properties":{"id":{"type":"string","description":"Attachment id — what a send names to include this file"},"name":{"type":"string","description":"The file name the person uploaded it under"},"contentType":{"type":"string","description":"MIME type as accepted at upload"},"size":{"type":"number","description":"Size in bytes"},"durationSec":{"type":"number","nullable":true,"description":"Video duration in seconds"},"reading":{"enum":["video","audio","image","document","text"],"type":"string","description":"How the agent can read it: `image`, `text`, `document` (PDF, DOCX, XLSX), `video` via video_watch, or `audio` via audio_listen"},"kind":{"enum":["video","audio","image","document","text"],"type":"string"},"url":{"type":"string","description":"Api-relative, signed, time-limited address of the bytes. Minted per response — never stored, never shareable beyond its expiry. Empty for videos, whose bytes require scoped worker access."}},"required":["id","name","contentType","size","reading","kind","url"]},"ChatMessageDto":{"type":"object","properties":{"id":{"type":"string","description":"Message id"},"threadId":{"type":"string","description":"The thread this message belongs to"},"externalId":{"type":"string","description":"Runtime event id — the idempotency key within the thread"},"kind":{"enum":["message","tool_call","tool_result","summary"],"type":"string","description":"message | tool_call | tool_result | summary"},"role":{"type":"string","nullable":true,"description":"Speaker role for a `message` (`user`/`assistant`); null for tool steps"},"text":{"type":"string","nullable":true,"description":"Message text for a `message`; null for tool steps"},"toolName":{"type":"string","nullable":true,"description":"Tool name on a `tool_call`/`tool_result`; null for plain messages"},"toolParams":{"type":"object","additionalProperties":true,"nullable":true,"description":"Tool call arguments (JSON object); null when not a `tool_call`"},"toolUseId":{"type":"string","nullable":true,"description":"Provider tool-use id linking a `tool_call` to its `tool_result`"},"result":{"type":"object","additionalProperties":true,"nullable":true,"description":"Tool result payload (`{ ok, output | error }`); null when not a `tool_result`"},"origin":{"enum":["user","heartbeat"],"type":"string","description":"Who drove the turn: `user` (human/concierge) or `heartbeat` (self-initiated tick)"},"turnId":{"type":"string","nullable":true,"description":"The exchange this row came from (AGNT2-390) — the key `GET /v1/agents/:id/chat/turns` is asked with, and the one the spend ledger and the prompt recordings are keyed on. Null on a row that belongs to no exchange: a restart boundary, and summaries written before compaction began minting one"},"personaVersion":{"type":"string","nullable":true,"description":"The mark of the character this row’s turn ran with (AGNT2-391). A COMPARISON KEY: two rows carrying the same one ran with the same persona, two carrying different ones did not. There is nothing in it for a person to read and it must not be rendered — what the model actually saw is kept by the prompt recordings. Null on a row written before the mark existed, or by a path that composes no prompt"},"interrupted":{"type":"boolean","description":"True when the user stopped this answer mid-turn (AGNT2-109). Assistant rows only — the text is what had streamed by then, and the UI marks it as stopped rather than finished"},"ts":{"type":"string","description":"Ordering timestamp within the thread (ISO 8601)"},"createdAt":{"type":"string","description":"When the row was written (ISO 8601)"},"attachments":{"description":"Files sent with this message (AGNT2-262). Always present, empty on every row that carries none — only a user row can have any","type":"array","items":{"$ref":"#/components/schemas/ChatAttachmentDto"}}},"required":["id","threadId","externalId","kind","origin","interrupted","ts","createdAt","attachments"]},"ChatMessagePageDto":{"type":"object","properties":{"nextCursor":{"type":"string","nullable":true,"description":"Pass back as `?cursor=` to fetch the page of OLDER rows; null when the oldest row is already here"},"hasMore":{"type":"boolean","description":"Whether any older row exists beyond this page"},"items":{"description":"The page rows, oldest → newest","type":"array","items":{"$ref":"#/components/schemas/ChatMessageDto"}}},"required":["hasMore","items"]},"ChatTurnTokensDto":{"type":"object","properties":{"input":{"type":"number","description":"Prompt tokens sent to the provider across the whole turn"},"output":{"type":"number","description":"Tokens the model produced across the whole turn"},"cacheWrite":{"type":"number","description":"Tokens written into the provider’s prompt cache"},"cacheRead":{"type":"number","description":"Tokens served from that cache — cheaper, hence counted apart"},"total":{"type":"number","description":"All four added, for the one-line form"}},"required":["input","output","cacheWrite","cacheRead","total"]},"ChatTurnAmountDto":{"type":"object","properties":{"currency":{"type":"string","description":"ISO 4217 code"},"value":{"type":"number","description":"What this exchange cost US, in the currency’s major unit. One turn is a fraction of a cent, so this is a number rather than the ledger’s exact pico-dollar integer"},"unpriced":{"type":"number","description":"How many of the exchange’s ledger lines no rate covered. Zero is the ordinary case; a non-zero value is carried rather than hidden, because a sum quietly short of what it claims to cover would be believed"}},"required":["currency","value","unpriced"]},"ChatTurnTraceDto":{"type":"object","properties":{"steps":{"type":"number","description":"Model round-trips recorded for this exchange. Never zero."}},"required":["steps"]},"ChatTurnDto":{"type":"object","properties":{"turnId":{"type":"string","description":"The exchange — `ChatMessage.turnId`"},"sources":{"description":"Which paths the spend came from: `turn`, `compaction`, `recall`, … A summary’s key carries `compaction` alone, which is what keeps a recap’s cost out of the answer beside it","type":"array","items":{"type":"string"}},"tokens":{"$ref":"#/components/schemas/ChatTurnTokensDto"},"amount":{"nullable":true,"description":"What this exchange cost us. Null when not one of its ledger lines carried a rate — a reader shows the amount when it is here and the token counts when it is not, which is the shape that let AGNT2-389 turn money on without any client changing","type":"object","allOf":[{"$ref":"#/components/schemas/ChatTurnAmountDto"}]},"trace":{"nullable":true,"description":"The recorded prompts of this exchange, or null when there are none — which is the ordinary case: recording is off by default on every agent and a recording lives seven days. A jump to the trace may be offered only where this is present","type":"object","allOf":[{"$ref":"#/components/schemas/ChatTurnTraceDto"}]}},"required":["turnId","sources","tokens"]},"ChatTurnPageDto":{"type":"object","properties":{"items":{"description":"One row per exchange that has something to report. An exchange with neither spend nor a recording is ABSENT rather than reported as zero — zero is a claim this read cannot make","type":"array","items":{"$ref":"#/components/schemas/ChatTurnDto"}},"recording":{"type":"boolean","description":"Whether prompt recording is switched on for this agent right now"},"retentionDays":{"type":"number","description":"How long a recording is kept, in days"}},"required":["items","recording","retentionDays"]},"ChatTurnTraceStepsDto":{"type":"object","properties":{"items":{"description":"The turn’s round-trips, step order","type":"array","items":{"$ref":"#/components/schemas/PromptLogSummaryDto"}},"retentionDays":{"type":"number","description":"How long a recording is kept, in days"}},"required":["items","retentionDays"]},"RestartChatDto":{"type":"object","properties":{"restarted":{"type":"boolean","example":true,"description":"Whether this call drew the line (false: nothing to restart, or already restarted)."},"boundary":{"nullable":true,"description":"The boundary row now standing in the thread; null when there is no conversation.","type":"object","allOf":[{"$ref":"#/components/schemas/ChatMessageDto"}]}},"required":["restarted"]},"ClearChatDto":{"type":"object","properties":{"deleted":{"type":"boolean","example":true,"description":"Whether a conversation existed and was deleted."}},"required":["deleted"]},"UploadChatAttachmentDto":{"type":"object","properties":{"attachment":{"description":"The accepted file","allOf":[{"$ref":"#/components/schemas/ChatAttachmentDto"}]}},"required":["attachment"]},"BeginVideoUploadDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","enum":["video/mp4","video/quicktime","video/webm","audio/mpeg","audio/mp3","audio/mp4","audio/x-m4a","audio/m4a","audio/aac","audio/x-aac","audio/wav","audio/x-wav","audio/wave","audio/vnd.wave","audio/ogg","audio/opus","audio/webm","audio/flac","audio/x-flac"]},"size":{"type":"integer","exclusiveMinimum":true,"maximum":209715200,"minimum":0}},"required":["name","contentType","size"]},"VideoUploadDto":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","description":"PUT the raw file here with Content-Type and If-None-Match: *. Expires in 15 minutes. Complete before sending."}},"required":["id","url"]},"AgentConversationDto":{"type":"object","properties":{"agentId":{"type":"string","description":"The agent this conversation belongs to"},"threadId":{"type":"string","description":"The thread the last message was said in"},"lastMessage":{"description":"The newest `message` row of the thread — what the preview line shows","allOf":[{"$ref":"#/components/schemas/ChatMessageDto"}]}},"required":["agentId","threadId","lastMessage"]},"LeadConversationDto":{"type":"object","properties":{"threadId":{"type":"string","description":"The conversation — addresses the per-thread message endpoint"},"agentId":{"type":"string","description":"Which of the team’s agents this person was talking to"},"channel":{"type":"string","description":"The surface it happened on, e.g. `bridle`"},"createdAt":{"type":"string","description":"When the conversation was opened (ISO 8601)"},"messageCount":{"type":"number","description":"How many things were said in it — tool steps and archive lines excluded"},"lastMessage":{"nullable":true,"description":"The newest thing said — the preview line. Null for a conversation that was opened and never spoken in, which is a real state and not an error","type":"object","allOf":[{"$ref":"#/components/schemas/ChatMessageDto"}]}},"required":["threadId","agentId","channel","createdAt","messageCount"]},"MemoryIngestDto":{"type":"object","properties":{"notes":{"type":"number","description":"Notes with a body worth embedding — the material, not the work"},"indexed":{"type":"number","description":"Vectors written by THIS run. 0 means everything was already embedded under the current model and width — not that nothing could be embedded, which fails instead"},"dropped":{"type":"number","description":"Vectors removed because their note is gone or was emptied"},"provider":{"type":"string","description":"The vendor that made them — `openai`, or `voyage`"},"model":{"type":"string","description":"Written into every vector row; a search returns only rows that carry it"},"dimensions":{"type":"number","description":"Width of every vector written; a search compares only rows of its own width"}},"required":["notes","indexed","dropped","provider","model","dimensions"]},"MemoryNoteDto":{"type":"object","properties":{"id":{"type":"string","description":"Stable id — what a delete names"},"kind":{"enum":["curated","daily"],"type":"string","description":"curated — the standing page, written by a person or carried in with a package; daily — a dated note, which is what the agent writes for itself after a conversation"},"date":{"type":"string","nullable":true,"description":"YYYY-MM-DD for a dated note; null for the curated page"},"topic":{"type":"string","nullable":true,"description":"What the note is about (AGNT2-266) — one short lower-case subject the agent wrote beside the note, and what the screen groups by. null for the curated page, which is about no one subject, and null for any note written before topics existed."},"body":{"type":"string","description":"The note itself, markdown, in full"},"chars":{"type":"number","description":"Characters in the note — what it costs on every turn that reads it"},"createdAt":{"type":"string","description":"When it was first written"},"updatedAt":{"type":"string","description":"When it was last rewritten"}},"required":["id","kind","body","chars","createdAt","updatedAt"]},"AgentMemoryDto":{"type":"object","properties":{"notes":{"description":"Curated page first, then dated notes, newest first","type":"array","items":{"$ref":"#/components/schemas/MemoryNoteDto"}},"count":{"type":"number","description":"How many notes there are"},"chars":{"type":"number","description":"Characters across every note"},"maxChars":{"type":"number","description":"The most characters one note may be (2000)"}},"required":["notes","count","chars","maxChars"]},"RewriteMemoryNoteDto":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":2000,"description":"What this note should say from now on, in full. It replaces the whole of the note — at most 2000 characters, the same ceiling the agent writes under."}},"required":["body"]},"ForgetMemoryDto":{"type":"object","properties":{"forgotten":{"type":"boolean","description":"True when a note was found and erased"}},"required":["forgotten"]},"LeadListItemDto":{"type":"object","properties":{"id":{"type":"string","description":"Lead id — addresses the row, and is never a name"},"teamId":{"type":"string","description":"Whose customer this person is. It is here so that the SHORT address `/leads/lead-…` can exist (AGNT2-293): the screen is told which team the person belongs to instead of taking the one the browser happens to remember. It is not a permission — the caller has already been proved a member of it before this is sent"},"recognized":{"type":"boolean","description":"Whether this person told us anything to call them by. False means they wrote anonymously — the screen says so in words rather than showing an identifier"},"name":{"type":"string","nullable":true,"description":"Their name, if we learned it"},"email":{"type":"string","nullable":true,"description":"Their email, if we learned it"},"phone":{"type":"string","nullable":true,"description":"Their phone, if we learned it"},"externalId":{"type":"string","nullable":true,"description":"Who this person is in the site`s own system, when the site introduced them with its embed key (AGNT2-234). Null for a visitor who arrived anonymously off a page. It is deliberately NOT part of `recognized` — a customer number is not something an operator can call somebody by"},"firstSeenAt":{"type":"string","description":"The first message they ever sent this team (ISO 8601)"},"lastSeenAt":{"type":"string","description":"The most recent one (ISO 8601) — the list is sorted by this"},"firstAgentId":{"type":"string","description":"The agent they first arrived through"},"firstChannel":{"type":"string","description":"The channel they first arrived on, e.g. `bridle`"},"lastAgentId":{"type":"string","description":"The agent they were last seen with"},"lastChannel":{"type":"string","description":"The channel they were last seen on"},"conversationCount":{"type":"number","description":"How many conversations this person has had with the team"}},"required":["id","teamId","recognized","firstSeenAt","lastSeenAt","firstAgentId","firstChannel","lastAgentId","lastChannel","conversationCount"]},"LeadListDto":{"type":"object","properties":{"items":{"description":"The people, most recently seen first","type":"array","items":{"$ref":"#/components/schemas/LeadListItemDto"}},"hasMore":{"type":"boolean","description":"More people match than were returned — narrow the search to see them"},"unattributedConversations":{"type":"number","description":"How many conversations this team has had from outside with nobody recorded behind them (AGNT2-244). Team-wide, never narrowed by the search. It should always be 0; when it is not, an empty list does NOT mean nobody wrote, and the screen must say so rather than claim silence"}},"required":["items","hasMore","unattributedConversations"]},"LeadPersonaEntryDto":{"type":"object","properties":{"id":{"type":"string","description":"Line id — what a correction or a deletion addresses"},"text":{"type":"string","description":"The line itself, one short thing about this person"},"source":{"enum":["visitor","team"],"type":"string","description":"`visitor` — the person said it about themselves and NOBODY checked it. `team` — a member of this team wrote or corrected it."},"agentId":{"type":"string","nullable":true,"description":"The agent that was told this; null when a person of the team wrote it"},"saidAt":{"type":"string","description":"When it was said, or when a member wrote it (ISO 8601)"}},"required":["id","text","source","saidAt"]},"LeadPersonaDto":{"type":"object","properties":{"items":{"description":"The lines, newest first","type":"array","items":{"$ref":"#/components/schemas/LeadPersonaEntryDto"}},"maxEntries":{"type":"number","description":"The most lines one person may hold (12)"},"maxChars":{"type":"number","description":"The most characters one line may be (200)"}},"required":["items","maxEntries","maxChars"]},"RewriteLeadPersonaDto":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":200,"description":"What this line should say from now on. Saving it makes the line the team's."}},"required":["text"]},"LeadPersonaReadingConversationDto":{"type":"object","properties":{"threadId":{"type":"string","description":"The conversation. Addresses the per-thread message endpoint."},"agentId":{"type":"string","description":"Which of the team's agents this person was talking to"},"messages":{"type":"number","description":"How many things were SAID in it"},"readAt":{"type":"string","nullable":true,"description":"When the curator last read this conversation (ISO 8601); null — never"},"pendingExchanges":{"type":"number","description":"Completed exchanges said since that reading"}},"required":["threadId","agentId","messages","pendingExchanges"]},"LeadPersonaReadingDto":{"type":"object","properties":{"state":{"enum":["no-conversation","below-threshold","unread","read"],"type":"string","description":"`no-conversation` — nobody has written as this person yet. `below-threshold` — something was said, but less than `exchangeThreshold` exchanges: notes appear once the conversation goes on. `unread` — enough is waiting that the next turn will read it. `read` — every word has been read and NOTHING more appears on its own."},"conversations":{"type":"array","items":{"$ref":"#/components/schemas/LeadPersonaReadingConversationDto"}},"exchangeThreshold":{"type":"number","description":"How many exchanges pile up before a conversation is read by itself"}},"required":["state","conversations","exchangeThreshold"]},"LeadPersonaRereadDto":{"type":"object","properties":{"read":{"type":"number","description":"Conversations a model was actually shown"},"linesAdded":{"type":"number","description":"Lines added to this person by the re-reading"},"inputTokens":{"type":"number","description":"Input tokens spent, over every conversation and every call"},"outputTokens":{"type":"number","description":"Output tokens spent, over every conversation and every call"}},"required":["read","linesAdded","inputTokens","outputTokens"]},"WorkerViewStoppedDto":{"type":"object","properties":{"live":{"type":"boolean","enum":[false]}},"required":["live"]},"WorkerViewPageDto":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"capturedAt":{"type":"string","format":"date-time"},"contentType":{"type":"string","enum":["image/jpeg"]},"data":{"type":"string","description":"JPEG bytes encoded as base64; never stored","format":"byte"}},"required":["url","title","capturedAt","contentType","data"]},"WorkerViewLiveDto":{"type":"object","properties":{"live":{"type":"boolean","enum":[true]},"page":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/WorkerViewPageDto"}]}},"required":["live","page"]},"AgentWorkerSessionDto":{"type":"object","properties":{"id":{"type":"string","description":"The session id — the same one the logs and kubectl name"},"status":{"enum":["pending","starting","running","idle","stopping","stopped","failed"],"type":"string","description":"Where in its life it is"},"runtimeType":{"enum":["none","light","browser","heavy","warm"],"type":"string","description":"The image family it ran as. Since AGNT2-226 this names the image (`light` = shell) rather than a preset a person picked; `heavy` and `warm` appear only on sessions raised before that"},"createdAt":{"type":"string","description":"When the api asked for it"},"startedAt":{"type":"string","nullable":true,"description":"When its worker dialled in"},"lastActivityAt":{"type":"string","nullable":true,"description":"When it last finished a tool call — the clock the idle reaper reads"},"stoppedAt":{"type":"string","nullable":true,"description":"When it ended"},"failureReason":{"type":"string","nullable":true,"description":"Why the channel ended badly, for a `failed` session"},"stopReason":{"type":"string","nullable":true,"description":"Which door it left by, for a session that was stopped"},"idleDeadline":{"type":"string","nullable":true,"description":"When a live, quiet session is due to be let go; null when there is no such moment"},"toolCount":{"type":"number","nullable":true,"description":"Tools it advertised; null when another api replica is serving its socket"}},"required":["id","status","runtimeType","createdAt"]},"AgentWorkerDto":{"type":"object","properties":{"agentId":{"type":"string","description":"The agent this describes"},"image":{"nullable":true,"enum":["shell","browser"],"type":"string","description":"Which image this agent gets, DERIVED from its grant (AGNT2-226); null when it raises nothing. Nobody chooses it — see `imageReason`"},"imageReason":{"enum":["no_worker_tools","browser_tool_granted","shell_tools_only"],"type":"string","description":"Why the system chose that image — the panel has to explain the choice it made"},"imageBecause":{"description":"The granted tool names that decided it — «браузер, потому что выдан browser_play». Empty when nothing servable was granted","type":"array","items":{"type":"string"}},"keepWarm":{"type":"boolean","description":"Whether a quiet session is held open long past the usual window (`config.keepWarm`). One of the two things no tool implies, so it stays the owner’s to decide (AGNT2-226)"},"longRunning":{"type":"boolean","description":"Whether one call may run for an hour rather than fifteen minutes (`config.longRunning`) — the surviving half of the old `heavy` preset"},"idleSeconds":{"type":"number","description":"The idle window this agent’s worker gets, in seconds"},"maxExecSeconds":{"type":"number","description":"The hard ceiling on one of its calls, in seconds"},"state":{"enum":["off","idle","starting","running","failed"],"type":"string","description":"The one word the header shows"},"grant":{"description":"Worker tools this agent is granted","type":"array","items":{"type":"string"}},"servable":{"description":"Of those, the ones a worker image can serve today — the model sees exactly these","type":"array","items":{"type":"string"}},"egress":{"description":"Where this agent’s worker may go; empty means it may reach nothing (AGNT2-201)","type":"array","items":{"type":"string"}},"egressRefused":{"description":"Destinations this deployment refuses — while any is listed, no worker can be raised at all","type":"array","items":{"type":"string"}},"egressUnrestricted":{"type":"boolean","description":"Whether this agent asked to go anywhere at all — `config.egress` is the one word `internet:unrestricted` (AGNT2-207). Says what was asked for, not what was granted: when the deployment’s ceiling does not permit it, this is true AND the word appears in `egressRefused`, and no worker can be raised"},"waitSeconds":{"type":"number","nullable":true,"description":"How long a cold start is allowed to take, in seconds; null when the agent has no hands"},"sessions":{"description":"Recent sessions, newest first","type":"array","items":{"$ref":"#/components/schemas/AgentWorkerSessionDto"}}},"required":["agentId","imageReason","imageBecause","keepWarm","longRunning","idleSeconds","maxExecSeconds","state","grant","servable","egress","egressRefused","egressUnrestricted","sessions"]},"AgentWorkerImageOptionDto":{"type":"object","properties":{"image":{"nullable":true,"enum":["shell","browser"],"type":"string","description":"The image; null is the \"nothing granted, no pod at all\" row"},"cpu":{"type":"string","nullable":true,"description":"CPU ceiling"},"memory":{"type":"string","nullable":true,"description":"Memory ceiling"},"storage":{"type":"string","nullable":true,"description":"Ephemeral workspace size"},"idleSeconds":{"type":"number","description":"How long a quiet session is kept before it is let go, in seconds"},"maxExecSeconds":{"type":"number","description":"The hard ceiling on a single run, in seconds"},"startSeconds":{"type":"number","nullable":true,"description":"How long the first tool call of a turn waits for this image to come up, in seconds; null when no worker is raised"},"tools":{"description":"The tool names a worker on this image can actually serve today","type":"array","items":{"type":"string"}}},"required":["idleSeconds","maxExecSeconds","tools"]},"AgentWorkerToolDto":{"type":"object","properties":{"name":{"type":"string","description":"The exact name a grant must carry. A name the image does not know refuses the whole session, deliberately and loudly, so this is what a chooser must send back verbatim"},"description":{"type":"string","description":"What it does, as the api describes it before any worker is up"},"image":{"nullable":true,"enum":["shell","browser"],"type":"string","description":"Which image granting this tool FORCES (AGNT2-226); null when every image serves it. This is the price of the checkbox, and it is here so a screen can show it beside the checkbox rather than in a separate card"}},"required":["name","description"]},"AgentWorkerOptionsDto":{"type":"object","properties":{"agentId":{"type":"string","description":"The agent these options were asked for"},"images":{"description":"What each image costs — no worker, the shell image, the browser image","type":"array","items":{"$ref":"#/components/schemas/AgentWorkerImageOptionDto"}},"tools":{"description":"Every tool a worker image serves today","type":"array","items":{"$ref":"#/components/schemas/AgentWorkerToolDto"}},"keepWarmIdleSeconds":{"type":"number","description":"The idle window `keepWarm` buys, in seconds — what the knob is worth (AGNT2-226)"},"longRunningMaxExecSeconds":{"type":"number","description":"The single-call ceiling `longRunning` buys, in seconds (AGNT2-226)"},"egressCeilingConfigured":{"type":"boolean","description":"Whether this deployment has opened ANY network destination at all. False means no address an owner writes can be reached, whatever it is — it is the operator’s setting, not theirs"}},"required":["agentId","images","tools","keepWarmIdleSeconds","longRunningMaxExecSeconds","egressCeilingConfigured"]},"WriteAgentWorkerGrantDto":{"type":"object","properties":{"tools":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":64},"description":"The worker tools this agent may use, by exact name. Empty means none, which is what every agent has until somebody writes this — and since AGNT2-226 this list is also what decides the image and the sizing: any of `browser`, `browser_screenshot` or `browser_play` raises the browser image, anything else the shell one, an empty list no pod at all. Stored as `config.tools`","nullable":true},"egress":{"maxItems":200,"type":"array","items":{"type":"string","maxLength":255},"description":"Where this agent’s worker may go: `example.com`, or `*.example.com`. Empty means nowhere. Bounded above by the deployment’s own ceiling — an entry outside it is stored and reported as unreachable, not silently dropped. Stored as `config.egress`","nullable":true},"browserPlay":{"maxItems":200,"type":"array","items":{"type":"string","maxLength":253},"description":"Which of those sites this agent may ACT on — type into and press buttons on with `browser_play`. Exact hostnames only: no `*.` wildcard and no `internet:unrestricted`, both of which are legitimate above and mean nothing here. Empty means the agent may look at pages and touch none of them, which is what every agent has until somebody writes this. Pressing a button on a website cannot be undone, so it is a separate list from the one above rather than a consequence of it. Stored as `config.browserPlay`","nullable":true},"keepWarm":{"type":"boolean","description":"Hold a quiet session open for ten minutes instead of ninety seconds. Money against latency, and no tool implies an answer — this is what is left of the old `warm` preset, which was the same image and the same hardware as `light` and differed only in this number. Stored as `config.keepWarm`","nullable":true},"longRunning":{"type":"boolean","description":"Let ONE call run for an hour rather than fifteen minutes. The surviving half of the old `heavy` preset: its other half was four CPUs, and hardware is derived from the grant now. It is still a ceiling — something stops. Stored as `config.longRunning`","nullable":true}}},"AgentWorkerImageDto":{"type":"object","properties":{"contentType":{"type":"string","description":"The media type of the picture","example":"image/png"},"bytes":{"type":"number","description":"How many bytes the picture is, before encoding"},"base64":{"type":"string","description":"The picture itself, base64. The client builds a data URL from it"}},"required":["contentType","bytes","base64"]},"WorkerLogSessionDto":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"runtimeType":{"type":"string"},"createdAt":{"type":"string"},"startedAt":{"type":"string","nullable":true},"stoppedAt":{"type":"string","nullable":true},"stopReason":{"type":"string","nullable":true},"failureReason":{"type":"string","nullable":true},"bytes":{"type":"number","nullable":true}},"required":["id","status","runtimeType","createdAt","startedAt","stoppedAt","stopReason","failureReason","bytes"]},"WorkerLogHistoryDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WorkerLogSessionDto"}},"nextOffset":{"type":"number","nullable":true}},"required":["items","nextOffset"]},"WorkerLogDto":{"type":"object","properties":{"text":{"type":"string"},"source":{"enum":["live","saved","unavailable","expired"],"type":"string"},"bytes":{"type":"number"},"truncated":{"type":"boolean"},"complete":{"type":"boolean"},"nextOffset":{"type":"number","nullable":true}},"required":["text","source","bytes","truncated","complete","nextOffset"]},"SetSecretDto":{"type":"object","properties":{"scope":{"type":"string","enum":["shared","agent","user"]},"userId":{"type":"string","description":"Target user id — required only for user scope","nullable":true},"entries":{"type":"object","additionalProperties":{"type":"string"},"description":"Map of \"service:key\" → value, e.g. { \"gmail:app_password\": \"…\" }. Merged into the scope: these keys are added or overwritten, every other key of the scope is kept. Use DELETE /v1/agents/{agentId}/secrets/keys to remove one.","example":{"gmail:app_password":"hunter2"}}},"required":["scope","entries"]},"SecretMetaDto":{"type":"object","properties":{"scope":{"enum":["shared","agent","user"],"type":"string"},"agentId":{"type":"string","nullable":true},"userId":{"type":"string","nullable":true},"keys":{"description":"The \"service:key\" names stored (no values)","type":"array","items":{"type":"string"}},"pendingKeys":{"description":"The \"service:key\" names an imported package DECLARED but that are not filled in yet. A package never carries values (AGNT2-74), so these are what the user must still enter.","type":"array","items":{"type":"string"}},"kekVersion":{"type":"number"},"updatedAt":{"type":"string"}},"required":["scope","keys","pendingKeys","kekVersion","updatedAt"]},"CreateFillSecretDto":{"type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":4096,"description":"Write-only secret; never returned","example":"synthetic-test-value"},"hosts":{"type":"array","minItems":1,"maxItems":5,"items":{"type":"string","minLength":1,"maxLength":253,"pattern":"^(?=.{1,253}$)[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)*$"}},"ttlSeconds":{"type":"integer","minimum":30,"maximum":600,"nullable":true},"uses":{"type":"integer","minimum":1,"maximum":3,"nullable":true},"label":{"type":"string","maxLength":80,"nullable":true}},"required":["value","hosts"],"additionalProperties":false},"FillSecretReceiptDto":{"type":"object","properties":{"ref":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"required":["ref","expiresAt"]},"AgentGrantAccessDto":{"type":"object","properties":{"agentId":{"type":"string"},"role":{"enum":["owner","admin","member"],"type":"string","description":"The caller's role in the agent's team"},"canChange":{"type":"boolean","description":"Owner or admin — the permission controls are live; otherwise read-only"},"organizationGoverned":{"type":"boolean","description":"A partner organization's approved policy caps every grant to this agent"}},"required":["agentId","role","canChange","organizationGoverned"]},"AgentDeviceToolDto":{"type":"object","properties":{"name":{"type":"string","description":"The name the device gave it — the name the agent calls"},"description":{"type":"string","nullable":true,"description":"The device's own sentence about what it does"},"usable":{"type":"boolean","description":"Whether this name can be put in front of a model at all. `false` means the device declared a name outside `^[a-zA-Z0-9_-]{1,128}$` — a Cyrillic or spaced name, say — so the agent is not offered it and the device has to be renamed"}},"required":["name","usable"]},"AgentDeviceDto":{"type":"object","properties":{"id":{"type":"string","description":"The device id"},"agentId":{"type":"string","description":"The agent that may use it. One agent, not the team"},"name":{"type":"string","description":"What the owner called it — «камера на кухне»"},"publicId":{"type":"string","description":"The public half of its credential. Safe to quote in a support ticket; it is what the api logs when it refuses a dial"},"connected":{"type":"boolean","description":"Whether it is talking to this api right now. With more than one api replica only the one holding the socket answers true — see DeviceChannelService"},"lastSeenAt":{"type":"string","nullable":true,"description":"When it was last connected or last answered a call"},"tools":{"description":"What it can do: what it is advertising now if it is connected, and what it last advertised if it is not. Empty means it has never completed a handshake","type":"array","items":{"$ref":"#/components/schemas/AgentDeviceToolDto"}},"declaredToolsAt":{"type":"string","nullable":true,"description":"When it last said what it could do"},"revokedAt":{"type":"string","nullable":true,"description":"When its key was revoked. Non-null means it can never dial in again"},"createdBy":{"type":"string","description":"The member who registered it"},"createdAt":{"type":"string","description":"When it was registered"}},"required":["id","agentId","name","publicId","connected","tools","createdBy","createdAt"]},"RegisterAgentDeviceDto":{"type":"object","properties":{"name":{"type":"string","maxLength":80,"description":"What to call it, for the listing — «камера на кухне»"}},"required":["name"]},"RegisteredAgentDeviceDto":{"type":"object","properties":{"id":{"type":"string","description":"The device id"},"agentId":{"type":"string","description":"The agent that may use it. One agent, not the team"},"name":{"type":"string","description":"What the owner called it — «камера на кухне»"},"publicId":{"type":"string","description":"The public half of its credential. Safe to quote in a support ticket; it is what the api logs when it refuses a dial"},"connected":{"type":"boolean","description":"Whether it is talking to this api right now. With more than one api replica only the one holding the socket answers true — see DeviceChannelService"},"lastSeenAt":{"type":"string","nullable":true,"description":"When it was last connected or last answered a call"},"tools":{"description":"What it can do: what it is advertising now if it is connected, and what it last advertised if it is not. Empty means it has never completed a handshake","type":"array","items":{"$ref":"#/components/schemas/AgentDeviceToolDto"}},"declaredToolsAt":{"type":"string","nullable":true,"description":"When it last said what it could do"},"revokedAt":{"type":"string","nullable":true,"description":"When its key was revoked. Non-null means it can never dial in again"},"createdBy":{"type":"string","description":"The member who registered it"},"createdAt":{"type":"string","description":"When it was registered"},"key":{"type":"string","description":"The whole credential, `dvk.<publicId>.<secret>`. Shown once and never again — paste it into the device now"}},"required":["id","agentId","name","publicId","connected","tools","createdBy","createdAt","key"]},"McpServerToolDto":{"type":"object","properties":{"name":{"type":"string","description":"The name the server gave it — the name the agent calls"},"description":{"type":"string","nullable":true,"description":"The server's own sentence"},"usable":{"type":"boolean","description":"Whether this name can be put in front of a model at all. `false` means the server declared a name outside `^[a-zA-Z0-9_-]{1,128}$`, so the agent is not offered it"}},"required":["name","usable"]},"McpMisplacedCredentialDto":{"type":"object","properties":{"key":{"type":"string","description":"The declared name, as the server row spells it"},"scope":{"type":"string","description":"Which scope of the team holds a value under that name — `agent` (one agent’s own credentials) or `user` (one member’s). Never `shared`: that is the one this server reads"}},"required":["key","scope"]},"McpServerUserDto":{"type":"object","properties":{"agentId":{"type":"string"},"agentName":{"type":"string"}},"required":["agentId","agentName"]},"McpServerDto":{"type":"object","properties":{"trustedContext":{"type":"boolean"},"id":{"type":"string"},"teamId":{"type":"string"},"name":{"type":"string","description":"What a person called it. Never a tool name"},"url":{"type":"string","description":"The Streamable HTTP address of the server"},"origin":{"type":"string","description":"What KIND of record this is: `manual` — a person filled in the form, `agent` — an agent registered it for itself (AGNT2-330; nothing writes it yet), `system` — an installation-wide server (exists, does nothing)"},"authorUserId":{"type":"string","nullable":true,"description":"The person who registered it, when a person did"},"authorAgentId":{"type":"string","nullable":true,"description":"The agent that registered it, when an agent did. Goes null rather than taking the server with it when that agent is deleted"},"secretKeys":{"description":"The credential NAMES this server needs — never values. `service:Header` shaped: the part after the last colon is the HTTP header the value is sent as","type":"array","items":{"type":"string"}},"unfilledKeys":{"description":"Which of those names the team has NOT filled in yet. Non-empty is what the screen draws «ключ не заполнен» from","type":"array","items":{"type":"string"}},"egressGranted":{"description":"Where this server may be dialled: the operator's ceiling intersected with what the team asked for. A dial outside it is refused before the socket is touched","type":"array","items":{"type":"string"}},"callTimeoutMs":{"type":"number","description":"How long ONE call to this server may take, in milliseconds. The default is 15 000 — chosen against servers that answer in seconds — and a server that WORKS for a minute (image or video generation) needs it raised deliberately, because the turn then waits that long. Between 1000 and 300000; there is no «no limit» value, because unbounded is what the limit exists to prevent"},"tools":{"description":"The last toolset it answered with","type":"array","items":{"$ref":"#/components/schemas/McpServerToolDto"}},"discoveredAt":{"type":"string","nullable":true,"format":"date-time","description":"When it was last asked what it can do. Never during a turn"},"lastError":{"type":"string","nullable":true,"description":"Why the last attempt to reach it failed, when it did"},"misplacedCredentials":{"description":"AGNT2-383 — the subset of `unfilledKeys` that the team HAS entered a value for, in a scope this server does not read. Non-empty means the screen must say «saved for the agent, this server needs the team’s shared one» rather than «not filled in»","type":"array","items":{"$ref":"#/components/schemas/McpMisplacedCredentialDto"}},"users":{"description":"The agents attached to it","type":"array","items":{"$ref":"#/components/schemas/McpServerUserDto"}},"createdAt":{"type":"string","format":"date-time"}},"required":["trustedContext","id","teamId","name","url","origin","authorUserId","authorAgentId","secretKeys","unfilledKeys","egressGranted","callTimeoutMs","tools","discoveredAt","lastError","misplacedCredentials","users","createdAt"]},"RegisterMcpServerDto":{"type":"object","properties":{"name":{"type":"string","maxLength":80,"description":"What to call it"},"url":{"type":"string","maxLength":500,"format":"uri","description":"Its Streamable HTTP address. http/https only; stdio is not the api"},"secretKeys":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"The credential names it needs, `service:Header` shaped. They land unfilled on the team's secrets screen and never carry a value through this endpoint","nullable":true},"egress":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Where it may be dialled. Omitted means «this address and nowhere else», intersected with the operator's ceiling either way","nullable":true},"callTimeoutMs":{"type":"integer","minimum":1000,"maximum":300000,"description":"How long ONE call to this server may take, in milliseconds. The default is 15 000 — chosen against servers that answer in seconds — and a server that WORKS for a minute (image or video generation) needs it raised deliberately, because the turn then waits that long. Between 1000 and 300000; there is no «no limit» value, because unbounded is what the limit exists to prevent","nullable":true}},"required":["name","url"]},"UpdateMcpServerDto":{"type":"object","properties":{"trustedContext":{"type":"boolean","description":"Require trusted human conversation context at tool dispatch","nullable":true},"name":{"type":"string","maxLength":80,"nullable":true},"secretKeys":{"type":"array","items":{"type":"string"},"maxItems":20,"nullable":true},"callTimeoutMs":{"type":"integer","minimum":1000,"maximum":300000,"description":"How long ONE call to this server may take, in milliseconds. The default is 15 000 — chosen against servers that answer in seconds — and a server that WORKS for a minute (image or video generation) needs it raised deliberately, because the turn then waits that long. Between 1000 and 300000; there is no «no limit» value, because unbounded is what the limit exists to prevent","nullable":true}}},"FillMcpCredentialDto":{"type":"object","properties":{"key":{"type":"string","maxLength":200,"description":"One of the credential names this server declares. Anything else is refused — this is a road into the vault authorised by a server row, so the row bounds it"},"value":{"type":"string","maxLength":8000,"description":"The credential itself. Stored encrypted in the TEAM’S SHARED scope — the only one an MCP dial reads — and never returned by any endpoint. Paste it exactly as the server documents it, including a `Bearer ` prefix when it wants one"}},"required":["key","value"]},"MoveMcpCredentialDto":{"type":"object","properties":{"key":{"type":"string","maxLength":200,"description":"One of the credential names this server declares"}},"required":["key"]},"AttachMcpServerDto":{"type":"object","properties":{"serverId":{"type":"string","description":"A server the team has already registered"}},"required":["serverId"]},"RunConciergeDto":{"type":"object","properties":{"message":{"type":"string","minLength":1,"example":"How do I create my first agent?"},"timezone":{"example":"Europe/Moscow","description":"The caller's IANA timezone; answers and relative time reasoning use it.","type":"string","nullable":true},"attachmentIds":{"maxItems":5,"type":"array","items":{"type":"string"},"description":"Attachment ids from the upload route, at most 5","nullable":true}},"required":["message"]},"ConciergeReplyDto":{"type":"object","properties":{"text":{"type":"string","description":"The concierge's reply"},"iterations":{"type":"number","description":"How many LLM turns the reply took (1 for the MVP single-call turn)"},"model":{"type":"string"}},"required":["text","iterations","model"]},"ImportedAgentDto":{"type":"object","properties":{"maxTurnIterations":{"type":"number","nullable":true,"minimum":1,"description":"Configured maximum model steps per turn; null means 8. Execution is bounded by the deployment ceiling (default 50)."},"pinned":{"type":"boolean","description":"Pinned by the current user (list projection)"},"pinnedAt":{"type":"string","nullable":true,"format":"date-time"},"id":{"type":"string"},"teamId":{"type":"string"},"ownerId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"enum":["active","disabled","archived","idle"],"type":"string"},"type":{"enum":["standard","concierge"],"type":"string","description":"WHAT this agent is. Server-assigned — it cannot be set by a request or a package."},"capabilities":{"description":"What this type allows, from the one declaration the write guards read. Build the interface from THIS, not from `type`.","allOf":[{"$ref":"#/components/schemas/AgentCapabilitiesDto"}]},"soul":{"type":"string","nullable":true},"user":{"type":"string","nullable":true},"heartbeat":{"type":"string","nullable":true,"description":"HEARTBEAT.md — the packaged prompt TEXT. Says nothing about autostart."},"config":{"type":"object","additionalProperties":true},"runtimeProfile":{"enum":["none","light","browser","heavy","warm"],"type":"string","description":"Whether this agent's turns may raise a worker, and which one. `none` — the default for every agent — means it answers from the model alone and starts nothing"},"autostart":{"nullable":true,"description":"Autostart engine state, or null when it was never configured. NOT derived from `heartbeat`.","type":"object","allOf":[{"$ref":"#/components/schemas/AgentAutostartDto"}]},"promptLogEnabled":{"type":"boolean","description":"Whether this agent's prompts are recorded in full for the admin panel. False unless a platform administrator enables it."},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"created":{"type":"boolean","description":"true if a new agent was created, false if an existing one was updated"},"pendingSecrets":{"description":"Credential names the package declared that still have to be entered by hand. Packages carry names, never values (AGNT2-74).","type":"array","items":{"type":"string"}},"legacySecretValuesDiscarded":{"type":"boolean","description":"The imported package predates AGNT2-74 and still carried plaintext secret values. They were discarded; only the names were kept."}},"required":["id","teamId","ownerId","name","status","type","capabilities","config","runtimeProfile","promptLogEnabled","createdAt","updatedAt","created","pendingSecrets","legacySecretValuesDiscarded"]},"PackageSourceDto":{"type":"object","properties":{"kind":{"type":"string","enum":["storage"]},"key":{"type":"string","description":"Storage key of the package tarball"}},"required":["kind","key"]},"ImportAgentDto":{"type":"object","properties":{"teamId":{"type":"string","example":"team-3f9c…"},"agentId":{"type":"string","description":"Force the target agent (else upsert by the package id)","nullable":true},"source":{"$ref":"#/components/schemas/PackageSourceDto"}},"required":["teamId"]},"PackageRefDto":{"type":"object","properties":{"storageKey":{"type":"string"},"schemaVersion":{"type":"string"}},"required":["storageKey","schemaVersion"]},"ExportAgentDto":{"type":"object","properties":{"includeId":{"type":"boolean","description":"Carry the agent origin id in the manifest (default true). Set false to omit it so the package always imports as a NEW agent.","default":true,"nullable":true}}},"ImportedSkillDto":{"type":"object","properties":{"id":{"type":"string","description":"The id of the skill that was created"},"name":{"type":"string","description":"What it is called — unique within the team"},"files":{"description":"The files stored beside its text, by path. Empty means the archive held a SKILL.md and nothing else, which is a perfectly ordinary skill","type":"array","items":{"type":"string"}}},"required":["id","name","files"]},"GrantRequestKindTypes":{"type":"string","enum":["worker_tool","egress_host","browser_play_host","mcp_server"]},"GrantRequestStatusTypes":{"type":"string","enum":["pending","allowed","declined"]},"GrantRequestAskerDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true}},"required":["id"]},"GrantRequestDto":{"type":"object","properties":{"id":{"type":"string"},"agentId":{"type":"string"},"kind":{"allOf":[{"$ref":"#/components/schemas/GrantRequestKindTypes"}]},"entries":{"description":"Tool names, hosts, or the MCP servers by name.","type":"array","items":{"type":"string"}},"reason":{"type":"string","description":"The agent's reason, in its own words."},"status":{"allOf":[{"$ref":"#/components/schemas/GrantRequestStatusTypes"}]},"askedBy":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/GrantRequestAskerDto"}]},"createdAt":{"type":"string"},"expiresAt":{"type":"string","description":"After this the request can no longer be answered (24 h)."}},"required":["id","agentId","kind","entries","reason","status","createdAt","expiresAt"]},"DecideGrantRequestDto":{"type":"object","properties":{"decision":{"type":"string","enum":["allow","deny"],"description":"`allow` grants it; `deny` declines it."},"timezone":{"type":"string","maxLength":64,"description":"The decider's IANA zone, for the turn the answer drives.","nullable":true}},"required":["decision"]},"GrantRequestDecidedDto":{"type":"object","properties":{"id":{"type":"string"},"status":{"allOf":[{"$ref":"#/components/schemas/GrantRequestStatusTypes"}]}},"required":["id","status"]},"GrantRequestCountDto":{"type":"object","properties":{"agentId":{"type":"string"},"pending":{"type":"number"}},"required":["agentId","pending"]},"AgentLinkPeerDto":{"type":"object","properties":{"linkId":{"type":"string","description":"The link itself — what a revoke names"},"agentId":{"type":"string","description":"The agent at the other end"},"name":{"type":"string","description":"What it is called"},"description":{"type":"string","nullable":true,"description":"The agent's own one-liner — what a colleague chooses on"},"active":{"type":"boolean","description":"Whether that agent can answer at all right now. `false` means it is switched off or archived, so a question to it is refused rather than answered"},"createdAt":{"format":"date-time","type":"string","description":"When the connection was granted"}},"required":["linkId","agentId","name","active","createdAt"]},"AgentLinkViewDto":{"type":"object","properties":{"agentId":{"type":"string"},"mayAsk":{"description":"Agents this one may put a question to — and therefore reach everything of","type":"array","items":{"$ref":"#/components/schemas/AgentLinkPeerDto"}},"askedBy":{"description":"Agents that may put a question to this one, and reach everything IT can","type":"array","items":{"$ref":"#/components/schemas/AgentLinkPeerDto"}}},"required":["agentId","mayAsk","askedBy"]},"CreateAgentLinkDto":{"type":"object","properties":{"peerAgentId":{"type":"string","description":"The agent that may be asked. It must belong to the same team — an agent of another team answers as though it did not exist"}},"required":["peerAgentId"]},"ArtifactPublicationDto":{"type":"object","properties":{"publicId":{"type":"string","description":"The address itself — 32 hex characters; safe to show and to quote"},"url":{"type":"string","nullable":true,"description":"The absolute address a browser opens the page at. ABSENT on the writes that change a live publication, and when this deployment has lost its serving origin since the address was issued — the row is still shown and still revocable"},"embedOrigins":{"description":"Origins allowed to embed the page in a frame. Empty means nobody may","type":"array","items":{"type":"string"}},"publishedById":{"type":"string","description":"The member who published it"},"createdAt":{"type":"string","description":"When it was published (ISO 8601)"},"lastServedAt":{"type":"string","nullable":true,"description":"When the page was last opened at this address, to the minute — null if never. Read it before revoking: once somebody has opened the page, revoking closes the door but does not un-see it"},"revokedAt":{"type":"string","nullable":true,"description":"When it was revoked (ISO 8601). Null while the address answers"}},"required":["publicId","embedOrigins","publishedById","createdAt"]},"ArtifactDto":{"type":"object","properties":{"id":{"type":"string","description":"The artifact`s id — `artifact-<human-slug>-<crypto-suffix>`"},"name":{"type":"string","description":"What the agent called it. Shown to a person; never a path"},"kind":{"enum":["page","document","image","archive","data"],"type":"string","description":"What it is, and therefore how it is handed over. Only `page` is produced today; the other four are declared so that the day something writes a PDF it is not a new concept"},"bytes":{"type":"number","description":"Total bytes of every file in it"},"fileCount":{"type":"number","description":"How many files it holds"},"publishedById":{"type":"string","nullable":true,"description":"The member who published it, when a person did"},"createdAt":{"type":"string","description":"When it was published (ISO 8601)"},"url":{"type":"string","nullable":true,"description":"A signed, expiring address it opens at. ABSENT when this deployment has nowhere to serve it from — the row is still listed and still deletable, which is the point"},"publication":{"nullable":true,"description":"The PERMANENT public address a person gave this material, when one is live. Null is the ordinary state: most material is read by the team at `url` and never leaves the room","type":"object","allOf":[{"$ref":"#/components/schemas/ArtifactPublicationDto"}]}},"required":["id","name","kind","bytes","fileCount","createdAt"]},"ArtifactListDto":{"type":"object","properties":{"items":{"description":"What this team has produced, newest first","type":"array","items":{"$ref":"#/components/schemas/ArtifactDto"}},"usedBytes":{"type":"number","description":"What the team`s material adds up to, in bytes — like `held`, over EVERYTHING it holds and never narrowed by `kind`"},"held":{"type":"number","description":"How many the team is holding, before any filter by kind"},"maxPerTeam":{"type":"number","description":"The most one team may hold"},"kinds":{"type":"array","items":{"type":"string","enum":["page","document","image","archive","data"]},"description":"Every kind that exists, in the order a filter should offer them"}},"required":["items","usedBytes","held","maxPerTeam","kinds"]},"PublishArtifactDto":{"type":"object","properties":{"embedOrigins":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":253},"description":"Origins allowed to embed the page in a frame — `https://client.example`, at most 10. Omit for none: by default nobody may frame it","nullable":true}}},"UpdateArtifactPublicationDto":{"type":"object","properties":{"embedOrigins":{"type":"array","maxItems":10,"items":{"type":"string","maxLength":253},"description":"The whole list of origins allowed to embed the page, replacing the previous one. Empty means nobody may"}},"required":["embedOrigins"]},"LeadMergeDto":{"type":"object","properties":{"id":{"type":"string","description":"Merge id — what the undo addresses"},"sourceLeadId":{"type":"string","description":"The anonymous person whose conversations were attached. Their row still exists and can be opened"},"targetLeadId":{"type":"string","description":"The recognised person the conversations were attached to"},"conversationCount":{"type":"number","description":"How many conversations moved"},"mergedAt":{"type":"string","description":"When they were attached (ISO 8601)"},"revertedAt":{"type":"string","nullable":true,"description":"When a member of the team put it back, if they did. Null means the conversations are still attached"}},"required":["id","sourceLeadId","targetLeadId","conversationCount","mergedAt"]},"LeadMergeListDto":{"type":"object","properties":{"items":{"description":"The merges, newest first","type":"array","items":{"$ref":"#/components/schemas/LeadMergeDto"}}},"required":["items"]},"IssuedEmbedKeyDto":{"type":"object","properties":{"id":{"type":"string","description":"The key`s id, for revoking it"},"publicId":{"type":"string","description":"The public half of the credential. Safe to show, log and quote in a support ticket — it identifies the key and proves nothing."},"name":{"type":"string","description":"What the member called it"},"createdBy":{"type":"string","description":"The member who issued it"},"createdAt":{"type":"string","description":"When it was issued, ISO-8601"},"lastUsedAt":{"type":"string","description":"When it was last accepted, ISO-8601, to the nearest minute. Absent if never."},"revokedAt":{"type":"string","description":"When it was revoked, ISO-8601. Present means it no longer works."},"expiresAt":{"type":"string","description":"When it stops working on its own, ISO-8601. Absent means never — it works until it is revoked."},"key":{"type":"string","description":"The whole credential, shown ONCE. Store it on your server and send it as the `X-Embed-Key` header. It is not recoverable: nothing here keeps a copy.","example":"emk.0f3a…c19.Zm9vYmFy…"}},"required":["id","publicId","name","createdBy","createdAt","key"]},"CreateEmbedKeyDto":{"type":"object","properties":{"name":{"type":"string","maxLength":80,"description":"What to call this key, so a listing of several is readable and the right one can be revoked. Shown to members of the team only.","example":"shop backend, production"},"expiresAt":{"type":"string","format":"date-time","description":"When this key should stop working on its own, ISO-8601. Omit it and the key works until somebody revokes it. Set it if you can: a revocation needs a person to remember the key exists, and the dangerous key is the one nobody is thinking about. Must be in the future.","example":"2027-01-01T00:00:00.000Z","nullable":true}},"required":["name"]},"EmbedKeyDto":{"type":"object","properties":{"id":{"type":"string","description":"The key`s id, for revoking it"},"publicId":{"type":"string","description":"The public half of the credential. Safe to show, log and quote in a support ticket — it identifies the key and proves nothing."},"name":{"type":"string","description":"What the member called it"},"createdBy":{"type":"string","description":"The member who issued it"},"createdAt":{"type":"string","description":"When it was issued, ISO-8601"},"lastUsedAt":{"type":"string","description":"When it was last accepted, ISO-8601, to the nearest minute. Absent if never."},"revokedAt":{"type":"string","description":"When it was revoked, ISO-8601. Present means it no longer works."},"expiresAt":{"type":"string","description":"When it stops working on its own, ISO-8601. Absent means never — it works until it is revoked."}},"required":["id","publicId","name","createdBy","createdAt"]},"AgentCardInterfaceDto":{"type":"object","properties":{"url":{"type":"string","description":"Where this interface answers","example":"https://a.example/a2a"},"protocolBinding":{"type":"string","description":"The binding spoken at that address","example":"JSONRPC"},"protocolVersion":{"type":"string","description":"The A2A revision that address answers in — Major.Minor, never a patch number","example":"1.0"}},"required":["url","protocolBinding","protocolVersion"]},"AgentCardCapabilitiesDto":{"type":"object","properties":{"streaming":{"type":"boolean","description":"Whether the agent streams a task`s progress. It does not."},"pushNotifications":{"type":"boolean","description":"Whether it can call a webhook back. It cannot."},"extendedAgentCard":{"type":"boolean","description":"Whether a fuller card is served to an authenticated caller. It is not — there is no authenticated caller here, and only one card."}},"required":["streaming","pushNotifications","extendedAgentCard"]},"AgentCardSkillDto":{"type":"object","properties":{"id":{"type":"string","description":"The skill`s stable key within its team"},"name":{"type":"string","description":"What it is called"},"description":{"type":"string","description":"The one line its own frontmatter carries. May be empty."},"tags":{"description":"Its frontmatter tags, when it has any","type":"array","items":{"type":"string"}}},"required":["id","name","description","tags"]},"AgentCardDto":{"type":"object","properties":{"name":{"type":"string","description":"The agent`s own name"},"description":{"type":"string","description":"The agent`s own description. May be empty."},"supportedInterfaces":{"description":"Every way of reaching this agent, preferred first — EMPTY unless the owner has published the agent on A2A. In A2A 1.0 the address and the protocol version live in this list, so an empty list is how a card says «readable, not callable» rather than leaving a reader to guess. A published agent offers the same address twice, once per A2A revision it answers.","example":[],"type":"array","items":{"$ref":"#/components/schemas/AgentCardInterfaceDto"}},"securitySchemes":{"type":"object","additionalProperties":true,"description":"How to authenticate at the addresses above, keyed by a name `securityRequirements` refers to. Absent when there are none. This product issues one kind: an API key in a header.","example":{"apiKey":{"apiKeySecurityScheme":{"location":"header","name":"X-Embed-Key","description":"…"}}}},"securityRequirements":{"description":"Which of those schemes a caller must satisfy. Absent when there are none. 1.0`s name for what 0.3 called `security`.","example":[{"schemes":{"apiKey":{"list":[]}}}],"type":"array","items":{"type":"object"}},"version":{"type":"string","description":"A fingerprint of this card`s contents. It changes when and only when what a reader would see changes, so «has this card moved since I cached it» is one string comparison.","example":"a3f19c02b7d4"},"capabilities":{"$ref":"#/components/schemas/AgentCardCapabilitiesDto"},"defaultInputModes":{"example":["text/plain"],"type":"array","items":{"type":"string"}},"defaultOutputModes":{"example":["text/plain"],"type":"array","items":{"type":"string"}},"skills":{"description":"The skills this agent actually uses","type":"array","items":{"$ref":"#/components/schemas/AgentCardSkillDto"}}},"required":["name","description","supportedInterfaces","version","capabilities","defaultInputModes","defaultOutputModes","skills"]},"AgentCardLinkDto":{"type":"object","properties":{"id":{"type":"string","description":"The link`s id"},"publicId":{"type":"string","description":"The public half of the address. Safe to show, log and quote in a support ticket — it identifies the link and does not open it."},"createdBy":{"type":"string","description":"The member who issued it"},"createdAt":{"type":"string","description":"When it was issued, ISO-8601"},"lastServedAt":{"type":"string","description":"When the card was last read over this link, ISO-8601, to the nearest minute. Absent if nobody has opened it yet."},"revokedAt":{"type":"string","description":"When it was revoked, ISO-8601. Present means it no longer answers."}},"required":["id","publicId","createdBy","createdAt"]},"AgentCardPanelDto":{"type":"object","properties":{"card":{"description":"Exactly what a reader of the link receives","allOf":[{"$ref":"#/components/schemas/AgentCardDto"}]},"link":{"description":"The live link, or absent when this agent has none right now","allOf":[{"$ref":"#/components/schemas/AgentCardLinkDto"}]},"ready":{"type":"boolean","description":"Whether this deployment knows the public address a link would have to carry"},"missing":{"description":"The environment variables it is still missing when it does not","type":"array","items":{"type":"string"}},"findable":{"type":"boolean","description":"Whether this agent`s card also answers at the well-known path — independent of `link`: an agent may have one, both or neither. Off by default."},"findableUrl":{"type":"string","description":"The well-known address, so the screen can show exactly what a stranger would fetch — before it is turned on and after. Absent for the same reason `link`s address can be: this deployment does not know its own public origin yet (see `missing`)."}},"required":["card","ready","missing","findable"]},"IssuedAgentCardLinkDto":{"type":"object","properties":{"id":{"type":"string","description":"The link`s id"},"publicId":{"type":"string","description":"The public half of the address. Safe to show, log and quote in a support ticket — it identifies the link and does not open it."},"createdBy":{"type":"string","description":"The member who issued it"},"createdAt":{"type":"string","description":"When it was issued, ISO-8601"},"lastServedAt":{"type":"string","description":"When the card was last read over this link, ISO-8601, to the nearest minute. Absent if nobody has opened it yet."},"revokedAt":{"type":"string","description":"When it was revoked, ISO-8601. Present means it no longer answers."},"url":{"type":"string","description":"The whole address, shown ONCE. Anybody who has it can read this agent`s card, and nothing else. It is not recoverable: nothing here keeps a copy.","example":"https://api.example.com/agent-cards/acd.0f3a…c19.Zm9vYmFy…"}},"required":["id","publicId","createdBy","createdAt","url"]},"SetAgentCardFindableDto":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Turn the well-known path on or off for this agent. Off is the default, and turning it off stops the well-known path answering — it does not withdraw a copy somebody already made of the card, and it does not touch a token link issued separately."}},"required":["enabled"]},"ChannelAccessDto":{"type":"object","properties":{"hands":{"type":"boolean","description":"Visitors may make the agent run commands in a worker, reach the network and read pages — with the OWNER's rights, inside the owner's cluster, on the owner's bill. Bounded by the agent's own tool grant and allowed addresses; this lifts an extra prohibition on top of them, it does not widen them."},"memory":{"type":"boolean","description":"What visitors say may become the agent's long-term notes, which are part of the system prompt of every later turn — the owner's own conversations included. A persistent prompt-injection channel by construction; that is the trade, not a side effect."},"schedule":{"type":"boolean","description":"Visitors may change when and what the agent does BY ITSELF — a standing job that keeps running after they have left. Raising this one requires `confirm`."},"visibility":{"type":"boolean","description":"Visitors see the agent's reasoning and the tools it reaches for, not only the answer. Discloses how the agent is built, and may disclose fragments of what it read."}},"required":["hands","memory","schedule","visibility"]},"AgentChannelDto":{"type":"object","properties":{"id":{"type":"string","description":"Binding id"},"agentId":{"type":"string","description":"The agent this binding publishes"},"type":{"enum":["bridle","telegram","a2a"],"type":"string","description":"Which transport"},"externalId":{"type":"string","description":"The id the transport routes under — what goes in the embed`s data-agent-id. It is the agent's own id, so a hub log and this row name the same string."},"enabled":{"type":"boolean","description":"Whether the embed is currently answering"},"access":{"description":"AGNT2-231 — what this channel opens to its visitors. Everything false on every binding until an owner deliberately opens something, and a publish or unpublish never changes it.","allOf":[{"$ref":"#/components/schemas/ChannelAccessDto"}]},"createdAt":{"type":"string","description":"When the binding was first opened, ISO-8601"}},"required":["id","agentId","type","externalId","enabled","access","createdAt"]},"BridleDeploymentDto":{"type":"object","properties":{"role":{"enum":["hub","runtime"],"type":"string","description":"Which half of Bridle this api is — `hub` (it serves visitors itself) or `runtime` (it dials out to somebody else`s hub). Decides which variables below are required."},"ready":{"type":"boolean","description":"Whether this deployment is configured to publish agents at all. False means every variable in `missing` has to be set by whoever deploys the api — not by the agent`s owner."},"missing":{"description":"The environment variables that are not set, by name and in the order they matter. Empty when `ready` — and empty for anyone but a platform administrator (AGNT2-568): the names are server configuration that the agent`s owner can neither read nor change.","type":"array","items":{"type":"string"}},"hubUrl":{"type":"string","nullable":true,"description":"What goes in the embed`s data-api-url. Under BRIDLE_ROLE=hub this is this api`s own public address; under `runtime` it is the external hub. Null when BRIDLE_URL is unset."},"scriptUrl":{"type":"string","description":"What goes in the embed`s src — the widget bundle"},"tokenDefaultSeconds":{"type":"number","description":"Default life of a minted token, in seconds"},"tokenMaxSeconds":{"type":"number","description":"The longest life a token may be asked for, in seconds"},"tokenMinSeconds":{"type":"number","description":"The shortest life a token may be asked for, in seconds"},"visitorTurnsPerMinute":{"type":"number","description":"Turns one visitor may take in a minute"},"agentTurnsPerMinute":{"type":"number","description":"Turns one agent may take across all its visitors in a minute"},"handsVisitorTurnsPerMinute":{"type":"number","description":"AGNT2-231 — turns one visitor may take in a minute when this channel has HANDS open. Lower than the number above on purpose: a turn with hands can raise a pod, so the limit that was priced for a conversation is not the limit for a compute service."},"handsAgentTurnsPerMinute":{"type":"number","description":"The same, per agent across all its visitors, when HANDS are open."}},"required":["role","ready","missing","scriptUrl","tokenDefaultSeconds","tokenMaxSeconds","tokenMinSeconds","visitorTurnsPerMinute","agentTurnsPerMinute","handsVisitorTurnsPerMinute","handsAgentTurnsPerMinute"]},"AgentChannelStatusDto":{"type":"object","properties":{"channel":{"nullable":true,"description":"The binding, or null when this agent has never been published here","type":"object","allOf":[{"$ref":"#/components/schemas/AgentChannelDto"}]},"deployment":{"description":"Whether this deployment can publish agents at all, and the limits it enforces","allOf":[{"$ref":"#/components/schemas/BridleDeploymentDto"}]}},"required":["deployment"]},"SetChannelAccessDto":{"type":"object","properties":{"hands":{"type":"boolean","description":"See ChannelAccessDto.hands. Omitted = unchanged.","nullable":true},"memory":{"type":"boolean","description":"See ChannelAccessDto.memory. Omitted = unchanged.","nullable":true},"schedule":{"type":"boolean","description":"See ChannelAccessDto.schedule. Omitted = unchanged.","nullable":true},"visibility":{"type":"boolean","description":"See ChannelAccessDto.visibility. Omitted = unchanged.","nullable":true},"confirm":{"type":"string","description":"The AGENT'S OWN ID, echoed back. Required only to RAISE `schedule`, and only when it is currently off — the one right whose damage outlives the conversation, because a stranger can leave behind a job that keeps waking the agent after they have gone. Lowering a right never needs it. A request that raises `schedule` without it is refused with CHANNEL_ACCESS_NOT_CONFIRMED and a sentence saying what would have been opened.","nullable":true}}},"IdentifyVisitorDto":{"type":"object","properties":{"externalId":{"type":"string","maxLength":320,"description":"Who this person is in YOUR system — a customer id, an account number. This is what makes them the same person when they come back tomorrow, so send the value that is stable, not one that can change. Never their email: two of your customers can share one address by mistake, and leads merged on that cannot be pulled apart afterwards.","example":"customer-4417"},"name":{"type":"string","maxLength":320,"description":"What they are called, shown to the team beside their conversation.","nullable":true},"email":{"type":"string","maxLength":320,"format":"email","description":"Their email, stored and shown to the team. Not used to recognise them — see `externalId`.","nullable":true},"phone":{"type":"string","maxLength":320,"description":"Their phone, stored and shown to the team. Not used to recognise them.","nullable":true},"expiresInSeconds":{"type":"integer","minimum":60,"maximum":86400,"description":"How long the token should live, in seconds. Defaults to 15 minutes, ceiling 24 hours. Values outside the range are clamped rather than refused. Your page re-asks your backend for a fresh one whenever the widget reconnects, so short is fine and is safer.","nullable":true}},"required":["externalId"]},"IdentifiedVisitorTokenDto":{"type":"object","properties":{"token":{"type":"string","description":"The JWT to hand your page. It names this person and this agent, and nothing else."},"expiresAt":{"type":"string","description":"When it stops working, ISO-8601"}},"required":["token","expiresAt"]},"IssueEmbedTokenDto":{"type":"object","properties":{"expiresInSeconds":{"type":"integer","minimum":60,"maximum":86400,"description":"How long the token should live, in seconds. Defaults to 15 minutes. Values outside the range are clamped rather than refused — the ceiling is this product`s policy, and a 400 would only teach callers to send the ceiling.","nullable":true}}},"EmbedTokenDto":{"type":"object","properties":{"token":{"type":"string","description":"The JWT for the embed`s data-token attribute"},"expiresAt":{"type":"string","description":"When it stops working, ISO-8601"},"agentId":{"type":"string","description":"The embed`s data-agent-id"},"hubUrl":{"type":"string","description":"The embed`s data-api-url — the hub, not this api"}},"required":["token","expiresAt","agentId","hubUrl"]},"ChannelVideoUploadDto":{"type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":8192},"name":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","enum":["video/mp4","video/quicktime","video/webm","audio/mpeg","audio/mp3","audio/mp4","audio/x-m4a","audio/m4a","audio/aac","audio/x-aac","audio/wav","audio/x-wav","audio/wave","audio/vnd.wave","audio/ogg","audio/opus","audio/webm","audio/flac","audio/x-flac"]},"size":{"type":"integer","exclusiveMinimum":true,"maximum":209715200,"minimum":0}},"required":["token","name","contentType","size"]},"ChannelVideoTicketDto":{"type":"object","properties":{"token":{"type":"string","minLength":1,"maxLength":8192}},"required":["token"]},"ChannelVideoAttachmentDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"size":{"type":"number"},"durationSec":{"type":"number","nullable":true}},"required":["id","name","size"]},"SetA2aChannelAccessDto":{"type":"object","properties":{"visibility":{"type":"boolean","description":"Whether partners calling over A2A see the agent's reasoning and the tools it reaches for as side remarks on a streamed task — not only the answer. Discloses how the agent is built, and may disclose fragments of what it read. Closed by default. The other three rights (hands, memory, schedule) cannot be opened on an A2A binding."}},"required":["visibility"]},"TelegramChannelDto":{"type":"object","properties":{"username":{"type":"string"},"status":{"type":"string"},"access":{"enum":["all","linked","team"],"type":"string"}},"required":["username","status","access"]},"ConnectTelegramDto":{"type":"object","properties":{"token":{"type":"string","maxLength":200,"pattern":"^\\d+:[A-Za-z0-9_-]{20,}$","description":"BotFather token; write-only."}},"required":["token"]},"SetTelegramAccessDto":{"type":"object","properties":{"access":{"type":"string","enum":["all","linked","team"]}},"required":["access"]},"TelegramInviteDto":{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":["url","expiresAt"]},"TelegramLinkDto":{"type":"object","properties":{"accountId":{"type":"string"},"externalUserId":{"type":"string"}},"required":["accountId","externalUserId"]},"TelegramUpdateDto":{"type":"object","properties":{"update_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"type":"object","properties":{"message_id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"from":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"is_bot":{"type":"boolean","nullable":true},"language_code":{"type":"string","maxLength":32,"nullable":true}},"required":["id"],"nullable":true},"chat":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","maxLength":32}},"required":["id","type"]},"text":{"type":"string","maxLength":16384,"nullable":true},"caption":{"type":"string","maxLength":4096,"nullable":true},"entities":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"offset":{"type":"integer","minimum":0,"maximum":9007199254740991},"length":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","offset","length"]},"nullable":true},"caption_entities":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"offset":{"type":"integer","minimum":0,"maximum":9007199254740991},"length":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","offset","length"]},"nullable":true},"photo":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"file_id":{"type":"string","maxLength":512},"file_size":{"type":"integer","minimum":0,"maximum":9007199254740991,"nullable":true},"mime_type":{"type":"string","maxLength":100,"nullable":true},"file_name":{"type":"string","maxLength":255,"nullable":true}},"required":["file_id"]},"nullable":true},"document":{"type":"object","properties":{"file_id":{"type":"string","maxLength":512},"file_size":{"type":"integer","minimum":0,"maximum":9007199254740991,"nullable":true},"mime_type":{"type":"string","maxLength":100,"nullable":true},"file_name":{"type":"string","maxLength":255,"nullable":true}},"required":["file_id"],"nullable":true}},"required":["message_id","chat"],"nullable":true}},"required":["update_id"]},"StartCallDto":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200,"description":"What to call this recording — shown, and the transcript file’s name"},"source":{"type":"string","enum":["tab","screen","window","microphone"],"description":"Where the sound comes from. `tab` hears the far end and not the room; `microphone` the reverse"},"announced":{"type":"boolean","default":false,"description":"The owner states they told the participants they are being recorded. Gates nothing; it is stamped into the transcript so an omission is visible afterwards","nullable":true}},"required":["title","source"]},"CallDto":{"type":"object","properties":{"id":{"type":"string","description":"Call id"},"agentId":{"type":"string","description":"The agent that listened"},"threadId":{"type":"string","description":"The conversation the summary lands in"},"title":{"type":"string","description":"What the owner called it"},"announced":{"type":"boolean","description":"The owner stated the participants were told"},"source":{"enum":["tab","screen","window","microphone"],"type":"string","description":"Where the sound came from"},"status":{"enum":["recording","finished","abandoned"],"type":"string","description":"Recording, finished, or abandoned"},"startedAt":{"type":"string","description":"When recording began (ISO 8601)"},"endedAt":{"type":"string","nullable":true,"description":"When it ended (ISO 8601), null while it runs"},"summary":{"type":"string","nullable":true,"description":"What the agent made of it, null until it ends"},"transcriptUrl":{"type":"string","nullable":true,"description":"Api-relative, expiring address of the full transcript. Null while the call runs, and null for a call on which nothing was heard"},"message":{"type":"string","nullable":true,"description":"The line this call wrote into the conversation, verbatim. Null while the call runs. Published so the browser can draw the row the api has already persisted, instead of composing a second version of it that would drift"}},"required":["id","agentId","threadId","title","announced","source","status","startedAt"]},"RecordingCallsDto":{"type":"object","properties":{"calls":{"description":"Calls still marked as recording, newest first","type":"array","items":{"$ref":"#/components/schemas/CallDto"}}},"required":["calls"]},"CallSegmentDto":{"type":"object","properties":{"id":{"type":"string","description":"Segment id"},"seq":{"type":"number","description":"The browser’s counter for this call"},"atMs":{"type":"number","description":"Milliseconds from the start of the call"},"channel":{"enum":["owner","room"],"type":"string","description":"Which stream heard it"},"text":{"type":"string","description":"What was heard"}},"required":["id","seq","atMs","channel","text"]},"CallWithSegmentsDto":{"type":"object","properties":{"id":{"type":"string","description":"Call id"},"agentId":{"type":"string","description":"The agent that listened"},"threadId":{"type":"string","description":"The conversation the summary lands in"},"title":{"type":"string","description":"What the owner called it"},"announced":{"type":"boolean","description":"The owner stated the participants were told"},"source":{"enum":["tab","screen","window","microphone"],"type":"string","description":"Where the sound came from"},"status":{"enum":["recording","finished","abandoned"],"type":"string","description":"Recording, finished, or abandoned"},"startedAt":{"type":"string","description":"When recording began (ISO 8601)"},"endedAt":{"type":"string","nullable":true,"description":"When it ended (ISO 8601), null while it runs"},"summary":{"type":"string","nullable":true,"description":"What the agent made of it, null until it ends"},"transcriptUrl":{"type":"string","nullable":true,"description":"Api-relative, expiring address of the full transcript. Null while the call runs, and null for a call on which nothing was heard"},"message":{"type":"string","nullable":true,"description":"The line this call wrote into the conversation, verbatim. Null while the call runs. Published so the browser can draw the row the api has already persisted, instead of composing a second version of it that would drift"},"segments":{"description":"Phrases, oldest first","type":"array","items":{"$ref":"#/components/schemas/CallSegmentDto"}}},"required":["id","agentId","threadId","title","announced","source","status","startedAt","segments"]},"CallSegmentInputDto":{"type":"object","properties":{"seq":{"description":"The browser’s counter for this call, from 0. THE IDEMPOTENCY KEY: re-sending a phrase under the same number rewrites its slot instead of writing it twice","type":"integer","minimum":0,"maximum":9007199254740991},"atMs":{"description":"Milliseconds from the start of the call","type":"integer","minimum":0,"maximum":9007199254740991},"channel":{"type":"string","enum":["owner","room"],"description":"`owner` — the owner’s microphone; `room` — the captured tab, i.e. everybody else"},"text":{"type":"string","maxLength":4000,"description":"What was heard"}},"required":["seq","atMs","channel","text"]},"AppendCallSegmentsDto":{"type":"object","properties":{"segments":{"type":"array","minItems":1,"maxItems":20,"items":{"$ref":"#/components/schemas/CallSegmentInputDto"},"description":"The phrases heard since the last append"}},"required":["segments"]},"CallAppendResultDto":{"type":"object","properties":{"accepted":{"type":"number","description":"Phrases written by this request"},"total":{"type":"number","description":"Phrases this call now holds in total"}},"required":["accepted","total"]},"TriggerKeyDto":{"type":"object","properties":{"secret":{"type":"string","description":"Shown once; issuing again revokes the previous key"}},"required":["secret"]},"TriggerRunDto":{"type":"object","properties":{"runId":{"type":"string"},"status":{"enum":["accepted","running","completed","limited","failed","interrupted"],"type":"string"},"reason":{"type":"string","nullable":true},"createdAt":{"type":"string"}},"required":["runId","status","reason","createdAt"]},"TriggerInputDto":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":8192,"description":"Service event data, not an owner instruction","example":"New clip candidates are available"},"idempotencyKey":{"type":"string","pattern":"^[\\x21-\\x7e]{1,200}$","description":"Stable event identifier; retained until agent deletion","example":"stream-123-candidates-7"}},"required":["message","idempotencyKey"],"additionalProperties":false},"OrganizationTriggerInputDto":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":8192,"description":"Service event data, not an owner instruction","example":"New clip candidates are available"},"idempotencyKey":{"type":"string","pattern":"^[\\x21-\\x7e]{1,200}$","description":"Stable event identifier; retained until agent deletion","example":"stream-123-candidates-7"},"externalUserId":{"type":"string","minLength":1,"maxLength":200},"externalTeamId":{"type":"string","minLength":1,"maxLength":200}},"required":["message","idempotencyKey","externalUserId","externalTeamId"],"additionalProperties":false},"PartnerAgentAccessDto":{"type":"object","properties":{"maxConcurrentTurns":{"type":"number","minimum":1,"maximum":64,"default":4},"agentId":{"type":"string"},"namespace":{"type":"string"},"grantedScopes":{"type":"array","items":{"type":"string"}},"applicationNamespaces":{"type":"array","items":{"type":"string"}}},"required":["maxConcurrentTurns","agentId","namespace","grantedScopes","applicationNamespaces"]},"PartnerAgentAccessInputDto":{"type":"object","properties":{"maxConcurrentTurns":{"type":"integer","minimum":1,"maximum":64,"nullable":true},"applicationNamespaces":{"maxItems":32,"type":"array","items":{"type":"string","pattern":"^(?!agentfy$)[A-Za-z0-9_-]{1,64}$"},"nullable":true},"namespace":{"type":"string","minLength":1,"maxLength":200},"scopes":{"type":"array","minItems":1,"maxItems":6,"items":{"type":"string","enum":["chat:create","chat:read","chat:conversation:read","chat:run","chat:context","chat:event:append"]}}},"required":["namespace","scopes"]},"PartnerMembershipDto":{"type":"object","properties":{"role":{"enum":["owner","admin","member"],"type":"string"},"actorId":{"type":"string"},"teamId":{"type":"string"},"sourceRevision":{"type":"number"},"subjectVersion":{"type":"number"},"membershipVersion":{"type":"number"},"active":{"type":"boolean"},"validUntil":{"type":"string"}},"required":["role","actorId","teamId","sourceRevision","subjectVersion","membershipVersion","active","validUntil"]},"SyncPartnerMembershipDto":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member"]},"sourceRevision":{"type":"integer","minimum":1,"maximum":2147483647},"active":{"type":"boolean"},"validUntil":{"type":"string","format":"date-time"},"kind":{"type":"string","const":"member","nullable":true},"externalUserId":{"type":"string","minLength":1,"maxLength":200},"externalTeamId":{"type":"string","minLength":1,"maxLength":200}},"required":["role","sourceRevision","active","validUntil","externalUserId","externalTeamId"]},"PartnerMcpReferenceDto":{"type":"object","properties":{"serverId":{"type":"string"},"destination":{"type":"string"}},"required":["serverId","destination"]},"PartnerConversationDto":{"type":"object","properties":{"mcp":{"nullable":true,"type":"object","allOf":[{"$ref":"#/components/schemas/PartnerMcpReferenceDto"}]},"conversationId":{"type":"string"},"actorId":{"type":"string"},"teamId":{"type":"string"},"agentId":{"type":"string"},"createdAt":{"type":"string"}},"required":["mcp","conversationId","actorId","teamId","agentId","createdAt"]},"CreateGuestConversationDto":{"type":"object","properties":{"agentId":{"type":"string","minLength":1,"maxLength":200},"allowedMcpTools":{"type":"array","default":[],"maxItems":100,"items":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,128}$"}},"actor":{"type":"object","properties":{"kind":{"type":"string","enum":["guest"]},"externalUserId":{"type":"string","minLength":1,"maxLength":200},"externalTeamId":{"type":"string","minLength":1,"maxLength":200}},"required":["kind","externalUserId","externalTeamId"],"additionalProperties":false}},"required":["agentId","actor"],"additionalProperties":false},"CreatePartnerConversationDto":{"type":"object","properties":{"agentId":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","const":"member","nullable":true},"externalUserId":{"type":"string","minLength":1,"maxLength":200},"externalTeamId":{"type":"string","minLength":1,"maxLength":200}},"required":["agentId","externalUserId","externalTeamId"]},"PartnerConversationListDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PartnerConversationDto"}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"ChatEventDto":{"type":"object","properties":{"v":{"type":"number","enum":[2]},"eventId":{"type":"string"},"sequence":{"type":"number"},"agentId":{"type":"string"},"conversationId":{"type":"string"},"turnId":{"type":"string","nullable":true},"type":{"type":"string"},"createdAt":{"type":"string"},"payload":{"type":"object","additionalProperties":true}},"required":["v","eventId","sequence","agentId","conversationId","turnId","type","createdAt","payload"]},"AppendApplicationEventDto__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"$ref":"#/components/schemas/AppendApplicationEventDto__schema0"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AppendApplicationEventDto__schema0"}}],"nullable":true},"AppendApplicationEventDto":{"type":"object","properties":{"type":{"type":"string","minLength":3,"maxLength":128,"pattern":"^[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)+$"},"schemaVersion":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0},"payload":{"$ref":"#/components/schemas/AppendApplicationEventDto__schema0"},"relatedTurnId":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"nullable":true}},"required":["type","schemaVersion","payload"],"additionalProperties":false},"PartnerConversationEventDto":{"type":"object","properties":{"v":{"type":"number","enum":[2]},"eventId":{"type":"string"},"sequence":{"type":"number"},"agentId":{"type":"string"},"conversationId":{"type":"string"},"turnId":{"type":"string","nullable":true},"type":{"type":"string"},"createdAt":{"type":"string"},"payload":{"type":"object","additionalProperties":true},"id":{"type":"string"},"data":{"type":"object","additionalProperties":true}},"required":["v","eventId","sequence","agentId","conversationId","turnId","type","createdAt","payload","id","data"]},"PartnerConversationEventsDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PartnerConversationEventDto"}},"nextCursor":{"type":"string","nullable":true},"highWatermark":{"type":"number"}},"required":["items","nextCursor","highWatermark"]},"PartnerContextMetadataDto":{"type":"object","properties":{"version":{"type":"number"},"expiresAt":{"type":"string","nullable":true},"active":{"type":"boolean"}},"required":["version","expiresAt","active"]},"PartnerContextVersionDto":{"type":"object","properties":{"version":{"type":"number"}},"required":["version"]},"BindPartnerContextDto":{"type":"object","properties":{"serverId":{"type":"string","minLength":1,"maxLength":200},"destination":{"type":"string","minLength":1,"maxLength":2000},"grant":{"type":"string","minLength":16,"maxLength":4096,"writeOnly":true},"expiresAt":{"type":"string","format":"date-time"},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991},"kind":{"type":"string","enum":["member","guest",null],"nullable":true},"externalUserId":{"type":"string","minLength":1,"maxLength":200},"externalTeamId":{"type":"string","minLength":1,"maxLength":200}},"required":["serverId","destination","grant","expiresAt","expectedVersion","externalUserId","externalTeamId"]},"PartnerUsageModelDto":{"type":"object","properties":{"inputTokens":{"type":"number"},"outputTokens":{"type":"number"},"cacheReadTokens":{"type":"number"},"cacheWriteTokens":{"type":"number","description":"Sum of five-minute and one-hour cache writes"},"costUsd":{"type":"string","example":"0.033510000000","description":"Exact sum of recorded costUsdPico, in USD with twelve decimal places. Never recomputed from current rates."},"model":{"type":"string"}},"required":["inputTokens","outputTokens","cacheReadTokens","cacheWriteTokens","costUsd","model"]},"PartnerUsageKindDto":{"type":"object","properties":{"kind":{"type":"string","example":"llm_tokens"},"costUsd":{"type":"string","example":"0.033510000000"}},"required":["kind","costUsd"]},"PartnerRunUsageDto":{"type":"object","properties":{"inputTokens":{"type":"number"},"outputTokens":{"type":"number"},"cacheReadTokens":{"type":"number"},"cacheWriteTokens":{"type":"number","description":"Sum of five-minute and one-hour cache writes"},"costUsd":{"type":"string","example":"0.033510000000","description":"Exact sum of recorded costUsdPico, in USD with twelve decimal places. Never recomputed from current rates."},"model":{"type":"string","nullable":true,"description":"Last streamed turn model, otherwise last turn token model; null if no turn model was recorded"},"priceSide":{"type":"string","enum":["cost"],"description":"Agentfy provider cost from UsagePrice side=cost; not a partner resale charge"},"models":{"description":"Present when more than one token model was used, including service calls","type":"array","items":{"$ref":"#/components/schemas/PartnerUsageModelDto"}},"kinds":{"description":"Cost by kind, including non-token consumption; sums to costUsd","type":"array","items":{"$ref":"#/components/schemas/PartnerUsageKindDto"}}},"required":["inputTokens","outputTokens","cacheReadTokens","cacheWriteTokens","costUsd","model","priceSide","kinds"]},"TurnToolTimingDto":{"type":"object","properties":{"durationMs":{"type":"number","description":"Execution duration in milliseconds; no tool input/output is recorded"}},"required":["durationMs"]},"TurnTokenUsageDto":{"type":"object","properties":{"inputTokens":{"type":"number"},"outputTokens":{"type":"number"},"cacheReadTokens":{"type":"number"},"cacheWriteTokens":{"type":"number"},"cacheWrite1hTokens":{"type":"number"}},"required":["inputTokens","outputTokens"]},"TurnIterationTimingDto":{"type":"object","properties":{"wallMs":{"type":"number","description":"Full model request span including streamed event delivery; overlaps otherMs, do not add to totals"},"modelMs":{"type":"number"},"firstTokenMs":{"type":"number","nullable":true,"description":"Milliseconds to first nonempty text/thinking delta; null if unavailable"},"toolMs":{"type":"number"},"tools":{"type":"array","items":{"$ref":"#/components/schemas/TurnToolTimingDto"}},"usage":{"$ref":"#/components/schemas/TurnTokenUsageDto"}},"required":["wallMs","modelMs","firstTokenMs","toolMs","tools"]},"TurnTimingDto":{"type":"object","properties":{"queuedMs":{"type":"number","description":"queuedMs: milliseconds; setupMs is a subtotal, not an additional stage"},"setupMs":{"type":"number","description":"setupMs: milliseconds; setupMs is a subtotal, not an additional stage"},"admissionMs":{"type":"number","description":"admissionMs: milliseconds; setupMs is a subtotal, not an additional stage"},"lockMs":{"type":"number","description":"lockMs: milliseconds; setupMs is a subtotal, not an additional stage"},"agentMs":{"type":"number","description":"agentMs: milliseconds; setupMs is a subtotal, not an additional stage"},"promptMs":{"type":"number","description":"promptMs: milliseconds; setupMs is a subtotal, not an additional stage"},"toolSetupMs":{"type":"number","description":"toolSetupMs: milliseconds; setupMs is a subtotal, not an additional stage"},"workerMs":{"type":"number","description":"workerMs: milliseconds; setupMs is a subtotal, not an additional stage"},"classificationMs":{"type":"number","description":"classificationMs: milliseconds; setupMs is a subtotal, not an additional stage"},"modelMs":{"type":"number","description":"modelMs: milliseconds; setupMs is a subtotal, not an additional stage"},"toolMs":{"type":"number","description":"toolMs: milliseconds; setupMs is a subtotal, not an additional stage"},"historyMs":{"type":"number","description":"historyMs: milliseconds; setupMs is a subtotal, not an additional stage"},"otherMs":{"type":"number","description":"otherMs: milliseconds; setupMs is a subtotal, not an additional stage"},"totalMs":{"type":"number","description":"totalMs: milliseconds; setupMs is a subtotal, not an additional stage"},"complete":{"type":"boolean","description":"False while pending; true after measured execution ends"},"iterations":{"type":"array","items":{"$ref":"#/components/schemas/TurnIterationTimingDto"}}},"required":["queuedMs","setupMs","admissionMs","lockMs","agentMs","promptMs","toolSetupMs","workerMs","classificationMs","modelMs","toolMs","historyMs","otherMs","totalMs","complete","iterations"]},"PartnerToolErrorDto":{"type":"object","properties":{"toolCallId":{"type":"string"},"name":{"type":"string"},"errorCode":{"type":"string","enum":["TOOL_FAILED"],"description":"Safe error code; no raw tool arguments or results."}},"required":["toolCallId","name","errorCode"]},"PartnerRunDto":{"type":"object","properties":{"usage":{"nullable":true,"description":"Immutable terminal ledger cost. Null for pending, historical, uncertain or incompletely priced runs. Null is not zero; it does not become priced on a later read.","type":"object","allOf":[{"$ref":"#/components/schemas/PartnerRunUsageDto"}]},"timings":{"nullable":true,"description":"Turn stage durations; null for historical or interrupted unmeasured runs","type":"object","allOf":[{"$ref":"#/components/schemas/TurnTimingDto"}]},"runId":{"type":"string"},"conversationId":{"type":"string"},"turnId":{"type":"string"},"status":{"enum":["accepted","running","limited","completed","failed","cancelled","interrupted"],"type":"string"},"reason":{"type":"string","nullable":true},"toolErrors":{"description":"Step errors, including recovered failures in completed runs. Empty when no tool failed.","type":"array","items":{"$ref":"#/components/schemas/PartnerToolErrorDto"}},"createdAt":{"type":"string"}},"required":["usage","timings","runId","conversationId","turnId","status","reason","toolErrors","createdAt"]},"SubmitPartnerMessageDto":{"type":"object","properties":{"message":{"type":"string","default":"","maxLength":32000},"timezone":{"type":"string","minLength":1,"maxLength":100,"nullable":true},"attachmentIds":{"maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"description":"Ids from the conversation's attachment upload, sent with this message","nullable":true},"kind":{"type":"string","enum":["member","guest",null],"nullable":true},"externalUserId":{"type":"string","minLength":1,"maxLength":200},"externalTeamId":{"type":"string","minLength":1,"maxLength":200}},"required":["externalUserId","externalTeamId"]},"PartnerAttachmentDto":{"type":"object","properties":{"id":{"type":"string","description":"What a message names in `attachmentIds`"},"kind":{"enum":["image","text","document","video","audio"],"type":"string","description":"How the agent reads this attachment"},"mimeType":{"type":"string"},"name":{"type":"string","description":"The file name it was uploaded under"},"size":{"type":"number","description":"Size in bytes"},"durationSec":{"type":"number","nullable":true,"description":"Video duration in seconds"},"createdAt":{"type":"string"}},"required":["id","kind","mimeType","name","size","createdAt"]},"PartnerVideoUploadDto":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest",null],"nullable":true},"externalUserId":{"type":"string","minLength":1,"maxLength":200},"externalTeamId":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","enum":["video/mp4","video/quicktime","video/webm","audio/mpeg","audio/mp3","audio/mp4","audio/x-m4a","audio/m4a","audio/aac","audio/x-aac","audio/wav","audio/x-wav","audio/wave","audio/vnd.wave","audio/ogg","audio/opus","audio/webm","audio/flac","audio/x-flac"]},"size":{"type":"integer","exclusiveMinimum":true,"maximum":209715200,"minimum":0}},"required":["externalUserId","externalTeamId","name","contentType","size"]},"PartnerActorDto":{"type":"object","properties":{"kind":{"type":"string","enum":["member","guest",null],"nullable":true},"externalUserId":{"type":"string","minLength":1,"maxLength":200},"externalTeamId":{"type":"string","minLength":1,"maxLength":200}},"required":["externalUserId","externalTeamId"]},"PartnerHistoryTextPartDto":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"]},"PartnerHistoryToolPartDto":{"type":"object","properties":{"type":{"type":"string","enum":["tool_call"]},"toolCallId":{"type":"string"},"name":{"type":"string"},"status":{"enum":["succeeded","failed","cancelled"],"type":"string"}},"required":["type","toolCallId","name","status"]},"PartnerHistoryMessageDto":{"type":"object","properties":{"id":{"type":"string"},"turnId":{"type":"string","nullable":true},"role":{"type":"string"},"text":{"type":"string"},"createdAt":{"type":"string"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/PartnerAttachmentDto"}},"parts":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/PartnerHistoryTextPartDto"},{"$ref":"#/components/schemas/PartnerHistoryToolPartDto"}]},"description":"Assistant turn parts in journal order. The last text part is the answer when the turn reaches one; interrupted turns may contain only progress text. Omitted for legacy messages without a complete journal. The flattened text field is unchanged. No raw tool arguments or results."}},"required":["id","turnId","role","text","createdAt","attachments"]},"PartnerHistoryDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PartnerHistoryMessageDto"}},"nextCursor":{"type":"string","nullable":true}},"required":["items","nextCursor"]},"PartnerSelfDto":{"type":"object","properties":{"organizationId":{"type":"string"},"organizationName":{"type":"string"},"deployment":{"type":"string"},"apiUrl":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["analytics:read","worker:logs:read","provision:create","provision:read","identity:authorize","identity:manage","chat:membership","chat:create","chat:read","chat:conversation:read","chat:event:append","chat:run","chat:context"]}},"expiresAt":{"type":"string","nullable":true,"format":"date-time"},"policyStatus":{"nullable":true,"enum":["draft","pending_approval","approved","rejected"],"type":"string","description":"Latest policy revision status; null if no policy exists."},"policyUrl":{"type":"string"}},"required":["organizationId","organizationName","deployment","apiUrl","scopes","expiresAt","policyStatus","policyUrl"]},"ProvisioningDto":{"type":"object","properties":{"operationId":{"type":"string"},"agentId":{"type":"string","nullable":true},"configurationVersion":{"type":"number"},"userId":{"type":"string"},"teamId":{"type":"string"},"status":{"enum":["pending","ready","failed","retired"],"type":"string"},"step":{"type":"string"},"reason":{"type":"string","nullable":true},"retryable":{"type":"boolean"},"billingStatus":{"enum":["pending_setup","pending_acceptance"],"type":"string"},"paidWorkEnabled":{"type":"boolean","enum":[false]},"version":{"type":"number"}},"required":["operationId","agentId","configurationVersion","userId","teamId","status","step","reason","retryable","billingStatus","paidWorkEnabled","version"]},"ProvisioningSubjectDto":{"type":"object","properties":{"externalUserId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:@/-]{0,127}$"}},"required":["externalUserId"]},"ProvisioningTeamDto":{"type":"object","properties":{"externalId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:@/-]{0,127}$"},"name":{"type":"string","maxLength":120,"pattern":"\\S"}},"required":["externalId","name"]},"ProvisioningSkillDto":{"type":"object","properties":{"name":{"type":"string","maxLength":64,"pattern":"^[a-z0-9][a-z0-9-]*$"},"description":{"type":"string","maxLength":1024,"pattern":"\\S"},"body":{"type":"string","maxLength":32000,"pattern":"\\S"}},"required":["name","description","body"]},"ProvisioningMcpDto":{"type":"object","properties":{"url":{"type":"string","maxLength":2048},"requiredTools":{"minItems":1,"maxItems":64,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"trustedContext":{"type":"boolean","nullable":true}},"required":["url","requiredTools"]},"ProvisioningWorkerDto":{"type":"object","properties":{"tools":{"minItems":1,"maxItems":16,"type":"array","items":{"type":"string"}},"egress":{"maxItems":64,"type":"array","items":{"type":"string"},"description":"Worker destinations: exact host, *.host or internet:unrestricted. Requires tools.","nullable":true}},"required":["tools"]},"ProvisioningInlineProfileDto":{"type":"object","properties":{"modelId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$","description":"Defaults to the first allowed model in the approved policy","nullable":true},"name":{"type":"string","maxLength":120,"pattern":"\\S"},"instructions":{"type":"string","maxLength":16000,"pattern":"\\S"},"skill":{"$ref":"#/components/schemas/ProvisioningSkillDto"},"mcp":{"allOf":[{"$ref":"#/components/schemas/ProvisioningMcpDto"}],"nullable":true},"worker":{"allOf":[{"$ref":"#/components/schemas/ProvisioningWorkerDto"}],"nullable":true}},"required":["name","instructions","skill"]},"ProvisioningAgentDto":{"type":"object","properties":{"profile":{"$ref":"#/components/schemas/ProvisioningInlineProfileDto"},"externalId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:@/-]{0,127}$"}},"required":["profile","externalId"]},"ProvisioningPayerDto":{"type":"object","properties":{"mode":{"type":"string","enum":["organization","team"]},"consentId":{"type":"string","maxLength":128,"description":"Reserved; supplied consent is explicitly rejected until activation is implemented.","nullable":true}},"required":["mode"]},"CreateProvisioningDto":{"type":"object","properties":{"subject":{"$ref":"#/components/schemas/ProvisioningSubjectDto"},"team":{"$ref":"#/components/schemas/ProvisioningTeamDto"},"agent":{"$ref":"#/components/schemas/ProvisioningAgentDto"},"payer":{"allOf":[{"$ref":"#/components/schemas/ProvisioningPayerDto"}],"nullable":true}},"required":["subject","team","agent"]},"AddProvisioningAgentDto":{"type":"object","properties":{"subject":{"$ref":"#/components/schemas/ProvisioningSubjectDto"},"agent":{"$ref":"#/components/schemas/ProvisioningAgentDto"}},"required":["subject","agent"]},"UpdateProvisioningProfileDto":{"type":"object","properties":{"profile":{"$ref":"#/components/schemas/ProvisioningInlineProfileDto"},"expectedVersion":{"type":"integer","minimum":1,"maximum":2147483646,"description":"Expected operation.version, not configurationVersion"}},"required":["profile","expectedVersion"]},"ProvisioningMcpCredentialDto":{"type":"object","properties":{"credential":{"type":"string","minLength":12,"maxLength":4096,"pattern":"^[A-Za-z0-9._~+/-]+=*$","writeOnly":true,"description":"Per-agent static bearer credential, without the Bearer prefix"}},"required":["credential"]},"ConfigureProvisioningDto":{"type":"object","properties":{"mcp":{"$ref":"#/components/schemas/ProvisioningMcpCredentialDto"},"expectedVersion":{"type":"integer","minimum":1,"maximum":2147483646,"description":"Expected operation.version, not configurationVersion"}},"required":["mcp","expectedVersion"]},"RetryProvisioningDto":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":1,"maximum":2147483646,"description":"Expected operation.version, not configurationVersion"}},"required":["expectedVersion"]},"ProvisioningProfileRevisionDto":{"type":"object","properties":{"revision":{"type":"number"},"operationVersion":{"type":"number"},"createdAt":{"type":"string","format":"date-time"},"credentialId":{"type":"string"},"credentialVersion":{"type":"number","nullable":true},"profileSnapshot":{"type":"object","additionalProperties":true}},"required":["revision","operationVersion","createdAt","credentialId","credentialVersion","profileSnapshot"]},"ProvisioningAuditEntryDto":{"type":"object","properties":{"profileRevisions":{"type":"array","items":{"$ref":"#/components/schemas/ProvisioningProfileRevisionDto"}},"operationId":{"type":"string"},"externalId":{"type":"string"},"teamId":{"type":"string"},"subject":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"profileSnapshot":{"type":"object","additionalProperties":true,"description":"Current accepted profile envelope, including legacy snapshot metadata"}},"required":["profileRevisions","operationId","externalId","teamId","subject","status","createdAt","profileSnapshot"]},"ProvisioningAuditPageDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ProvisioningAuditEntryDto"}},"hasMore":{"type":"boolean"}},"required":["items","hasMore"]},"OrganizationPolicyDto":{"type":"object","properties":{"mcpHostsRestricted":{"type":"boolean","description":"Restrict MCP to mcpHosts. Omitted legacy requests remain restricted."},"allowedModels":{"maxItems":256,"items":{"type":"string","maxLength":2048},"type":"array"},"mcpHosts":{"maxItems":256,"items":{"type":"string","maxLength":2048},"type":"array"},"workerTools":{"maxItems":256,"items":{"type":"string","maxLength":2048},"type":"array"},"workerEgress":{"maxItems":256,"items":{"type":"string","maxLength":2048},"type":"array"},"trustedContextAllowed":{"type":"boolean"},"maxTeams":{"type":"number","minimum":1,"maximum":1000000},"id":{"type":"string"},"organizationId":{"type":"string"},"version":{"type":"number"},"status":{"enum":["draft","pending_approval","approved","rejected"],"type":"string"},"isCurrent":{"type":"boolean"},"approvedBy":{"type":"string","nullable":true},"approvedAt":{"type":"string","nullable":true,"format":"date-time"},"rejectionReason":{"type":"string","nullable":true},"requestComment":{"type":"string","nullable":true},"fingerprint":{"type":"string"}},"required":["allowedModels","mcpHosts","workerTools","workerEgress","trustedContextAllowed","maxTeams","id","organizationId","version","status","isCurrent","approvedBy","approvedAt","rejectionReason","fingerprint"]},"PolicyDiffDto":{"type":"object","properties":{"field":{"type":"string"},"before":{"type":"string"},"after":{"type":"string"}},"required":["field","before","after"]},"OrganizationPolicyViewDto":{"type":"object","properties":{"agentCount":{"type":"number","description":"Allocated agent slots; same count used by provisioning admission"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationPolicyDto"}},"diff":{"type":"array","items":{"$ref":"#/components/schemas/PolicyDiffDto"}},"reviewRequired":{"description":"Fields of the latest revision that need platform review before approval; empty means saving approves it automatically","type":"array","items":{"type":"string"}},"workerTools":{"type":"array","items":{"type":"string"}}},"required":["agentCount","versions","diff","reviewRequired","workerTools"]},"SaveOrganizationPolicyDto":{"type":"object","properties":{"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Latest revision number, or zero when creating the first policy"},"mcpHostsRestricted":{"description":"Restrict MCP to mcpHosts. Omitted legacy requests remain restricted.","type":"boolean"},"allowedModels":{"maxItems":256,"type":"array","items":{"type":"string","maxLength":2048}},"mcpHosts":{"maxItems":256,"type":"array","items":{"type":"string","maxLength":2048}},"workerTools":{"maxItems":256,"type":"array","items":{"type":"string","maxLength":2048}},"workerEgress":{"maxItems":256,"type":"array","items":{"type":"string","maxLength":2048}},"trustedContextAllowed":{"type":"boolean"},"maxTeams":{"type":"integer","minimum":1,"maximum":1000000}},"required":["expectedVersion","allowedModels","mcpHosts","workerTools","workerEgress","trustedContextAllowed","maxTeams"]},"OrganizationPolicyPreviewDto":{"type":"object","properties":{"reviewRequired":{"description":"Unsaved fields requiring platform review; advisory, rechecked on save.","type":"array","items":{"type":"string"}}},"required":["reviewRequired"]},"RequestOrganizationLimitDto":{"type":"object","properties":{"maxTeams":{"type":"integer","minimum":1,"maximum":1000000},"expectedVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"comment":{"type":"string","maxLength":2000}},"required":["maxTeams","expectedVersion"]},"PolicyTransitionDto":{"type":"object","properties":{"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"fingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["version","fingerprint"]},"RejectOrganizationPolicyDto":{"type":"object","properties":{"reason":{"type":"string","maxLength":2000,"pattern":"\\S"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"fingerprint":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["reason","version","fingerprint"]},"OrganizationLiveItemDto":{"type":"object","properties":{"id":{"type":"string"},"agentId":{"type":"string"},"name":{"type":"string"},"teamId":{"type":"string"},"teamName":{"type":"string"},"startedAt":{"type":"string","nullable":true},"status":{"type":"string"}},"required":["id","agentId","name","teamId","teamName","startedAt","status"]},"OrganizationLiveDto":{"type":"object","properties":{"updatedAt":{"type":"string"},"totalAgents":{"type":"number"},"agentsAvailable":{"type":"boolean","description":"False when the shared turn lock could not be read; do not display zero."},"startingWorkers":{"type":"number"},"runningWorkers":{"type":"number"},"agents":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationLiveItemDto"}},"workers":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationLiveItemDto"}}},"required":["updatedAt","totalAgents","agentsAvailable","startingWorkers","runningWorkers","agents","workers"]},"OrganizationAnalyticsMetricDto":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"cacheRead":{"type":"number"},"cacheWrite":{"type":"number"},"costUsdPico":{"type":"string"},"unpricedEvents":{"type":"number"},"events":{"type":"number"}},"required":["input","output","cacheRead","cacheWrite","costUsdPico","unpricedEvents","events"]},"OrganizationAnalyticsRowDto":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"cacheRead":{"type":"number"},"cacheWrite":{"type":"number"},"costUsdPico":{"type":"string"},"unpricedEvents":{"type":"number"},"events":{"type":"number"},"key":{"type":"string"},"name":{"type":"string"}},"required":["input","output","cacheRead","cacheWrite","costUsdPico","unpricedEvents","events","key","name"]},"OrganizationYearDto":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"totals":{"$ref":"#/components/schemas/OrganizationAnalyticsMetricDto"},"byDay":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationAnalyticsRowDto"}}},"required":["from","to","totals","byDay"]},"OrganizationAnalyticsDto":{"type":"object","properties":{"priceSide":{"type":"string","default":"cost","enum":["cost"],"description":"Vendor cost, not customer charges."},"unpricedEventsExcluded":{"type":"object","default":true,"description":"Unpriced events are excluded from costUsdPico, not zero-priced."},"from":{"type":"string"},"to":{"type":"string"},"period":{"enum":["7d","30d","month"],"type":"string"},"teams":{"type":"number"},"teamsCreated":{"type":"number"},"agents":{"type":"number"},"agentsReady":{"type":"number"},"agentsPending":{"type":"number"},"agentCount":{"type":"number"},"maxTeams":{"type":"number","nullable":true},"members":{"type":"number"},"activeKeys":{"type":"number"},"monthlyLimitUsdCents":{"type":"number"},"monthCostUsdPico":{"type":"string"},"monthUnpricedEvents":{"type":"number"},"conversations":{"type":"number"},"turns":{"type":"number"},"runEvents":{"type":"number"},"provisioningReady":{"type":"number"},"provisioningFailed":{"type":"number"},"totals":{"$ref":"#/components/schemas/OrganizationAnalyticsMetricDto"},"byDay":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationAnalyticsRowDto"}},"byModel":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationAnalyticsRowDto"}},"byTeam":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationAnalyticsRowDto"}},"byAgent":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationAnalyticsRowDto"}}},"required":["priceSide","unpricedEventsExcluded","from","to","period","teams","teamsCreated","agents","agentsReady","agentsPending","agentCount","maxTeams","members","activeKeys","monthlyLimitUsdCents","monthCostUsdPico","monthUnpricedEvents","conversations","turns","runEvents","provisioningReady","provisioningFailed","totals","byDay","byModel","byTeam","byAgent"]},"ProductLimitsDto":{"type":"object","properties":{"teamTurnsPerMinute":{"type":"number","example":120,"description":"Turns the whole team may start in one minute."},"teamTokensPerPeriod":{"type":"number","example":100000000,"description":"Model tokens the team may spend in a period."}},"required":["teamTurnsPerMinute","teamTokensPerPeriod"]},"ProductOfferDto":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string","description":"Stable handle used when starting a subscription."},"name":{"type":"string"},"description":{"type":"string"},"amount":{"type":"string","description":"The exact amount, as a decimal string.","example":"29.00"},"contactOnly":{"type":"boolean","description":"Contact support to agree a price; online checkout is disabled."},"currency":{"type":"string","example":"USD"},"interval":{"enum":["month","year"],"type":"string"},"planId":{"type":"string","description":"The entitlement a subscribed team gets (`Team.planId`)."},"limits":{"$ref":"#/components/schemas/ProductLimitsDto"},"maxLlmTier":{"enum":["simple","smart","genius"],"type":"string","description":"The highest model level a team on this plan may reach."}},"required":["id","key","name","description","amount","contactOnly","currency","interval","planId","limits","maxLlmTier"]},"StartSubscriptionDto":{"type":"object","properties":{"teamId":{"type":"string","maxLength":120,"description":"The team that will be billed."},"productKey":{"type":"string","maxLength":60,"description":"Which plan, by its catalogue key.","example":"pro"}},"required":["teamId","productKey"]},"StartedSubscriptionDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"productId":{"type":"string"},"status":{"enum":["pending","active","suspended","cancelled","expired"],"type":"string"},"currentPeriodEnd":{"format":"date-time","type":"string","nullable":true,"description":"End of the period already paid for, as the provider computes it."},"activatedAt":{"format":"date-time","type":"string","nullable":true},"cancelledAt":{"format":"date-time","type":"string","nullable":true},"approvalUrl":{"type":"string","description":"Where the payer must be sent to approve. Provider-issued, single-use and short-lived."}},"required":["id","teamId","productId","status","currentPeriodEnd","activatedAt","cancelledAt","approvalUrl"]},"CancelSubscriptionDto":{"type":"object","properties":{"teamId":{"type":"string","maxLength":120,"description":"The team the subscription belongs to."},"reason":{"type":"string","maxLength":120,"description":"Shown to the payer by the provider in its own cancellation notice.","nullable":true}},"required":["teamId"]},"SubscriptionDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"productId":{"type":"string"},"status":{"enum":["pending","active","suspended","cancelled","expired"],"type":"string"},"currentPeriodEnd":{"format":"date-time","type":"string","nullable":true,"description":"End of the period already paid for, as the provider computes it."},"activatedAt":{"format":"date-time","type":"string","nullable":true},"cancelledAt":{"format":"date-time","type":"string","nullable":true}},"required":["id","teamId","productId","status","currentPeriodEnd","activatedAt","cancelledAt"]},"UsageTotalDto":{"type":"object","properties":{"kind":{"type":"string","example":"llm_tokens","description":"What was consumed."},"unit":{"type":"string","example":"input_tokens","description":"The unit it is counted in. One kind has several, priced apart."},"provider":{"type":"string","example":"anthropic"},"model":{"type":"string","example":"claude-haiku-4-5-20251001"},"quantity":{"type":"number","example":128400,"description":"How many of `unit`."},"events":{"type":"number","example":62,"description":"How many ledger lines this came from."},"costUsd":{"type":"string","example":"0.038421000000","description":"What this line cost US in US dollars — what the vendor charges us, never what a team would be charged. An exact decimal STRING with twelve places, because money is not a float and the underlying grain is 10^-12 of a dollar. Round it for the screen, once, at the end."},"unpricedEvents":{"type":"number","example":0,"description":"How many of `events` had no rate declared for their provider, model, kind and unit, and so are NOT in `costUsd`. Not an error — a unit nobody has priced yet is honestly unpriced — but it is what stops the cost being read as complete."}},"required":["kind","unit","quantity","events","costUsd","unpricedEvents"]},"UsageSliceDto":{"type":"object","properties":{"key":{"type":"string","example":"agent-3f9c…","description":"The agent id, or the lead id, depending on which list this is."},"totals":{"type":"array","items":{"$ref":"#/components/schemas/UsageTotalDto"}},"costUsd":{"type":"string","example":"1.284300000000","description":"Everything in `totals`, in dollars — what ranks this row against its peers."}},"required":["key","totals","costUsd"]},"UsageMeterDto":{"type":"object","properties":{"pending":{"type":"number","example":0,"description":"Ledger lines accepted but not yet written. Non-zero only for the instant a turn has just finished; a number that stays up means the ledger is refusing writes."},"unattributed":{"type":"number","example":0,"description":"Spend this product made and could not attribute to anybody. Must be zero — anything else is consumption nobody can be billed for."},"unpriced":{"type":"number","example":0,"description":"Ledger lines written since boot with no rate to price them by. Zero once every provider and model in use has a rate; non-zero names work for an operator, not a bug."}},"required":["pending","unattributed","unpriced"]},"UsageSummaryDto":{"type":"object","properties":{"teamId":{"type":"string","example":"team-3f9c…"},"from":{"format":"date-time","type":"string","example":"2026-08-01T00:00:00.000Z"},"to":{"format":"date-time","type":"string","example":"2026-09-01T00:00:00.000Z"},"totals":{"description":"The team's spend, by kind and unit.","type":"array","items":{"$ref":"#/components/schemas/UsageTotalDto"}},"byAgent":{"description":"Per agent — every agent that spent.","type":"array","items":{"$ref":"#/components/schemas/UsageSliceDto"}},"byLead":{"description":"Per visitor, dearest first, capped at 50.","type":"array","items":{"$ref":"#/components/schemas/UsageSliceDto"}},"totalCostUsd":{"type":"string","example":"4.912800000000","description":"The whole period in US dollars — our cost, every kind and unit added together. An exact decimal string; see `UsageTotalDto.costUsd`."},"unpricedEvents":{"type":"number","example":0,"description":"Ledger lines in this period that no rate covered, and so are not in `totalCostUsd`."},"meter":{"$ref":"#/components/schemas/UsageMeterDto"}},"required":["teamId","from","to","totals","byAgent","byLead","totalCostUsd","unpricedEvents","meter"]},"QuotaLimitsDto":{"type":"object","properties":{"teamTurnsPerMinute":{"type":"number","example":20,"description":"Turns the whole team may start in one minute, across all its agents."},"teamTokensPerPeriod":{"type":"number","example":2000000,"description":"Model tokens the team may spend in the period — every direction added up."}},"required":["teamTurnsPerMinute","teamTokensPerPeriod"]},"QuotaStateDto":{"type":"object","properties":{"organizationPaid":{"type":"boolean","description":"Usage paid by the organization; no team tariff ceilings."},"teamId":{"type":"string","example":"team-3f9c…"},"planId":{"type":"string","nullable":true,"example":null,"description":"The team's plan. Null for a team that has never subscribed."},"planKnown":{"type":"boolean","example":true,"description":"False when the plan names a tier this build has no limits for. The team is being held to the FREE ceiling and somebody has to add the tier — see planLimit.ts."},"from":{"type":"string","example":"2026-08-01T00:00:00.000Z","description":"Period start, inclusive."},"to":{"type":"string","example":"2026-09-01T00:00:00.000Z","description":"Period end, exclusive."},"limits":{"nullable":true,"description":"Null for organization-paid usage: no team tariff ceilings.","type":"object","allOf":[{"$ref":"#/components/schemas/QuotaLimitsDto"}]},"tokensUsed":{"type":"number","example":412880,"description":"Model tokens consumed in the period."},"tokensRemaining":{"type":"number","nullable":true,"example":1587120,"description":"What is left. Null without a team ceiling."},"exhausted":{"type":"boolean","example":false,"description":"True once the period is spent — every turn of this team is refused until it turns."}},"required":["organizationPaid","teamId","planId","planKnown","from","to","limits","tokensUsed","tokensRemaining","exhausted"]},"PaymentDto":{"type":"object","properties":{"id":{"type":"string"},"invoiceId":{"type":"string"},"subscriptionId":{"type":"string"},"paymentMethodId":{"type":"string","nullable":true,"description":"The instrument charged, when the provider named one."},"amountUsd":{"type":"string","example":"29.000000000000","description":"What the PROVIDER says moved, in US dollars. An exact decimal string with twelve places — money is not a float. See `Invoice.amountUsd` for what WE say this was for, which is not always the same number."},"currency":{"type":"string"},"status":{"enum":["succeeded","failed"],"type":"string"},"capturedAt":{"format":"date-time","type":"string"}},"required":["id","invoiceId","subscriptionId","paymentMethodId","amountUsd","currency","status","capturedAt"]},"PaymentDiscrepancyDto":{"type":"object","properties":{"kind":{"enum":["missing_locally","missing_at_provider"],"type":"string","description":"missing_locally: the provider says this moved and this api has no row for it. missing_at_provider: this api holds a succeeded payment the provider does not confirm."},"subscriptionId":{"type":"string"},"providerPaymentId":{"type":"string","description":"The provider's own id for the movement of money."},"amountUsd":{"type":"string","example":"29.000000000000"},"currency":{"type":"string"},"occurredAt":{"format":"date-time","type":"string"}},"required":["kind","subscriptionId","providerPaymentId","amountUsd","currency","occurredAt"]},"InvoiceDto":{"type":"object","properties":{"id":{"type":"string"},"subscriptionId":{"type":"string"},"periodStart":{"format":"date-time","type":"string"},"periodEnd":{"format":"date-time","type":"string"},"description":{"type":"string","description":"What a human reads to know what this was for."},"amountUsd":{"type":"string","example":"29.000000000000","description":"What WE say was owed for this period, in US dollars. An exact decimal string with twelve places — money is not a float. See `Payment.amountUsd` for what the provider says actually moved, which is not always the same number."},"currency":{"type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","subscriptionId","periodStart","periodEnd","description","amountUsd","currency","createdAt"]}}}}