openapi: 3.0.3
info:
    title: Gram API Description
    description: Gram is the tools platform for AI agents
    version: 0.0.1
servers:
    - url: https://app.getgram.ai
paths:
    /admin/auth.callback:
        get:
            tags:
                - admin
            summary: callback admin
            operationId: admin#callback
            parameters:
                - name: code
                  in: query
                  description: The authorization code returned by the provider on success
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: The authorization code returned by the provider on success
                - name: state
                  in: query
                  description: The state parameter returned, which should match the one generated in the login step
                  allowEmptyValue: true
                  required: true
                  schema:
                    type: string
                    description: The state parameter returned, which should match the one generated in the login step
                - name: error
                  in: query
                  description: OAuth error code returned by the provider (e.g. login_required for prompt=none failures)
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: OAuth error code returned by the provider (e.g. login_required for prompt=none failures)
                - name: error_description
                  in: query
                  description: Human-readable OAuth error description
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: Human-readable OAuth error description
                - name: gram_admin_login_state
                  in: cookie
                  description: The state cookie value for CSRF sanity checking against the state parameter
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: The state cookie value for CSRF sanity checking against the state parameter
            responses:
                "307":
                    description: Temporary Redirect response.
                    headers:
                        Location:
                            description: The URL to redirect the client to after processing the callback
                            schema:
                                type: string
                                description: The URL to redirect the client to after processing the callback
                        Set-Cookie:
                            description: Admin session cookie
                            schema:
                                type: string
                                description: Admin session cookie
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
    /admin/auth.login:
        get:
            tags:
                - admin
            summary: login admin
            operationId: admin#login
            parameters:
                - name: return_to
                  in: query
                  description: Optional URL to return the user to after login. Relative paths and absolute URLs whose origin is in the admin allowed-origins list are accepted.
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: Optional URL to return the user to after login. Relative paths and absolute URLs whose origin is in the admin allowed-origins list are accepted.
                - name: prompt
                  in: query
                  description: Optional OAuth prompt parameter forwarded to the provider. Pass 'none' to attempt silent re-authentication.
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: Optional OAuth prompt parameter forwarded to the provider. Pass 'none' to attempt silent re-authentication.
            responses:
                "307":
                    description: Temporary Redirect response.
                    headers:
                        Location:
                            description: The URL to redirect the user to for Google authentication
                            schema:
                                type: string
                                description: The URL to redirect the user to for Google authentication
                        Set-Cookie:
                            description: CSRF state cookie for sanity-checking the callback
                            schema:
                                type: string
                                description: CSRF state cookie for sanity-checking the callback
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
    /admin/auth.logout:
        post:
            tags:
                - admin
            summary: logout admin
            operationId: admin#logout
            parameters:
                - name: gram_admin
                  in: cookie
                  description: The session cookie value to clear for logging out
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: The session cookie value to clear for logging out
            responses:
                "204":
                    description: No Content response.
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
    /admin/organization.create:
        post:
            tags:
                - admin
            summary: createOrganization admin
            description: 'Creates an organization in WorkOS and in Gram, so an operator does not have to leave the admin app for the WorkOS dashboard. The organization starts with no members, is not whitelisted, and gets no trial. Idempotent against the WorkOS organization webhook: the Gram ID is derived from the WorkOS ID, so both writers converge on one row.'
            operationId: adminCreateOrganization
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateOrganizationRequestBody'
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AdminOrganization'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - admin_auth_header_Authorization: []
    /admin/organization.disable:
        post:
            tags:
                - admin
            summary: disableOrganization admin
            description: 'Disables an organization, recording the moment of the action in disabled_at. Idempotent: disabling an already-disabled organization keeps the original timestamp.'
            operationId: adminDisableOrganization
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/DisableOrganizationRequestBody'
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AdminOrganization'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - admin_auth_header_Authorization: []
    /admin/organization.enable:
        post:
            tags:
                - admin
            summary: enableOrganization admin
            description: 'Re-enables a disabled organization by clearing disabled_at. Idempotent: an organization that is already active is unaffected.'
            operationId: adminEnableOrganization
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/EnableOrganizationRequestBody'
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AdminOrganization'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - admin_auth_header_Authorization: []
    /admin/organization.get:
        get:
            tags:
                - admin
            summary: getOrganization admin
            description: Returns full admin details for a single organization by id or slug.
            operationId: adminGetOrganization
            parameters:
                - name: id_or_slug
                  in: query
                  description: Organization ID or slug.
                  allowEmptyValue: true
                  required: true
                  schema:
                    type: string
                    description: Organization ID or slug.
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AdminOrganization'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - admin_auth_header_Authorization: []
    /admin/organization.members:
        get:
            tags:
                - admin
            summary: listOrganizationMembers admin
            description: Lists members of an organization (admin view, no auth scoping).
            operationId: adminListOrganizationMembers
            parameters:
                - name: organization_id
                  in: query
                  description: Organization ID.
                  allowEmptyValue: true
                  required: true
                  schema:
                    type: string
                    description: Organization ID.
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AdminListOrganizationMembersResult'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - admin_auth_header_Authorization: []
    /admin/organization.projects:
        get:
            tags:
                - admin
            summary: listOrganizationProjects admin
            description: Lists projects belonging to an organization (admin view, no auth scoping).
            operationId: adminListOrganizationProjects
            parameters:
                - name: organization_id
                  in: query
                  description: Organization ID.
                  allowEmptyValue: true
                  required: true
                  schema:
                    type: string
                    description: Organization ID.
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AdminListOrganizationProjectsResult'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - admin_auth_header_Authorization: []
    /admin/organization.update:
        post:
            tags:
                - admin
            summary: updateOrganization admin
            description: Updates admin-managed fields on an organization. At least one of account_type or whitelisted must be supplied.
            operationId: adminUpdateOrganization
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateOrganizationRequestBody'
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AdminOrganization'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - admin_auth_header_Authorization: []
    /admin/organizations.bulkUpdateAccountType:
        post:
            tags:
                - admin
            summary: bulkUpdateAccountType admin
            description: Sets one account type on many organizations in a single statement. An ID that matches no organization is reported back rather than failing the batch, so a stale ID costs the operator that row and not the whole call.
            operationId: adminBulkUpdateAccountType
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/BulkUpdateAccountTypeRequestBody'
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AdminBulkUpdateAccountTypeResult'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - admin_auth_header_Authorization: []
    /admin/organizations.list:
        get:
            description: Lists organizations for admin operations with optional search and filters.
            operationId: adminListOrganizations
            parameters:
                - allowEmptyValue: true
                  description: Search term, trimmed of surrounding whitespace. Matches name and slug as a case-insensitive substring, with % and _ taken literally, and matches organization id and WorkOS id exactly, ignoring case. An id match also returns an organization that disabled_states or include_disabled would otherwise hide; it still respects account_type, account_types, trial_states and cursor.
                  in: query
                  name: q
                  schema:
                    description: Search term, trimmed of surrounding whitespace. Matches name and slug as a case-insensitive substring, with % and _ taken literally, and matches organization id and WorkOS id exactly, ignoring case. An id match also returns an organization that disabled_states or include_disabled would otherwise hide; it still respects account_type, account_types, trial_states and cursor.
                    type: string
                - allowEmptyValue: true
                  description: Filter by a single gram_account_type (e.g. free, pro, payg, enterprise). Superseded by account_types, which it joins as one more member of the same set.
                  in: query
                  name: account_type
                  schema:
                    description: Filter by a single gram_account_type (e.g. free, pro, payg, enterprise). Superseded by account_types, which it joins as one more member of the same set.
                    type: string
                - allowEmptyValue: true
                  description: Match any of these gram_account_type values. Empty matches every account type. A value no organization carries matches nothing rather than failing the request.
                  in: query
                  name: account_types
                  schema:
                    description: Match any of these gram_account_type values. Empty matches every account type. A value no organization carries matches nothing rather than failing the request.
                    items:
                        type: string
                    type: array
                - allowEmptyValue: true
                  description: Match any of running, ending_soon, expired, demoted, converted or none. Empty matches every trial state. An unrecognised value matches nothing rather than failing the request.
                  in: query
                  name: trial_states
                  schema:
                    description: Match any of running, ending_soon, expired, demoted, converted or none. Empty matches every trial state. An unrecognised value matches nothing rather than failing the request.
                    items:
                        type: string
                    type: array
                - allowEmptyValue: true
                  description: Match any of active or disabled. Empty falls back to include_disabled. An unrecognised value matches nothing rather than failing the request.
                  in: query
                  name: disabled_states
                  schema:
                    description: Match any of active or disabled. Empty falls back to include_disabled. An unrecognised value matches nothing rather than failing the request.
                    items:
                        type: string
                    type: array
                - allowEmptyValue: true
                  description: Include organizations with disabled_at set. Defaults to false. Superseded by disabled_states, which overrides it outright when supplied.
                  in: query
                  name: include_disabled
                  schema:
                    description: Include organizations with disabled_at set. Defaults to false. Superseded by disabled_states, which overrides it outright when supplied.
                    type: boolean
                - allowEmptyValue: true
                  description: 'Pagination cursor: id of the last item from the previous page. Ignored when sort or page is supplied.'
                  in: query
                  name: cursor
                  schema:
                    description: 'Pagination cursor: id of the last item from the previous page. Ignored when sort or page is supplied.'
                    type: string
                - allowEmptyValue: true
                  description: Page size (default 50, max 100).
                  in: query
                  name: limit
                  schema:
                    description: Page size (default 50, max 100).
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: 'Column to sort by: name, slug, account_type, member_count, created_at, disabled_at or trial_ends_at. Any other value sorts by id. Supplying it selects offset paging.'
                  in: query
                  name: sort
                  schema:
                    description: 'Column to sort by: name, slug, account_type, member_count, created_at, disabled_at or trial_ends_at. Any other value sorts by id. Supplying it selects offset paging.'
                    type: string
                - allowEmptyValue: true
                  description: 'Sort direction, asc or desc, applied to the column named by sort. Any other value sorts ascending. On its own it does nothing: without sort there is no column to reverse, so it neither reorders the results nor selects offset paging.'
                  in: query
                  name: direction
                  schema:
                    description: 'Sort direction, asc or desc, applied to the column named by sort. Any other value sorts ascending. On its own it does nothing: without sort there is no column to reverse, so it neither reorders the results nor selects offset paging.'
                    type: string
                - allowEmptyValue: true
                  description: 1-based page number for offset paging (default 1). Supplying it selects offset paging.
                  in: query
                  name: page
                  schema:
                    description: 1-based page number for offset paging (default 1). Supplying it selects offset paging.
                    format: int64
                    type: integer
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AdminListOrganizationsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - admin_auth_header_Authorization: []
            summary: listOrganizations admin
            tags:
                - admin
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
    /admin/organizations.stats:
        get:
            tags:
                - admin
            summary: getOrganizationStats admin
            description: 'Returns platform-wide organization counts for the strip above the organizations list. Every figure counts the whole platform: none of them narrows to the caller''s list filters, so the strip does not move when an operator filters.'
            operationId: adminGetOrganizationStats
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AdminOrganizationStats'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - admin_auth_header_Authorization: []
    /admin/project.get:
        get:
            tags:
                - admin
            summary: getProject admin
            description: Returns full admin details for a project by id or slug, including aggregated counts of child resources.
            operationId: adminGetProject
            parameters:
                - name: id_or_slug
                  in: query
                  description: Project ID or slug.
                  allowEmptyValue: true
                  required: true
                  schema:
                    type: string
                    description: Project ID or slug.
                - name: organization_id_or_slug
                  in: query
                  description: Organization the project must belong to, by id or slug. A project outside it is reported as not found. Optional, because the global project lookup has no organization to scope by.
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: Organization the project must belong to, by id or slug. A project outside it is reported as not found. Optional, because the global project lookup has no organization to scope by.
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AdminProjectDetail'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - admin_auth_header_Authorization: []
    /admin/trial.extend:
        post:
            tags:
                - admin
            summary: extendTrial admin
            description: 'Extends a running enterprise trial by adding days to its current end date. Only a running trial can be extended: one that has converted, has been demoted, or has already expired is rejected rather than re-armed.'
            operationId: adminExtendTrial
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/ExtendTrialRequestBody'
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AdminOrganization'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - admin_auth_header_Authorization: []
    /admin/trial.rearm:
        post:
            tags:
                - admin
            summary: rearmTrial admin
            description: 'Puts a demoted enterprise trial back on: restores the organization''s account type and whitelist flag, revives its model provider keys, and gives the trial a fresh run of the given length counted from now. Only a demoted trial can be re-armed; one that has converted or is already running is rejected.'
            operationId: adminRearmTrial
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RearmTrialRequestBody'
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AdminOrganization'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - admin_auth_header_Authorization: []
    /rpc/access.createRole:
        post:
            description: Create a new custom role.
            operationId: createRole
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateRoleForm'
                required: true
            responses:
                "201":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Role'
                    description: Created response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: createRole access
            tags:
                - access
            x-speakeasy-name-override: createRole
            x-speakeasy-react-hook:
                name: CreateRole
    /rpc/access.deleteRole:
        delete:
            description: Delete a custom role (system roles cannot be deleted).
            operationId: deleteRole
            parameters:
                - allowEmptyValue: true
                  description: The ID of the role to delete.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the role to delete.
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: deleteRole access
            tags:
                - access
            x-speakeasy-name-override: deleteRole
            x-speakeasy-react-hook:
                name: DeleteRole
    /rpc/access.getRole:
        get:
            description: Get a role by ID.
            operationId: getRole
            parameters:
                - allowEmptyValue: true
                  description: The ID of the role.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the role.
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Role'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: getRole access
            tags:
                - access
            x-speakeasy-name-override: getRole
            x-speakeasy-react-hook:
                name: Role
    /rpc/access.getShadowMCPInventoryServer:
        get:
            description: Get one project-scoped Shadow MCP server inventory URL with usage and policy-bypass state.
            operationId: getShadowMCPInventoryServer
            parameters:
                - allowEmptyValue: true
                  in: query
                  name: project_id
                  required: true
                  schema:
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Shadow MCP server slug to inspect.
                  in: query
                  name: server_slug
                  required: true
                  schema:
                    description: Shadow MCP server slug to inspect.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ShadowMCPInventoryServer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getShadowMCPInventoryServer access
            tags:
                - access
            x-speakeasy-name-override: getShadowMCPInventoryServer
            x-speakeasy-react-hook:
                name: ShadowMCPInventoryServer
    /rpc/access.listChallengeBuckets:
        get:
            description: List authz challenges grouped into time-based burst buckets. Consecutive challenges with the same dimensions within a 10-minute window are collapsed into a single bucket.
            operationId: listChallengeBuckets
            parameters:
                - allowEmptyValue: true
                  description: Filter by outcome.
                  in: query
                  name: outcome
                  schema:
                    description: Filter by outcome.
                    enum:
                        - allow
                        - deny
                    type: string
                - allowEmptyValue: true
                  description: Filter by principal URN.
                  in: query
                  name: principal_urn
                  schema:
                    description: Filter by principal URN.
                    type: string
                - allowEmptyValue: true
                  description: Filter by scope.
                  in: query
                  name: scope
                  schema:
                    description: Filter by scope.
                    type: string
                - allowEmptyValue: true
                  description: Filter to a specific project.
                  in: query
                  name: project_id
                  schema:
                    description: Filter to a specific project.
                    type: string
                - allowEmptyValue: true
                  description: Filter by resolution state. True = only resolved, false = only unresolved.
                  in: query
                  name: resolved
                  schema:
                    description: Filter by resolution state. True = only resolved, false = only unresolved.
                    type: boolean
                - allowEmptyValue: true
                  description: Maximum number of buckets to return.
                  in: query
                  name: limit
                  schema:
                    default: 50
                    description: Maximum number of buckets to return.
                    format: int64
                    maximum: 200
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: Number of buckets to skip.
                  in: query
                  name: offset
                  schema:
                    default: 0
                    description: Number of buckets to skip.
                    format: int64
                    minimum: 0
                    type: integer
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListChallengeBucketsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: listChallengeBuckets access
            tags:
                - access
            x-speakeasy-name-override: listChallengeBuckets
            x-speakeasy-react-hook:
                name: ChallengeBuckets
    /rpc/access.listChallenges:
        get:
            description: List authz challenge events from ClickHouse, enriched with resolution state from PostgreSQL.
            operationId: listChallenges
            parameters:
                - allowEmptyValue: true
                  description: Filter by outcome.
                  in: query
                  name: outcome
                  schema:
                    description: Filter by outcome.
                    enum:
                        - allow
                        - deny
                    type: string
                - allowEmptyValue: true
                  description: Filter by principal URN.
                  in: query
                  name: principal_urn
                  schema:
                    description: Filter by principal URN.
                    type: string
                - allowEmptyValue: true
                  description: Filter by scope.
                  in: query
                  name: scope
                  schema:
                    description: Filter by scope.
                    type: string
                - allowEmptyValue: true
                  description: Filter to a specific project.
                  in: query
                  name: project_id
                  schema:
                    description: Filter to a specific project.
                    type: string
                - allowEmptyValue: true
                  description: Filter by resolution state. True = only resolved, false = only unresolved.
                  in: query
                  name: resolved
                  schema:
                    description: Filter by resolution state. True = only resolved, false = only unresolved.
                    type: boolean
                - allowEmptyValue: true
                  description: Fetch specific challenges by ID. When set, other filters and pagination are ignored.
                  in: query
                  name: ids
                  schema:
                    description: Fetch specific challenges by ID. When set, other filters and pagination are ignored.
                    items:
                        type: string
                    type: array
                - allowEmptyValue: true
                  description: Maximum number of results to return.
                  in: query
                  name: limit
                  schema:
                    default: 50
                    description: Maximum number of results to return.
                    format: int64
                    maximum: 200
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: Number of results to skip.
                  in: query
                  name: offset
                  schema:
                    default: 0
                    description: Number of results to skip.
                    format: int64
                    minimum: 0
                    type: integer
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListChallengesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: listChallenges access
            tags:
                - access
            x-speakeasy-name-override: listChallenges
            x-speakeasy-react-hook:
                name: Challenges
    /rpc/access.listGrants:
        get:
            description: List the current user's effective grants, including inherited role grants.
            operationId: listGrants
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListUserGrantsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: listGrants access
            tags:
                - access
            x-speakeasy-name-override: listGrants
            x-speakeasy-react-hook:
                name: Grants
    /rpc/access.listMembers:
        get:
            description: List all team members with their role assignments.
            operationId: listMembers
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListMembersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: listMembers access
            tags:
                - access
            x-speakeasy-name-override: listMembers
            x-speakeasy-react-hook:
                name: Members
    /rpc/access.listRoles:
        get:
            description: List all roles for the current organization.
            operationId: listRoles
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListRolesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: listRoles access
            tags:
                - access
            x-speakeasy-name-override: listRoles
            x-speakeasy-react-hook:
                name: Roles
    /rpc/access.listScopes:
        get:
            description: List all available scopes and their resource types.
            operationId: listScopes
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListScopesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: listScopes access
            tags:
                - access
            x-speakeasy-name-override: listScopes
            x-speakeasy-react-hook:
                name: ListScopes
    /rpc/access.listShadowMCPInventory:
        get:
            description: List project-scoped Shadow MCP server inventory composed from observed URLs, telemetry usage, and policy-bypass state.
            operationId: listShadowMCPInventory
            parameters:
                - allowEmptyValue: true
                  in: query
                  name: project_id
                  required: true
                  schema:
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  in: query
                  name: limit
                  schema:
                    default: 50
                    format: int64
                    maximum: 200
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: Cursor for the next page of results.
                  in: query
                  name: cursor
                  schema:
                    description: Cursor for the next page of results.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListShadowMCPInventoryResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listShadowMCPInventory access
            tags:
                - access
            x-speakeasy-name-override: listShadowMCPInventory
            x-speakeasy-react-hook:
                name: ShadowMCPInventory
    /rpc/access.listShadowMCPInventoryUsers:
        get:
            description: List users with observed telemetry usage for one project-scoped Shadow MCP server URL.
            operationId: listShadowMCPInventoryUsers
            parameters:
                - allowEmptyValue: true
                  in: query
                  name: project_id
                  required: true
                  schema:
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Shadow MCP server URL to expand.
                  in: query
                  name: server_url
                  required: true
                  schema:
                    description: Shadow MCP server URL to expand.
                    format: uri
                    type: string
                - allowEmptyValue: true
                  in: query
                  name: limit
                  schema:
                    default: 50
                    format: int64
                    maximum: 200
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: Cursor for the next page of results.
                  in: query
                  name: cursor
                  schema:
                    description: Cursor for the next page of results.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListShadowMCPInventoryUsersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listShadowMCPInventoryUsers access
            tags:
                - access
            x-speakeasy-name-override: listShadowMCPInventoryUsers
            x-speakeasy-react-hook:
                name: ShadowMCPInventoryUsers
    /rpc/access.requestAccess:
        post:
            description: Request access to a scope by sending an email notification to organization administrators.
            operationId: requestAccess
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RequestAccessForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RequestAccessResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: requestAccess access
            tags:
                - access
            x-speakeasy-name-override: requestAccess
            x-speakeasy-react-hook:
                name: RequestAccess
                type: mutation
    /rpc/access.resolveChallenge:
        post:
            description: Record resolutions for one or more denied authz challenges. The caller is responsible for assigning the role first.
            operationId: resolveChallenge
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/ResolveChallengeForm'
                required: true
            responses:
                "201":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ResolveChallengesResult'
                    description: Created response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: resolveChallenge access
            tags:
                - access
            x-speakeasy-name-override: resolveChallenge
            x-speakeasy-react-hook:
                name: ResolveChallenge
    /rpc/access.resolveShadowMCPInventoryRequest:
        post:
            description: Review the latest pending Shadow MCP URL request and resolve all pending requests for that URL.
            operationId: resolveShadowMCPInventoryRequest
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/ResolveShadowMCPInventoryRequestForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ShadowMCPInventoryURLState'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: resolveShadowMCPInventoryRequest access
            tags:
                - access
            x-speakeasy-name-override: resolveShadowMCPInventoryRequest
            x-speakeasy-react-hook:
                name: ResolveShadowMCPInventoryRequest
                type: mutation
    /rpc/access.updateMemberRoles:
        put:
            description: Update a team member's role assignments.
            operationId: updateMemberRoles
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateMemberRolesForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AccessMember'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: updateMemberRoles access
            tags:
                - access
            x-speakeasy-name-override: updateMemberRoles
            x-speakeasy-react-hook:
                name: UpdateMemberRoles
    /rpc/access.updateRole:
        put:
            description: Update an existing custom role.
            operationId: updateRole
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateRoleForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Role'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: updateRole access
            tags:
                - access
            x-speakeasy-name-override: updateRole
            x-speakeasy-react-hook:
                name: UpdateRole
    /rpc/access.updateShadowMCPInventoryServerName:
        post:
            description: Update or clear the administrator-defined display name for one project-scoped Shadow MCP inventory server URL.
            operationId: updateShadowMCPInventoryServerName
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateShadowMCPInventoryServerNameForm'
                required: true
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: updateShadowMCPInventoryServerName access
            tags:
                - access
            x-speakeasy-name-override: updateShadowMCPInventoryServerName
            x-speakeasy-react-hook:
                name: UpdateShadowMCPInventoryServerName
                type: mutation
    /rpc/adminAssets.uploadImage:
        post:
            description: Upload a platform-tier image (e.g. a global remote identity provider logo). Requires platform admin.
            operationId: uploadPlatformImage
            parameters:
                - allowEmptyValue: true
                  in: header
                  name: Content-Type
                  required: true
                  schema:
                    type: string
                - allowEmptyValue: true
                  in: header
                  name: Content-Length
                  required: true
                  schema:
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UploadImageResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: uploadPlatformImage adminAssets
            tags:
                - adminAssets
            x-speakeasy-name-override: uploadImage
            x-speakeasy-react-hook:
                name: UploadPlatformImage
    /rpc/adminChatAnalysis.getSettings:
        get:
            description: Get the active organization's chat analysis settings. Requires platform admin.
            operationId: getChatAnalysisSettings
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ChatAnalysisSettings'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getSettings adminChatAnalysis
            tags:
                - adminChatAnalysis
            x-speakeasy-name-override: getSettings
            x-speakeasy-react-hook:
                name: ChatAnalysisSettings
    /rpc/adminChatAnalysis.triggerAnalysis:
        post:
            description: Wake the chat analysis coordinator for every project in the active organization, instead of waiting for the periodic sweep. Requires platform admin.
            operationId: triggerChatAnalysis
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/TriggerAnalysisResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: triggerAnalysis adminChatAnalysis
            tags:
                - adminChatAnalysis
            x-speakeasy-name-override: triggerAnalysis
            x-speakeasy-react-hook:
                name: TriggerChatAnalysis
    /rpc/adminChatAnalysis.upsertBusinessMemorySettings:
        post:
            description: Create or replace the active organization's business-memory extraction settings. Requires platform admin.
            operationId: upsertBusinessMemoryAnalysisSettings
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpsertBusinessMemorySettingsRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ChatAnalysisSettings'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: upsertBusinessMemorySettings adminChatAnalysis
            tags:
                - adminChatAnalysis
            x-speakeasy-name-override: upsertBusinessMemorySettings
            x-speakeasy-react-hook:
                name: UpsertBusinessMemoryAnalysisSettings
    /rpc/adminChatAnalysis.upsertWorkUnitsSettings:
        post:
            description: Create or replace the active organization's chat analysis settings. Requires platform admin.
            operationId: upsertChatAnalysisSettings
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpsertWorkUnitsSettingsRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ChatAnalysisSettings'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: upsertWorkUnitsSettings adminChatAnalysis
            tags:
                - adminChatAnalysis
            x-speakeasy-name-override: upsertWorkUnitsSettings
            x-speakeasy-react-hook:
                name: UpsertChatAnalysisSettings
    /rpc/adminExternalCredentials.createGcpIam:
        post:
            description: Create a platform GCP IAM external credential (organization_id NULL, project_id NULL). Requires platform admin.
            operationId: createGcpIamPlatformCredential
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreatePlatformGcpIamCredentialForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GcpIamCredential'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: createGcpIamPlatformCredential adminExternalCredentials
            tags:
                - adminExternalCredentials
            x-speakeasy-name-override: createGcpIam
            x-speakeasy-react-hook:
                name: CreateGcpIamPlatformCredential
    /rpc/adminExternalCredentials.deleteGcpIam:
        delete:
            description: Soft-delete a platform GCP IAM external credential by ID. Requires platform admin.
            operationId: deleteGcpIamPlatformCredential
            parameters:
                - allowEmptyValue: true
                  description: The ID of the credential to delete.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the credential to delete.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: deleteGcpIamPlatformCredential adminExternalCredentials
            tags:
                - adminExternalCredentials
            x-speakeasy-name-override: deleteGcpIam
            x-speakeasy-react-hook:
                name: DeleteGcpIamPlatformCredential
    /rpc/adminExternalCredentials.getGcpIam:
        get:
            description: Get a platform GCP IAM external credential by ID. Requires platform admin.
            operationId: getGcpIamPlatformCredential
            parameters:
                - allowEmptyValue: true
                  description: The ID of the credential to get.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the credential to get.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GcpIamCredential'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getGcpIamPlatformCredential adminExternalCredentials
            tags:
                - adminExternalCredentials
            x-speakeasy-name-override: getGcpIam
            x-speakeasy-react-hook:
                name: GetGcpIamPlatformCredential
    /rpc/adminExternalCredentials.list:
        get:
            description: List the platform external credentials (provider-independent summary). Optionally filter by provider. Requires platform admin.
            operationId: listPlatformExternalCredentials
            parameters:
                - allowEmptyValue: true
                  description: Only return credentials for this provider.
                  in: query
                  name: provider
                  schema:
                    description: Only return credentials for this provider.
                    enum:
                        - aws_iam
                        - gcp_iam
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListExternalCredentialsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listPlatformExternalCredentials adminExternalCredentials
            tags:
                - adminExternalCredentials
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: ListPlatformExternalCredentials
    /rpc/adminExternalCredentials.updateGcpIam:
        post:
            description: Replace a platform GCP IAM external credential's configuration. Requires platform admin.
            operationId: updateGcpIamPlatformCredential
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateGcpIamPlatformCredentialRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GcpIamCredential'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: updateGcpIamPlatformCredential adminExternalCredentials
            tags:
                - adminExternalCredentials
            x-speakeasy-name-override: updateGcpIam
            x-speakeasy-react-hook:
                name: UpdateGcpIamPlatformCredential
    /rpc/adminExternalCredentials.verifyGcpIam:
        post:
            description: 'Run a live ''who am I'' probe against a platform GCP IAM credential''s resolved identity and report the effective principal. Ephemeral: nothing is persisted. Requires platform admin.'
            operationId: verifyGcpIamPlatformCredential
            parameters:
                - allowEmptyValue: true
                  description: The ID of the credential to verify.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the credential to verify.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/VerifyPlatformCredentialResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: verifyGcpIamPlatformCredential adminExternalCredentials
            tags:
                - adminExternalCredentials
            x-speakeasy-name-override: verifyGcpIam
            x-speakeasy-react-hook:
                name: VerifyGcpIamPlatformCredential
    /rpc/adminOpenRouterKeys.disableKey:
        post:
            description: Lock down an organization's platform OpenRouter key, upstream and locally. Requires platform admin.
            operationId: disableAdminOpenRouterKey
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/DisableOpenRouterKeyRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AdminOpenRouterKey'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: disableKey adminOpenRouterKeys
            tags:
                - adminOpenRouterKeys
            x-speakeasy-name-override: disableKey
            x-speakeasy-react-hook:
                name: DisableAdminOpenRouterKey
    /rpc/adminOpenRouterKeys.enableKey:
        post:
            description: Reinstate a disabled platform OpenRouter key, upstream and locally, keeping its recorded credit ceiling. Requires platform admin.
            operationId: enableAdminOpenRouterKey
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/EnableOpenRouterKeyRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AdminOpenRouterKey'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: enableKey adminOpenRouterKeys
            tags:
                - adminOpenRouterKeys
            x-speakeasy-name-override: enableKey
            x-speakeasy-react-hook:
                name: EnableAdminOpenRouterKey
    /rpc/adminOpenRouterKeys.getKeyUsage:
        get:
            description: Fetch an organization's live credit usage from OpenRouter for one key. Requires platform admin.
            operationId: getAdminOpenRouterKeyUsage
            parameters:
                - allowEmptyValue: true
                  description: Organization that owns the key.
                  in: query
                  name: organization_id
                  required: true
                  schema:
                    description: Organization that owns the key.
                    type: string
                - allowEmptyValue: true
                  description: Key type to inspect.
                  in: query
                  name: key_type
                  required: true
                  schema:
                    description: Key type to inspect.
                    enum:
                        - chat
                        - internal
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetKeyUsageResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getKeyUsage adminOpenRouterKeys
            tags:
                - adminOpenRouterKeys
            x-speakeasy-name-override: getKeyUsage
            x-speakeasy-react-hook:
                name: AdminOpenRouterKeyUsage
    /rpc/adminOpenRouterKeys.listKeys:
        get:
            description: List every organization's platform OpenRouter keys. Requires platform admin.
            operationId: listAdminOpenRouterKeys
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListKeysResponseBody2'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listKeys adminOpenRouterKeys
            tags:
                - adminOpenRouterKeys
            x-speakeasy-name-override: listKeys
            x-speakeasy-react-hook:
                name: AdminOpenRouterKeys
    /rpc/adminRemoteSessions.createGlobalClient:
        post:
            description: Register a global remote_session_client under an existing global remote_session_issuer. Caller supplies client_id and optional client_secret obtained out-of-band from the upstream issuer. Requires platform admin.
            operationId: createGlobalRemoteSessionClient
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateGlobalRemoteSessionClientForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionClient'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: createGlobalClient adminRemoteSessions
            tags:
                - adminRemoteSessions
            x-speakeasy-name-override: createGlobalClient
            x-speakeasy-react-hook:
                name: CreateGlobalRemoteSessionClient
    /rpc/adminRemoteSessions.createGlobalIssuer:
        post:
            description: Create a global remote_session_issuer (project_id NULL, organization_id NULL). Requires platform admin.
            operationId: createGlobalRemoteSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateRemoteSessionIssuerForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: createGlobalIssuer adminRemoteSessions
            tags:
                - adminRemoteSessions
            x-speakeasy-name-override: createGlobalIssuer
            x-speakeasy-react-hook:
                name: CreateGlobalRemoteSessionIssuer
    /rpc/adminRemoteSessions.deleteGlobalClient:
        delete:
            description: Soft-delete a global remote_session_client. Cascades to the remote_sessions minted against it. Requires platform admin.
            operationId: deleteGlobalRemoteSessionClient
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_client id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The remote_session_client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: deleteGlobalClient adminRemoteSessions
            tags:
                - adminRemoteSessions
            x-speakeasy-name-override: deleteGlobalClient
            x-speakeasy-react-hook:
                name: DeleteGlobalRemoteSessionClient
    /rpc/adminRemoteSessions.deleteGlobalIssuer:
        delete:
            description: Soft-delete a global remote_session_issuer. Blocked when any global remote_session_clients still reference it. Requires platform admin.
            operationId: deleteGlobalRemoteSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_issuer id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The remote_session_issuer id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: deleteGlobalIssuer adminRemoteSessions
            tags:
                - adminRemoteSessions
            x-speakeasy-name-override: deleteGlobalIssuer
            x-speakeasy-react-hook:
                name: DeleteGlobalRemoteSessionIssuer
    /rpc/adminRemoteSessions.fetchGlobalIssuerMetadata:
        post:
            description: Hit an upstream issuer's RFC 8414 .well-known/oauth-authorization-server document and return a draft suitable for createGlobalIssuer. Keyed by issuer URL; no record need exist and nothing is persisted. Requires platform admin.
            operationId: fetchGlobalRemoteSessionIssuerMetadata
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/FetchIssuerMetadataRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuerDraft'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: fetchGlobalIssuerMetadata adminRemoteSessions
            tags:
                - adminRemoteSessions
            x-speakeasy-name-override: fetchGlobalIssuerMetadata
            x-speakeasy-react-hook:
                name: FetchGlobalRemoteSessionIssuerMetadata
    /rpc/adminRemoteSessions.getGlobalClient:
        get:
            description: Get a global remote_session_client by id. Requires platform admin.
            operationId: getGlobalRemoteSessionClient
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_client id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The remote_session_client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionClient'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getGlobalClient adminRemoteSessions
            tags:
                - adminRemoteSessions
            x-speakeasy-name-override: getGlobalClient
            x-speakeasy-react-hook:
                name: GlobalRemoteSessionClient
    /rpc/adminRemoteSessions.getGlobalIssuer:
        get:
            description: Get a global remote_session_issuer by id. Requires platform admin.
            operationId: getGlobalRemoteSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_issuer id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The remote_session_issuer id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GlobalRemoteSessionIssuer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getGlobalIssuer adminRemoteSessions
            tags:
                - adminRemoteSessions
            x-speakeasy-name-override: getGlobalIssuer
            x-speakeasy-react-hook:
                name: GlobalRemoteSessionIssuer
    /rpc/adminRemoteSessions.getGlobalIssuerDuplicatePreflight:
        get:
            description: |-
                Report the global remote_session_issuers that already describe an upstream issuer URL, so the catalog create and edit forms can warn before curating a second entry for the same authorization server. Requires platform admin.

                Scoped to the global partition only. Tenant issuers naming the same URL are deliberately not reported here — listGlobalIssuerConvergenceCandidates is the surface for those, and it is keyed on a global issuer that already exists.

                The global tier is unique on slug but not on issuer, so nothing prevents a duplicate catalog entry and this warning is the only thing that will catch one. Advisory all the same: it never blocks the write. Matching uses the same canonicalization as the tenant-facing preflights, and an unparseable URL returns no matches rather than an error.
            operationId: getGlobalRemoteSessionIssuerDuplicatePreflight
            parameters:
                - allowEmptyValue: true
                  description: The upstream issuer URL being entered (e.g. https://login.linear.app). Empty or unparseable returns no matches.
                  in: query
                  name: issuer
                  schema:
                    description: The upstream issuer URL being entered (e.g. https://login.linear.app). Empty or unparseable returns no matches.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuerDuplicatePreflight'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getGlobalIssuerDuplicatePreflight adminRemoteSessions
            tags:
                - adminRemoteSessions
            x-speakeasy-name-override: getGlobalIssuerDuplicatePreflight
            x-speakeasy-react-hook:
                name: GlobalRemoteSessionIssuerDuplicatePreflight
    /rpc/adminRemoteSessions.getGlobalIssuerMigratePreflight:
        get:
            description: 'Authoritative impact summary for consolidating a tenant remote_session_issuer onto a global one: the clients that would move, the affected MCP servers, and every blocker (endpoint mismatches, conflicting MCP-server bindings). Also reports how many tenant-owned clients the target already carries, since those permanently block deleting it. Requires platform admin.'
            operationId: getGlobalRemoteSessionIssuerMigratePreflight
            parameters:
                - allowEmptyValue: true
                  description: The organization- or project-level remote_session_issuer to migrate away from.
                  in: query
                  name: source_id
                  required: true
                  schema:
                    description: The organization- or project-level remote_session_issuer to migrate away from.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: The global remote_session_issuer to migrate onto.
                  in: query
                  name: target_id
                  required: true
                  schema:
                    description: The global remote_session_issuer to migrate onto.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/IssuerMigratePreflight'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getGlobalIssuerMigratePreflight adminRemoteSessions
            tags:
                - adminRemoteSessions
            x-speakeasy-name-override: getGlobalIssuerMigratePreflight
            x-speakeasy-react-hook:
                name: GlobalRemoteSessionIssuerMigratePreflight
    /rpc/adminRemoteSessions.listGlobalClients:
        get:
            description: List the global remote_session_clients registered with a global remote_session_issuer. Requires platform admin.
            operationId: listGlobalRemoteSessionClients
            parameters:
                - allowEmptyValue: true
                  description: The global remote_session_issuer id to list clients for.
                  in: query
                  name: remote_session_issuer_id
                  required: true
                  schema:
                    description: The global remote_session_issuer id to list clients for.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Pagination cursor.
                  in: query
                  name: cursor
                  schema:
                    description: Pagination cursor.
                    type: string
                - allowEmptyValue: true
                  description: Page size (default 50, max 100).
                  in: query
                  name: limit
                  schema:
                    description: Page size (default 50, max 100).
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListRemoteSessionClientsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listGlobalClients adminRemoteSessions
            tags:
                - adminRemoteSessions
            x-speakeasy-name-override: listGlobalClients
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: GlobalRemoteSessionClients
    /rpc/adminRemoteSessions.listGlobalIssuerConvergenceCandidates:
        get:
            description: List the organization- and project-level remote_session_issuers that describe the same upstream authorization server as a given global issuer, and so could be consolidated onto it. Matching is by canonical issuer URL, collapsing trailing-slash and default-port spellings. Each candidate carries its owning organization, the number of clients that would move, and the metadata differences that would block or accompany the migration. Requires platform admin.
            operationId: listGlobalRemoteSessionIssuerConvergenceCandidates
            parameters:
                - allowEmptyValue: true
                  description: The global remote_session_issuer that candidates would be consolidated onto.
                  in: query
                  name: target_id
                  required: true
                  schema:
                    description: The global remote_session_issuer that candidates would be consolidated onto.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Pagination cursor.
                  in: query
                  name: cursor
                  schema:
                    description: Pagination cursor.
                    type: string
                - allowEmptyValue: true
                  description: Page size (default 50, max 100).
                  in: query
                  name: limit
                  schema:
                    description: Page size (default 50, max 100).
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListIssuerConvergenceCandidatesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listGlobalIssuerConvergenceCandidates adminRemoteSessions
            tags:
                - adminRemoteSessions
            x-speakeasy-name-override: listGlobalIssuerConvergenceCandidates
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: GlobalRemoteSessionIssuerConvergenceCandidates
    /rpc/adminRemoteSessions.listGlobalIssuers:
        get:
            description: List global remote_session_issuers. Requires platform admin.
            operationId: listGlobalRemoteSessionIssuers
            parameters:
                - allowEmptyValue: true
                  description: Pagination cursor.
                  in: query
                  name: cursor
                  schema:
                    description: Pagination cursor.
                    type: string
                - allowEmptyValue: true
                  description: Page size (default 50, max 100).
                  in: query
                  name: limit
                  schema:
                    description: Page size (default 50, max 100).
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListGlobalRemoteSessionIssuersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listGlobalIssuers adminRemoteSessions
            tags:
                - adminRemoteSessions
            x-speakeasy-name-override: listGlobalIssuers
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: GlobalRemoteSessionIssuers
    /rpc/adminRemoteSessions.migrateToGlobalIssuer:
        post:
            description: 'Consolidate an organization- or project-level remote_session_issuer onto a global one: re-point every client from the source issuer onto the target, then soft-delete the source. Existing remote sessions are preserved, so no user re-authenticates. The source may belong to any organization; the target must be a global issuer. Both must agree on issuer (compared canonically), token_endpoint, and authorization_endpoint. One source per call. Requires platform admin.'
            operationId: migrateToGlobalRemoteSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/MigrateRemoteSessionIssuerRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/MigrateRemoteSessionIssuerResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: migrateToGlobalIssuer adminRemoteSessions
            tags:
                - adminRemoteSessions
            x-speakeasy-name-override: migrateToGlobalIssuer
            x-speakeasy-react-hook:
                name: MigrateToGlobalRemoteSessionIssuer
    /rpc/adminRemoteSessions.refreshGlobalIssuerMetadata:
        post:
            description: Re-fetch an existing global remote_session_issuer's RFC 8414 metadata document and persist the discovered values. Keyed by issuer id. Only RFC 8414-derived columns are written — endpoints, the *_supported arrays, client_id_metadata_document_supported, and the documentation URLs. Gram behavior and display fields (oidc, passthrough, name, slug, logo, client setup documentation) are left alone. Requires platform admin.
            operationId: refreshGlobalRemoteSessionIssuerMetadata
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RiskIDRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuerRefresh'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: refreshGlobalIssuerMetadata adminRemoteSessions
            tags:
                - adminRemoteSessions
            x-speakeasy-name-override: refreshGlobalIssuerMetadata
            x-speakeasy-react-hook:
                name: RefreshGlobalRemoteSessionIssuerMetadata
    /rpc/adminRemoteSessions.updateGlobalClient:
        post:
            description: Rotate the client_secret or change non-issuer settings on a global remote_session_client. Requires platform admin.
            operationId: updateGlobalRemoteSessionClient
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateRemoteSessionClientForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionClient'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: updateGlobalClient adminRemoteSessions
            tags:
                - adminRemoteSessions
            x-speakeasy-name-override: updateGlobalClient
            x-speakeasy-react-hook:
                name: UpdateGlobalRemoteSessionClient
    /rpc/adminRemoteSessions.updateGlobalIssuer:
        post:
            description: Update a global remote_session_issuer. Requires platform admin.
            operationId: updateGlobalRemoteSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateRemoteSessionIssuerForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: updateGlobalIssuer adminRemoteSessions
            tags:
                - adminRemoteSessions
            x-speakeasy-name-override: updateGlobalIssuer
            x-speakeasy-react-hook:
                name: UpdateGlobalRemoteSessionIssuer
    /rpc/agent.createSessionHandoff:
        post:
            description: 'Mint a short-lived capability URL for a rendered session-handoff document (session portability). The device agent uploads the handoff it rendered from the local transcript; the returned URL serves the markdown exactly once (burn-after-read) until expiry, so a cloud agent or another machine can continue the session. Content transits the server only for this purpose and stops being served at first read or expiry, whichever comes first. Requires a per-user key: the fleet-shared org install key is refused because minting a fetch-by-token URL for uploaded content is a per-user, content-bearing surface (the same DNO-383 blast-radius rule as getSessionMeta).'
            operationId: createAgentSessionHandoff
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Hardware serial number of the machine minting the link, when the agent can read it.
                  in: header
                  name: Gram-Device-Serial
                  schema:
                    description: Hardware serial number of the machine minting the link, when the agent can read it.
                    type: string
                - allowEmptyValue: true
                  description: Hostname of the machine minting the link, when the agent can read it.
                  in: header
                  name: Gram-Device-Hostname
                  schema:
                    description: Hostname of the machine minting the link, when the agent can read it.
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateSessionHandoffRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateSessionHandoffResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
            summary: createSessionHandoff agent
            tags:
                - agent
            x-speakeasy-name-override: createSessionHandoff
            x-speakeasy-react-hook:
                name: CreateAgentSessionHandoff
    /rpc/agent.getConfiguration:
        get:
            description: Get the organization-wide device-agent configuration for the dashboard. Requires a session with the org:admin scope. An unconfigured organization returns an empty document with is_configured=false; enrolled agents do not receive a remote layer until an administrator saves one.
            operationId: getDeviceAgentConfiguration
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/DeviceAgentConfiguration'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getConfiguration agent
            tags:
                - agent
            x-speakeasy-name-override: getConfiguration
            x-speakeasy-react-hook:
                name: DeviceAgentConfiguration
    /rpc/agent.getPlugins:
        get:
            description: Resolve the marketplaces, plugins, and optional organization configuration assigned to the enrolled user. The device agent reconciles these into the AI developer tools it manages. Organization configuration is delivered on this existing poll so agents do not need a second control-plane request.
            operationId: getAgentPlugins
            parameters:
                - allowEmptyValue: true
                  description: Email address of the enrolled user. Authoritative when authenticating with an org-scoped agent install key (the MDM zero-touch path); ignored for a per-user key, whose owner is the enrolled user.
                  example: dev@acme.corp
                  in: query
                  name: email
                  required: true
                  schema:
                    description: Email address of the enrolled user. Authoritative when authenticating with an org-scoped agent install key (the MDM zero-touch path); ignored for a per-user key, whose owner is the enrolled user.
                    example: dev@acme.corp
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Hardware serial number of the machine the agent runs on, when it can be read. Lets device coverage attest this specific machine rather than its assigned user.
                  example: C02XK1ABCDEF
                  in: header
                  name: Gram-Device-Serial
                  schema:
                    description: Hardware serial number of the machine the agent runs on, when it can be read. Lets device coverage attest this specific machine rather than its assigned user.
                    example: C02XK1ABCDEF
                    type: string
                - allowEmptyValue: true
                  description: Hostname of the machine the agent runs on, when it can be read.
                  example: dev-macbook-pro
                  in: header
                  name: Gram-Device-Hostname
                  schema:
                    description: Hostname of the machine the agent runs on, when it can be read.
                    example: dev-macbook-pro
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetPluginsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
            summary: getPlugins agent
            tags:
                - agent
            x-speakeasy-name-override: getPlugins
            x-speakeasy-react-hook:
                name: AgentPlugins
    /rpc/agent.getSessionMeta:
        get:
            description: 'Resolve display metadata (Gram chat id, generated title, last activity) for captured agent sessions the calling user owns. Used by the device agent''s session picker to overlay server-generated titles on locally discovered transcripts; unknown or non-owned session ids are silently omitted, so the picker degrades gracefully. Requires a per-user key: the fleet-shared org install key is refused because session metadata is per-user data.'
            operationId: getAgentSessionMeta
            parameters:
                - allowEmptyValue: true
                  description: Native harness session identifiers (e.g. Claude Code session UUIDs, Codex rollout ids) to resolve. Gram derives its chat ids from these the same way hook ingest does.
                  in: query
                  name: session_ids
                  required: true
                  schema:
                    description: Native harness session identifiers (e.g. Claude Code session UUIDs, Codex rollout ids) to resolve. Gram derives its chat ids from these the same way hook ingest does.
                    items:
                        type: string
                    maxItems: 50
                    type: array
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetSessionMetaResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
            summary: getSessionMeta agent
            tags:
                - agent
            x-speakeasy-name-override: getSessionMeta
            x-speakeasy-react-hook:
                name: AgentSessionMeta
    /rpc/agent.listSyncedUsers:
        get:
            description: List users in the current organization who are actively running the Speakeasy device agent, attributed by the email each agent reports on sync. Dashboard-only; requires an org admin session.
            operationId: listSyncedAgentUsers
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListSyncedUsersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listSyncedUsers agent
            tags:
                - agent
            x-speakeasy-name-override: listSyncedUsers
            x-speakeasy-react-hook:
                name: SyncedAgentUsers
    /rpc/agent.reportSessionMoved:
        post:
            description: 'Record that a captured agent session was moved to another harness on a device (session portability). Carries no session content — only the session identity, the target harness, and device attribution — and lands as a chat_session:move audit event so organizations retain governance visibility over local-first moves. Accepts both the per-user key and the org install key (with a vouched email), mirroring getPlugins, because fleet devices must be able to report moves. Fire-and-forget from the agent''s perspective: the daemon must never fail a move because this call failed.'
            operationId: reportAgentSessionMoved
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Hardware serial number of the machine the move happened on, when the agent can read it.
                  in: header
                  name: Gram-Device-Serial
                  schema:
                    description: Hardware serial number of the machine the move happened on, when the agent can read it.
                    type: string
                - allowEmptyValue: true
                  description: Hostname of the machine the move happened on, when the agent can read it.
                  in: header
                  name: Gram-Device-Hostname
                  schema:
                    description: Hostname of the machine the move happened on, when the agent can read it.
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/ReportSessionMovedRequestBody'
                required: true
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
            summary: reportSessionMoved agent
            tags:
                - agent
            x-speakeasy-name-override: reportSessionMoved
            x-speakeasy-react-hook:
                name: ReportAgentSessionMoved
    /rpc/agent.updateConfiguration:
        post:
            description: Create or replace the organization-wide, non-secret device-agent configuration. Requires a session with the org:admin scope. Known settings are replaced wholesale — omitting one removes it — while stored keys this server does not recognize are preserved for forward compatibility; identity and credential keys are rejected.
            operationId: updateDeviceAgentConfiguration
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateConfigurationRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/DeviceAgentConfiguration'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: updateConfiguration agent
            tags:
                - agent
            x-speakeasy-name-override: updateConfiguration
            x-speakeasy-react-hook:
                name: UpdateDeviceAgentConfiguration
    /rpc/aiIntegrations.deleteConfig:
        post:
            description: Delete the org-wide AI integration config for a provider.
            operationId: deleteAIIntegrationConfig
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/DeleteConfigRequestBody'
                required: true
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: deleteConfig aiIntegrations
            tags:
                - aiIntegrations
            x-speakeasy-name-override: deleteConfig
            x-speakeasy-react-hook:
                name: DeleteAIIntegrationConfig
    /rpc/aiIntegrations.getConfig:
        get:
            description: Get the org-wide AI integration config for a provider. Returns an empty config (enabled=false, has_api_key=false) when none is set.
            operationId: getAIIntegrationConfig
            parameters:
                - allowEmptyValue: true
                  description: AI provider identifier. Supported values include cursor, anthropic_compliance, codex_compliance, and chatgpt_compliance.
                  in: query
                  name: provider
                  required: true
                  schema:
                    description: AI provider identifier. Supported values include cursor, anthropic_compliance, codex_compliance, and chatgpt_compliance.
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AIIntegrationConfig'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: getConfig aiIntegrations
            tags:
                - aiIntegrations
            x-speakeasy-name-override: getConfig
            x-speakeasy-react-hook:
                name: AIIntegrationConfig
    /rpc/aiIntegrations.listSchedules:
        get:
            description: List the sync schedules and their scheduler state for a provider's org-wide AI integration config. Returns an empty list when no config is set.
            operationId: listAIIntegrationSchedules
            parameters:
                - allowEmptyValue: true
                  description: AI provider identifier. Supported values include cursor, anthropic_compliance, codex_compliance, and chatgpt_compliance.
                  in: query
                  name: provider
                  required: true
                  schema:
                    description: AI provider identifier. Supported values include cursor, anthropic_compliance, codex_compliance, and chatgpt_compliance.
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListAIIntegrationSchedulesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: listSchedules aiIntegrations
            tags:
                - aiIntegrations
            x-speakeasy-name-override: listSchedules
            x-speakeasy-react-hook:
                name: AIIntegrationSchedules
    /rpc/aiIntegrations.retrySchedule:
        post:
            description: Make one sync schedule due immediately, lifting any automatic pause and resetting its failure streak. The scheduler picks it up on its next tick.
            operationId: retryAIIntegrationSchedule
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RetryScheduleRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AIIntegrationScheduleState'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: retrySchedule aiIntegrations
            tags:
                - aiIntegrations
            x-speakeasy-name-override: retrySchedule
            x-speakeasy-react-hook:
                name: RetryAIIntegrationSchedule
    /rpc/aiIntegrations.setScheduleEnabled:
        post:
            description: Enable or disable one sync schedule of a provider's org-wide AI integration config. Disabled schedules are skipped by the poller until re-enabled.
            operationId: setAIIntegrationScheduleEnabled
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetScheduleEnabledRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AIIntegrationScheduleState'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: setScheduleEnabled aiIntegrations
            tags:
                - aiIntegrations
            x-speakeasy-name-override: setScheduleEnabled
            x-speakeasy-react-hook:
                name: SetAIIntegrationScheduleEnabled
    /rpc/aiIntegrations.upsertConfig:
        post:
            description: Create or update the org-wide AI integration config for a provider.
            operationId: upsertAIIntegrationConfig
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpsertConfigRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AIIntegrationConfig'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: upsertConfig aiIntegrations
            tags:
                - aiIntegrations
            x-speakeasy-name-override: upsertConfig
            x-speakeasy-react-hook:
                name: UpsertAIIntegrationConfig
    /rpc/assets.createSignedChatAttachmentURL:
        post:
            description: Create a time-limited signed URL to access a chat attachment without authentication.
            operationId: createSignedChatAttachmentURL
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: Chat Sessions token header
                  in: header
                  name: Gram-Chat-Session
                  schema:
                    description: Chat Sessions token header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateSignedChatAttachmentURLForm2'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateSignedChatAttachmentURLResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - chat_sessions_token_header_Gram-Chat-Session: []
                  project_slug_header_Gram-Project: []
            summary: createSignedChatAttachmentURL assets
            tags:
                - assets
            x-speakeasy-name-override: createSignedChatAttachmentURL
            x-speakeasy-react-hook:
                name: CreateSignedChatAttachmentURL
    /rpc/assets.fetchImageFromURL:
        post:
            description: Fetch an image from a URL and upload it to Gram as an image asset.
            operationId: fetchImageFromURL
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/FetchImageFromURLForm2'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UploadImageResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: fetchImageFromURL assets
            tags:
                - assets
            x-speakeasy-name-override: fetchImageFromURL
            x-speakeasy-react-hook:
                name: FetchImageFromURL
    /rpc/assets.fetchOpenAPIv3FromURL:
        post:
            description: Fetch an OpenAPI v3 document from a URL and upload it to Gram.
            operationId: fetchOpenAPIv3FromURL
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/FetchOpenAPIv3FromURLForm2'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UploadOpenAPIv3Result'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: fetchOpenAPIv3FromURL assets
            tags:
                - assets
            x-speakeasy-name-override: fetchOpenAPIv3FromURL
            x-speakeasy-react-hook:
                name: FetchOpenAPIv3FromURL
    /rpc/assets.list:
        get:
            description: List all assets for a project.
            operationId: listAssets
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListAssetsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listAssets assets
            tags:
                - assets
            x-speakeasy-name-override: listAssets
            x-speakeasy-react-hook:
                name: ListAssets
    /rpc/assets.serveChatAttachment:
        get:
            description: Serve a chat attachment from Gram.
            operationId: serveChatAttachment
            parameters:
                - allowEmptyValue: true
                  description: The ID of the attachment to serve
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the attachment to serve
                    type: string
                - allowEmptyValue: true
                  description: The project ID that the attachment belongs to
                  in: query
                  name: project_id
                  required: true
                  schema:
                    description: The project ID that the attachment belongs to
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: Chat Sessions token header
                  in: header
                  name: Gram-Chat-Session
                  schema:
                    description: Chat Sessions token header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                format: binary
                                type: string
                    description: OK response.
                    headers:
                        Content-Length:
                            schema:
                                format: int64
                                type: integer
                        Content-Type:
                            schema:
                                type: string
                        Last-Modified:
                            schema:
                                type: string
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
                - chat_sessions_token_header_Gram-Chat-Session: []
            summary: serveChatAttachment assets
            tags:
                - assets
            x-speakeasy-name-override: serveChatAttachment
            x-speakeasy-react-hook:
                name: serveChatAttachment
    /rpc/assets.serveChatAttachmentSigned:
        get:
            description: Serve a chat attachment using a signed URL token.
            operationId: serveChatAttachmentSigned
            parameters:
                - allowEmptyValue: true
                  description: The signed JWT token
                  in: query
                  name: token
                  required: true
                  schema:
                    description: The signed JWT token
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                format: binary
                                type: string
                    description: OK response.
                    headers:
                        Access-Control-Allow-Origin:
                            schema:
                                type: string
                        Content-Length:
                            schema:
                                format: int64
                                type: integer
                        Content-Type:
                            schema:
                                type: string
                        Last-Modified:
                            schema:
                                type: string
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            summary: serveChatAttachmentSigned assets
            tags:
                - assets
            x-speakeasy-name-override: serveChatAttachmentSigned
            x-speakeasy-react-hook:
                name: serveChatAttachmentSigned
    /rpc/assets.serveFunction:
        get:
            description: Serve a Gram Functions asset from Gram.
            operationId: serveFunction
            parameters:
                - allowEmptyValue: true
                  description: The ID of the asset to serve
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the asset to serve
                    type: string
                - allowEmptyValue: true
                  description: The procect ID that the asset belongs to
                  in: query
                  name: project_id
                  required: true
                  schema:
                    description: The procect ID that the asset belongs to
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                format: binary
                                type: string
                    description: OK response.
                    headers:
                        Content-Length:
                            schema:
                                format: int64
                                type: integer
                        Content-Type:
                            schema:
                                type: string
                        Last-Modified:
                            schema:
                                type: string
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: serveFunction assets
            tags:
                - assets
            x-speakeasy-name-override: serveFunction
            x-speakeasy-react-hook:
                name: serveFunction
    /rpc/assets.serveImage:
        get:
            description: Serve an image from Gram.
            operationId: serveImage
            parameters:
                - allowEmptyValue: true
                  description: The ID of the asset to serve
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the asset to serve
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                format: binary
                                type: string
                    description: OK response.
                    headers:
                        Access-Control-Allow-Origin:
                            schema:
                                type: string
                        Content-Length:
                            schema:
                                format: int64
                                type: integer
                        Content-Type:
                            schema:
                                type: string
                        Last-Modified:
                            schema:
                                type: string
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            summary: serveImage assets
            tags:
                - assets
            x-speakeasy-name-override: serveImage
            x-speakeasy-react-hook:
                name: serveImage
    /rpc/assets.serveOpenAPIv3:
        get:
            description: Serve an OpenAPIv3 asset from Gram.
            operationId: serveOpenAPIv3
            parameters:
                - allowEmptyValue: true
                  description: The ID of the asset to serve
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the asset to serve
                    type: string
                - allowEmptyValue: true
                  description: The procect ID that the asset belongs to
                  in: query
                  name: project_id
                  required: true
                  schema:
                    description: The procect ID that the asset belongs to
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        '*/*':
                            schema:
                                format: binary
                                type: string
                    description: OK response.
                    headers:
                        Content-Length:
                            schema:
                                format: int64
                                type: integer
                        Content-Type:
                            schema:
                                type: string
                        Last-Modified:
                            schema:
                                type: string
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: serveOpenAPIv3 assets
            tags:
                - assets
            x-speakeasy-name-override: serveOpenAPIv3
            x-speakeasy-react-hook:
                name: serveOpenAPIv3
    /rpc/assets.uploadChatAttachment:
        post:
            description: Upload a chat attachment to Gram.
            operationId: uploadChatAttachment
            parameters:
                - allowEmptyValue: true
                  in: header
                  name: Content-Type
                  required: true
                  schema:
                    type: string
                - allowEmptyValue: true
                  in: header
                  name: Content-Length
                  required: true
                  schema:
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: Chat Sessions token header
                  in: header
                  name: Gram-Chat-Session
                  schema:
                    description: Chat Sessions token header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UploadChatAttachmentResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - chat_sessions_token_header_Gram-Chat-Session: []
                  project_slug_header_Gram-Project: []
            summary: uploadChatAttachment assets
            tags:
                - assets
            x-speakeasy-name-override: uploadChatAttachment
            x-speakeasy-react-hook:
                name: UploadChatAttachment
    /rpc/assets.uploadFunctions:
        post:
            description: Upload functions to Gram.
            operationId: uploadFunctions
            parameters:
                - allowEmptyValue: true
                  in: header
                  name: Content-Type
                  required: true
                  schema:
                    type: string
                - allowEmptyValue: true
                  in: header
                  name: Content-Length
                  required: true
                  schema:
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UploadFunctionsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: uploadFunctions assets
            tags:
                - assets
            x-speakeasy-name-override: uploadFunctions
            x-speakeasy-react-hook:
                name: UploadFunctions
    /rpc/assets.uploadImage:
        post:
            description: Upload an image to Gram.
            operationId: uploadImage
            parameters:
                - allowEmptyValue: true
                  in: header
                  name: Content-Type
                  required: true
                  schema:
                    type: string
                - allowEmptyValue: true
                  in: header
                  name: Content-Length
                  required: true
                  schema:
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UploadImageResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: uploadImage assets
            tags:
                - assets
            x-speakeasy-name-override: uploadImage
            x-speakeasy-react-hook:
                name: UploadImage
    /rpc/assets.uploadOpenAPIv3:
        post:
            description: Upload an OpenAPI v3 document to Gram.
            operationId: uploadOpenAPIv3Asset
            parameters:
                - allowEmptyValue: true
                  in: header
                  name: Content-Type
                  required: true
                  schema:
                    type: string
                - allowEmptyValue: true
                  in: header
                  name: Content-Length
                  required: true
                  schema:
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UploadOpenAPIv3Result'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: uploadOpenAPIv3 assets
            tags:
                - assets
            x-speakeasy-name-override: uploadOpenAPIv3
            x-speakeasy-react-hook:
                name: UploadOpenAPIv3
    /rpc/assistantMemories.delete:
        delete:
            description: Delete an assistant memory by ID.
            operationId: deleteAssistantMemory
            parameters:
                - allowEmptyValue: true
                  description: The assistant memory ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The assistant memory ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: deleteAssistantMemory assistantMemories
            tags:
                - assistantMemories
            x-speakeasy-name-override: delete
    /rpc/assistantMemories.get:
        get:
            description: Get an assistant memory by ID.
            operationId: getAssistantMemory
            parameters:
                - allowEmptyValue: true
                  description: The assistant memory ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The assistant memory ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AssistantMemory'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getAssistantMemory assistantMemories
            tags:
                - assistantMemories
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: GetAssistantMemory
    /rpc/assistantMemories.list:
        get:
            description: List assistant memories for an assistant.
            operationId: listAssistantMemories
            parameters:
                - allowEmptyValue: true
                  description: The assistant ID.
                  in: query
                  name: assistant_id
                  required: true
                  schema:
                    description: The assistant ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Optional tags to filter memories by.
                  in: query
                  name: tags
                  schema:
                    description: Optional tags to filter memories by.
                    items:
                        type: string
                    type: array
                - allowEmptyValue: true
                  description: Whether to include soft-deleted memories.
                  in: query
                  name: include_deleted
                  schema:
                    default: false
                    description: Whether to include soft-deleted memories.
                    type: boolean
                - allowEmptyValue: true
                  description: The cursor to fetch results from.
                  in: query
                  name: cursor
                  schema:
                    description: The cursor to fetch results from.
                    type: string
                - allowEmptyValue: true
                  description: The number of memories to return per page.
                  in: query
                  name: limit
                  schema:
                    default: 50
                    description: The number of memories to return per page.
                    format: int64
                    maximum: 200
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListAssistantMemoriesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listAssistantMemories assistantMemories
            tags:
                - assistantMemories
            x-speakeasy-name-override: list
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: ListAssistantMemories
    /rpc/assistants.create:
        post:
            description: Create an assistant.
            operationId: createAssistant
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateAssistantForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Assistant'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: createAssistant assistants
            tags:
                - assistants
            x-speakeasy-name-override: create
    /rpc/assistants.delete:
        delete:
            description: Delete an assistant.
            operationId: deleteAssistant
            parameters:
                - allowEmptyValue: true
                  description: The assistant ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The assistant ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: deleteAssistant assistants
            tags:
                - assistants
            x-speakeasy-name-override: delete
    /rpc/assistants.ensureManagedAssistant:
        post:
            description: Get the project's built-in Project Assistant, provisioning it on first access. Idempotent — safe to call on every sidebar open.
            operationId: ensureManagedAssistant
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Assistant'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: ensureManagedAssistant assistants
            tags:
                - assistants
            x-speakeasy-name-override: ensureManaged
            x-speakeasy-react-hook:
                name: EnsureManagedAssistant
                type: mutation
    /rpc/assistants.get:
        get:
            description: Get an assistant by ID.
            operationId: getAssistant
            parameters:
                - allowEmptyValue: true
                  description: The assistant ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The assistant ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Assistant'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getAssistant assistants
            tags:
                - assistants
            x-speakeasy-name-override: get
    /rpc/assistants.getManagedAssistant:
        get:
            description: Get the project's built-in Project Assistant if it exists. Returns 404 when no managed assistant has been provisioned yet — call ensureManagedAssistant to create one.
            operationId: getManagedAssistant
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Assistant'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getManagedAssistant assistants
            tags:
                - assistants
            x-speakeasy-name-override: getManaged
    /rpc/assistants.list:
        get:
            description: List assistants for the current project.
            operationId: listAssistants
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListAssistantsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listAssistants assistants
            tags:
                - assistants
            x-speakeasy-name-override: list
    /rpc/assistants.sendMessage:
        post:
            description: Send a message from the dashboard to an assistant as the calling user. Continue an existing conversation by passing its chat_id (from listChats), or omit chat_id to start a new conversation — the server mints and returns a fresh chat id. The reply is delivered asynchronously; poll the chat service (loadChat) to read it.
            operationId: sendAssistantMessage
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SendMessageRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SendMessageResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: sendMessage assistants
            tags:
                - assistants
            x-speakeasy-name-override: sendMessage
            x-speakeasy-react-hook:
                name: SendAssistantMessage
    /rpc/assistants.update:
        post:
            description: Update an assistant.
            operationId: updateAssistant
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateAssistantForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Assistant'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: updateAssistant assistants
            tags:
                - assistants
            x-speakeasy-name-override: update
    /rpc/auditlogs.list:
        get:
            description: List audit logs across organization and projects.
            operationId: listAuditLogs
            parameters:
                - allowEmptyValue: true
                  description: The cursor for paginating through audit logs.
                  in: query
                  name: cursor
                  schema:
                    description: The cursor for paginating through audit logs.
                    type: string
                - allowEmptyValue: true
                  description: Project slug to filter audit logs to a specific project.
                  in: query
                  name: project_slug
                  schema:
                    description: Project slug to filter audit logs to a specific project.
                    type: string
                - allowEmptyValue: true
                  description: Actor ID to filter audit logs to a specific actor.
                  in: query
                  name: actor_id
                  schema:
                    description: Actor ID to filter audit logs to a specific actor.
                    type: string
                - allowEmptyValue: true
                  description: Action to filter audit logs to a specific action.
                  in: query
                  name: action
                  schema:
                    description: Action to filter audit logs to a specific action.
                    type: string
                - allowEmptyValue: true
                  description: Subject type to filter audit logs to a specific kind of subject. When omitted, assistant activity events are excluded; pass 'assistant' to list them.
                  in: query
                  name: subject_type
                  schema:
                    description: Subject type to filter audit logs to a specific kind of subject. When omitted, assistant activity events are excluded; pass 'assistant' to list them.
                    type: string
                - allowEmptyValue: true
                  description: Subject ID to filter audit logs to a specific subject (e.g. a single assistant).
                  in: query
                  name: subject_id
                  schema:
                    description: Subject ID to filter audit logs to a specific subject (e.g. a single assistant).
                    type: string
                - allowEmptyValue: true
                  description: Acting surface to filter audit logs to changes made through one surface, e.g. 'platform_mcp' to review agent-driven activity alone.
                  in: query
                  name: acting_surface
                  schema:
                    description: Acting surface to filter audit logs to changes made through one surface, e.g. 'platform_mcp' to review agent-driven activity alone.
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListAuditLogsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: list auditlogs
            tags:
                - auditlogs
            x-speakeasy-name-override: list
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: AuditLogs
    /rpc/auditlogs.listFacets:
        get:
            description: List available audit log facet values across organization and projects.
            operationId: listAuditLogFacets
            parameters:
                - allowEmptyValue: true
                  description: Project slug to filter facet values to a specific project.
                  in: query
                  name: project_slug
                  schema:
                    description: Project slug to filter facet values to a specific project.
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListAuditLogFacetsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: listFacets auditlogs
            tags:
                - auditlogs
            x-speakeasy-name-override: listFacets
            x-speakeasy-react-hook:
                name: AuditLogFacets
    /rpc/auth.callback:
        get:
            description: Handles the authentication callback.
            operationId: authCallback
            parameters:
                - allowEmptyValue: true
                  description: The auth code for authentication from the speakeasy system
                  in: query
                  name: code
                  required: true
                  schema:
                    description: The auth code for authentication from the speakeasy system
                    type: string
                - allowEmptyValue: true
                  description: The opaque state string optionally provided during initialization.
                  in: query
                  name: state
                  schema:
                    description: The opaque state string optionally provided during initialization.
                    type: string
            responses:
                "307":
                    description: Temporary Redirect response.
                    headers:
                        Gram-Session:
                            description: Session header
                            schema:
                                description: Session header
                                type: string
                        Location:
                            description: The URL to redirect to after authentication
                            schema:
                                description: The URL to redirect to after authentication
                                type: string
                        Set-Cookie:
                            description: The authentication session
                            schema:
                                description: The authentication session
                                type: string
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            summary: callback auth
            tags:
                - auth
            x-speakeasy-name-override: callback
            x-speakeasy-react-hook:
                disabled: true
    /rpc/auth.enterDemo:
        post:
            description: Switches the current session into the shared read-only demo organization.
            operationId: enterDemo
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    description: OK response.
                    headers:
                        Gram-Session:
                            description: Session header
                            schema:
                                description: Session header
                                type: string
                        Set-Cookie:
                            description: The authentication session
                            schema:
                                description: The authentication session
                                type: string
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: enterDemo auth
            tags:
                - auth
            x-speakeasy-name-override: enterDemo
            x-speakeasy-react-hook:
                name: EnterDemo
    /rpc/auth.info:
        get:
            description: Provides information about the current authentication status.
            operationId: sessionInfo
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/InfoResponseBody'
                    description: OK response.
                    headers:
                        Gram-Session:
                            description: Session header
                            schema:
                                description: Session header
                                type: string
                        Set-Cookie:
                            description: The authentication session
                            schema:
                                description: The authentication session
                                type: string
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: info auth
            tags:
                - auth
            x-speakeasy-name-override: info
            x-speakeasy-react-hook:
                name: SessionInfo
    /rpc/auth.login:
        get:
            description: Proxies to auth login through speakeasy oidc.
            operationId: authLogin
            parameters:
                - allowEmptyValue: true
                  description: Optional URL to redirect to after successful authentication
                  in: query
                  name: redirect
                  schema:
                    description: Optional URL to redirect to after successful authentication
                    type: string
                - allowEmptyValue: true
                  description: Optional organization name. When set, the organization is created for a new user during the auth callback.
                  in: query
                  name: org_name
                  schema:
                    description: Optional organization name. When set, the organization is created for a new user during the auth callback.
                    type: string
                - allowEmptyValue: true
                  description: Optional email address. Pre-fills the email field on the identity provider's sign-up screen. Never stored.
                  in: query
                  name: email
                  schema:
                    description: Optional email address. Pre-fills the email field on the identity provider's sign-up screen. Never stored.
                    type: string
            responses:
                "307":
                    description: Temporary Redirect response.
                    headers:
                        Location:
                            description: The URL to redirect to after authentication
                            schema:
                                description: The URL to redirect to after authentication
                                type: string
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            summary: login auth
            tags:
                - auth
            x-speakeasy-name-override: login
            x-speakeasy-react-hook:
                disabled: true
    /rpc/auth.logout:
        post:
            description: Logs out the current user by clearing their session.
            operationId: logout
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    description: OK response.
                    headers:
                        Set-Cookie:
                            description: Empty string to clear the session
                            schema:
                                description: Empty string to clear the session
                                type: string
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: logout auth
            tags:
                - auth
            x-speakeasy-name-override: logout
            x-speakeasy-react-hook:
                name: Logout
    /rpc/auth.register:
        post:
            description: Register a new org for a user with their session information.
            operationId: register
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RegisterRequestBody'
                required: true
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: register auth
            tags:
                - auth
            x-speakeasy-name-override: register
            x-speakeasy-react-hook:
                name: Register
    /rpc/auth.switchScopes:
        post:
            description: Switches the authentication scope to a different organization.
            operationId: switchAuthScopes
            parameters:
                - allowEmptyValue: true
                  description: The organization slug to switch scopes
                  in: query
                  name: organization_id
                  schema:
                    description: The organization slug to switch scopes
                    type: string
                - allowEmptyValue: true
                  description: The project id to switch scopes too
                  in: query
                  name: project_id
                  schema:
                    description: The project id to switch scopes too
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    description: OK response.
                    headers:
                        Gram-Session:
                            description: Session header
                            schema:
                                description: Session header
                                type: string
                        Set-Cookie:
                            description: The authentication session
                            schema:
                                description: The authentication session
                                type: string
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: switchScopes auth
            tags:
                - auth
            x-speakeasy-name-override: switchScopes
            x-speakeasy-react-hook:
                name: SwitchScopes
    /rpc/businessMemories.contentScopes:
        get:
            description: List the complete content-scope tree and distinct-memory counts for the active project. Requires organization admin.
            operationId: listBusinessMemoryContentScopes
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListBusinessMemoryContentScopesResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listBusinessMemoryContentScopes businessMemories
            tags:
                - businessMemories
            x-speakeasy-name-override: listContentScopes
            x-speakeasy-react-hook:
                name: ListBusinessMemoryContentScopes
    /rpc/businessMemories.list:
        get:
            description: List memories extracted for the active project. Requires organization admin.
            operationId: listBusinessMemories
            parameters:
                - allowEmptyValue: true
                  description: Cursor for the next result page.
                  in: query
                  name: cursor
                  schema:
                    description: Cursor for the next result page.
                    type: string
                - allowEmptyValue: true
                  description: Exact content-scope tag to match.
                  in: query
                  name: content_scope
                  schema:
                    description: Exact content-scope tag to match.
                    pattern: ^[a-z0-9][a-z0-9:_-]{0,127}$
                    type: string
                - allowEmptyValue: true
                  description: Content-scope namespace to match.
                  in: query
                  name: content_scope_namespace
                  schema:
                    description: Content-scope namespace to match.
                    pattern: ^[a-z0-9][a-z0-9_-]{0,127}$
                    type: string
                - allowEmptyValue: true
                  description: Number of memories to return.
                  in: query
                  name: limit
                  schema:
                    default: 50
                    description: Number of memories to return.
                    format: int64
                    maximum: 200
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListBusinessMemoriesResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listBusinessMemories businessMemories
            tags:
                - businessMemories
            x-speakeasy-name-override: list
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: ListBusinessMemories
    /rpc/businessMemories.search:
        post:
            description: Run semantic search over active memories in the active project. Requires organization admin.
            operationId: searchBusinessMemories
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SearchBusinessMemoriesRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SearchBusinessMemoriesResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: searchBusinessMemories businessMemories
            tags:
                - businessMemories
            x-speakeasy-name-override: search
            x-speakeasy-react-hook:
                name: SearchBusinessMemories
    /rpc/chat.creditUsage:
        get:
            description: Get the total number of chat credits and usage for the current billing period
            operationId: creditUsage
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreditUsageResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: creditUsage chat
            tags:
                - chat
            x-speakeasy-name-override: creditUsage
            x-speakeasy-react-hook:
                name: GetCreditUsage
    /rpc/chat.delete:
        delete:
            description: Soft-delete a chat by its ID
            operationId: deleteChat
            parameters:
                - allowEmptyValue: true
                  description: The ID of the chat to delete
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the chat to delete
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: deleteChat chat
            tags:
                - chat
            x-speakeasy-name-override: delete
    /rpc/chat.generateTitle:
        post:
            description: Read or set a chat's title. Omit `title` to return the current/auto-generated title (titles are generated asynchronously after a completion). Provide `title` to set a manual title that auto-generation will never overwrite; provide an empty `title` to clear the manual title and re-enable auto-generation.
            operationId: generateTitle
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
                - allowEmptyValue: true
                  description: Chat Sessions token header
                  in: header
                  name: Gram-Chat-Session
                  schema:
                    description: Chat Sessions token header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GenerateTitleRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GenerateTitleResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - chat_sessions_token_header_Gram-Chat-Session: []
            summary: generateTitle chat
            tags:
                - chat
            x-speakeasy-name-override: generateTitle
    /rpc/chat.getAssistantSessionSummary:
        get:
            description: Get assistant session activity totals for a time range.
            operationId: getAssistantSessionSummary
            parameters:
                - allowEmptyValue: true
                  description: The assistant whose activity to summarize
                  in: query
                  name: assistant_id
                  required: true
                  schema:
                    description: The assistant whose activity to summarize
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Start of the activity range (ISO 8601)
                  in: query
                  name: from
                  required: true
                  schema:
                    description: Start of the activity range (ISO 8601)
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: End of the activity range (ISO 8601)
                  in: query
                  name: to
                  required: true
                  schema:
                    description: End of the activity range (ISO 8601)
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AssistantSessionSummary'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getAssistantSessionSummary chat
            tags:
                - chat
            x-speakeasy-name-override: getAssistantSessionSummary
            x-speakeasy-react-hook:
                name: AssistantSessionSummary
                type: query
    /rpc/chat.getWorkUnitsTrend:
        get:
            description: 'Aggregate work-units analysis results over time for the project: work done and cost/token efficiency per UTC day.'
            operationId: getWorkUnitsTrend
            parameters:
                - allowEmptyValue: true
                  description: Start of the window (ISO 8601). Defaults to 30 days before `to`.
                  in: query
                  name: from
                  schema:
                    description: Start of the window (ISO 8601). Defaults to 30 days before `to`.
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: End of the window (ISO 8601). Defaults to now.
                  in: query
                  name: to
                  schema:
                    description: End of the window (ISO 8601). Defaults to now.
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/WorkUnitsTrendResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getWorkUnitsTrend chat
            tags:
                - chat
            x-speakeasy-name-override: getWorkUnitsTrend
            x-speakeasy-react-hook:
                name: WorkUnitsTrend
                type: query
    /rpc/chat.list:
        get:
            description: List all chats for a project
            operationId: listChats
            parameters:
                - allowEmptyValue: true
                  description: Search query (searches chat ID, user ID, user name, and title)
                  in: query
                  name: search
                  schema:
                    description: Search query (searches chat ID, user ID, user name, and title)
                    type: string
                - allowEmptyValue: true
                  description: Filter by external user ID
                  in: query
                  name: external_user_id
                  schema:
                    description: Filter by external user ID
                    type: string
                - allowEmptyValue: true
                  description: Filter by Gram user ID
                  in: query
                  name: user_id
                  schema:
                    description: Filter by Gram user ID
                    type: string
                - allowEmptyValue: true
                  description: Filter by agent source. Comma-separated list of exact source values (e.g. 'claude-code,Codex,playground') matched against each session's inferred source; empty for no filter. Use chat.listSources to discover the available values.
                  in: query
                  name: source
                  schema:
                    description: Filter by agent source. Comma-separated list of exact source values (e.g. 'claude-code,Codex,playground') matched against each session's inferred source; empty for no filter. Use chat.listSources to discover the available values.
                    type: string
                - allowEmptyValue: true
                  description: Filter to chats produced by this assistant
                  in: query
                  name: assistant_id
                  schema:
                    description: Filter to chats produced by this assistant
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: When set with assistant_id, list only that assistant's threads whose source_kind matches this value (e.g. 'setup' for onboarding threads). Empty for no filter.
                  in: query
                  name: source_kind
                  schema:
                    description: When set with assistant_id, list only that assistant's threads whose source_kind matches this value (e.g. 'setup' for onboarding threads). Empty for no filter.
                    type: string
                - allowEmptyValue: true
                  description: When set with assistant_id, exclude that assistant's threads whose source_kind matches this value (e.g. 'setup' to hide onboarding threads from runtime views). Empty for no filter.
                  in: query
                  name: exclude_source_kind
                  schema:
                    description: When set with assistant_id, exclude that assistant's threads whose source_kind matches this value (e.g. 'setup' to hide onboarding threads from runtime views). Empty for no filter.
                    type: string
                - allowEmptyValue: true
                  description: 'Filter by whether chat has risk findings: ''true'', ''false'', or empty for no filter.'
                  in: query
                  name: has_risk
                  schema:
                    description: 'Filter by whether chat has risk findings: ''true'', ''false'', or empty for no filter.'
                    enum:
                        - ""
                        - "true"
                        - "false"
                    type: string
                - allowEmptyValue: true
                  description: 'Filter by AI account type: ''team'', ''personal'', or empty for no filter.'
                  in: query
                  name: account_type
                  schema:
                    description: 'Filter by AI account type: ''team'', ''personal'', or empty for no filter.'
                    enum:
                        - ""
                        - team
                        - personal
                    type: string
                - allowEmptyValue: true
                  description: 'Filter by pinned state: ''true'' for pinned chats, ''false'' for unpinned, or empty for no filter.'
                  in: query
                  name: pinned
                  schema:
                    description: 'Filter by pinned state: ''true'' for pinned chats, ''false'' for unpinned, or empty for no filter.'
                    enum:
                        - ""
                        - "true"
                        - "false"
                    type: string
                - allowEmptyValue: true
                  description: Filter to chats with at least this many active risk findings (inclusive). Omit or pass 0 for no threshold.
                  in: query
                  name: min_risk_score
                  schema:
                    description: Filter to chats with at least this many active risk findings (inclusive). Omit or pass 0 for no threshold.
                    format: int64
                    minimum: 0
                    type: integer
                - allowEmptyValue: true
                  description: Filter chats last active after this timestamp (ISO 8601)
                  in: query
                  name: from
                  schema:
                    description: Filter chats last active after this timestamp (ISO 8601)
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: Filter chats last active before this timestamp (ISO 8601)
                  in: query
                  name: to
                  schema:
                    description: Filter chats last active before this timestamp (ISO 8601)
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: Number of results per page
                  in: query
                  name: limit
                  schema:
                    default: 50
                    description: Number of results per page
                    format: int64
                    maximum: 100
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: Pagination offset
                  in: query
                  name: offset
                  schema:
                    default: 0
                    description: Pagination offset
                    format: int64
                    minimum: 0
                    type: integer
                - allowEmptyValue: true
                  description: Field to sort by
                  in: query
                  name: sort_by
                  schema:
                    default: last_message_timestamp
                    description: Field to sort by
                    enum:
                        - last_message_timestamp
                        - num_messages
                    type: string
                - allowEmptyValue: true
                  description: Sort order
                  in: query
                  name: sort_order
                  schema:
                    default: desc
                    description: Sort order
                    enum:
                        - asc
                        - desc
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
                - allowEmptyValue: true
                  description: Chat Sessions token header
                  in: header
                  name: Gram-Chat-Session
                  schema:
                    description: Chat Sessions token header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListChatsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - chat_sessions_token_header_Gram-Chat-Session: []
            summary: listChats chat
            tags:
                - chat
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: ListChats
                type: query
    /rpc/chat.listSources:
        get:
            description: List the distinct agent sources present in this project's chats, for populating the agent-type filter on the Agent Sessions page.
            operationId: listChatSources
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
                - allowEmptyValue: true
                  description: Chat Sessions token header
                  in: header
                  name: Gram-Chat-Session
                  schema:
                    description: Chat Sessions token header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListSourcesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - chat_sessions_token_header_Gram-Chat-Session: []
            summary: listSources chat
            tags:
                - chat
            x-speakeasy-name-override: listSources
            x-speakeasy-react-hook:
                name: ListChatSources
                type: query
    /rpc/chat.load:
        get:
            description: 'Load a chat by its ID. Messages within a generation are paginated by `seq` keyset: omit cursors to receive the newest page, pass `before_seq` to load older messages (scroll up) or `after_seq` to load newer ones (scroll down). Set `from_start` to receive the oldest page (the start of the thread) instead of the newest. Omit `generation` to receive the latest generation. Set `risk_only` to return only messages with risk findings plus a few messages of surrounding context per finding. Set `query` to instead return only messages whose text matches a search query plus surrounding context (mutually exclusive with `risk_only`).'
            operationId: loadChat
            parameters:
                - allowEmptyValue: true
                  description: The ID of the chat
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the chat
                    type: string
                - allowEmptyValue: true
                  description: 'Generation to load. A generation is an immutable snapshot of the chat transcript: a new one is opened whenever the conversation is compacted or an earlier message is edited, while normal turns append to the current generation. Generations are numbered from 0 (oldest) up to `max_generation` (latest). Omit this attribute to receive the latest generation, or page through history by walking from `max_generation` down to 0.'
                  in: query
                  name: generation
                  schema:
                    description: 'Generation to load. A generation is an immutable snapshot of the chat transcript: a new one is opened whenever the conversation is compacted or an earlier message is edited, while normal turns append to the current generation. Generations are numbered from 0 (oldest) up to `max_generation` (latest). Omit this attribute to receive the latest generation, or page through history by walking from `max_generation` down to 0.'
                    format: int64
                    minimum: 0
                    type: integer
                - allowEmptyValue: true
                  description: Maximum number of messages to return for this page.
                  in: query
                  name: limit
                  schema:
                    default: 50
                    description: Maximum number of messages to return for this page.
                    format: int64
                    maximum: 200
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: 'Keyset cursor: return the page of messages with `seq` strictly less than this value (older messages). The returned `messages` are always ordered oldest to newest by `seq`, like every other response. Use the `seq` of the oldest message you currently hold to load the previous page. Ignored when `risk_only` is set. Mutually exclusive with `after_seq`; if both are supplied, `after_seq` takes precedence.'
                  in: query
                  name: before_seq
                  schema:
                    description: 'Keyset cursor: return the page of messages with `seq` strictly less than this value (older messages). The returned `messages` are always ordered oldest to newest by `seq`, like every other response. Use the `seq` of the oldest message you currently hold to load the previous page. Ignored when `risk_only` is set. Mutually exclusive with `after_seq`; if both are supplied, `after_seq` takes precedence.'
                    format: int64
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: 'Keyset cursor: return the page of messages with `seq` strictly greater than this value (newer messages). The returned `messages` are always ordered oldest to newest by `seq`. Use the `seq` of the newest message you currently hold to load the next page. Ignored when `risk_only` is set. Mutually exclusive with `before_seq`; if both are supplied, `after_seq` takes precedence.'
                  in: query
                  name: after_seq
                  schema:
                    description: 'Keyset cursor: return the page of messages with `seq` strictly greater than this value (newer messages). The returned `messages` are always ordered oldest to newest by `seq`. Use the `seq` of the newest message you currently hold to load the next page. Ignored when `risk_only` is set. Mutually exclusive with `before_seq`; if both are supplied, `after_seq` takes precedence.'
                    format: int64
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: When true, return the oldest page of the generation (the start of the thread), ordered oldest to newest, with `has_more_before=false`. Page forward from there with `after_seq`. Ignored when `before_seq`, `after_seq`, or `risk_only` is set.
                  in: query
                  name: from_start
                  schema:
                    default: false
                    description: When true, return the oldest page of the generation (the start of the thread), ordered oldest to newest, with `has_more_before=false`. Page forward from there with `after_seq`. Ignored when `before_seq`, `after_seq`, or `risk_only` is set.
                    type: boolean
                - allowEmptyValue: true
                  description: 'When true, return only messages that have active risk findings, each padded with a fixed window of surrounding messages, grouped into contiguous segments (see `risk_segments`). The flagged messages themselves are marked with `is_risk` on each `ChatMessage` (surrounding context is `is_risk: false`). Cursors are ignored in this mode; expand a segment with a follow-up `before_seq`/`after_seq` request. Mutually exclusive with `query`.'
                  in: query
                  name: risk_only
                  schema:
                    default: false
                    description: 'When true, return only messages that have active risk findings, each padded with a fixed window of surrounding messages, grouped into contiguous segments (see `risk_segments`). The flagged messages themselves are marked with `is_risk` on each `ChatMessage` (surrounding context is `is_risk: false`). Cursors are ignored in this mode; expand a segment with a follow-up `before_seq`/`after_seq` request. Mutually exclusive with `query`.'
                    type: boolean
                - allowEmptyValue: true
                  description: When set (and `risk_only` is false), return only messages whose text matches this query (case-insensitive substring over message text, tool names/arguments, and structured content), each padded with a fixed window of surrounding messages, grouped into contiguous segments (see `match_segments`). Cursors are ignored on the initial request; expand a segment with a follow-up `before_seq`/`after_seq` request. Mutually exclusive with `risk_only`.
                  in: query
                  name: query
                  schema:
                    description: When set (and `risk_only` is false), return only messages whose text matches this query (case-insensitive substring over message text, tool names/arguments, and structured content), each padded with a fixed window of surrounding messages, grouped into contiguous segments (see `match_segments`). Cursors are ignored on the initial request; expand a segment with a follow-up `before_seq`/`after_seq` request. Mutually exclusive with `risk_only`.
                    maxLength: 200
                    minLength: 1
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
                - allowEmptyValue: true
                  description: Chat Sessions token header
                  in: header
                  name: Gram-Chat-Session
                  schema:
                    description: Chat Sessions token header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Chat'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - chat_sessions_token_header_Gram-Chat-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: loadChat chat
            tags:
                - chat
            x-speakeasy-name-override: load
            x-speakeasy-react-hook:
                name: LoadChat
    /rpc/chat.setPinned:
        post:
            description: Pin or unpin a chat. Pinned chats surface in a dedicated section above recents on the chat page.
            operationId: setChatPinned
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetPinnedRequestBody'
                required: true
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: setPinned chat
            tags:
                - chat
            x-speakeasy-name-override: setPinned
    /rpc/chat.submitFeedback:
        post:
            description: Submit user feedback for a chat (success/failure)
            operationId: submitFeedback
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
                - allowEmptyValue: true
                  description: Chat Sessions token header
                  in: header
                  name: Gram-Chat-Session
                  schema:
                    description: Chat Sessions token header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SubmitFeedbackRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CaptureEventResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - chat_sessions_token_header_Gram-Chat-Session: []
            summary: submitFeedback chat
            tags:
                - chat
            x-speakeasy-name-override: submitFeedback
    /rpc/chat.summarize:
        post:
            description: Generate or return a persisted LLM summary of a chat session transcript. When a summary already exists and regenerate is false, returns the cached summary without calling the model.
            operationId: summarizeChat
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SummarizeRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SummarizeChatResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: summarize chat
            tags:
                - chat
            x-speakeasy-name-override: summarize
            x-speakeasy-react-hook:
                name: SummarizeChat
    /rpc/chat.summarizeToolCall:
        post:
            description: Generate or return a persisted two-sentence summary of one tool call. Concurrent requests share the same cached result.
            operationId: summarizeToolCall
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SummarizeToolCallRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SummarizeToolCallResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: summarizeToolCall chat
            tags:
                - chat
            x-speakeasy-name-override: summarizeToolCall
            x-speakeasy-react-hook:
                name: SummarizeToolCall
    /rpc/chatSessions.create:
        post:
            description: Creates a new chat session token
            operationId: createChatSession
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: create chatSessions
            tags:
                - chatSessions
            x-speakeasy-name-override: create
    /rpc/chatSessions.revoke:
        delete:
            description: Revokes an existing chat session token
            operationId: revokeChatSession
            parameters:
                - allowEmptyValue: true
                  description: The chat session token to revoke
                  in: query
                  name: token
                  required: true
                  schema:
                    description: The chat session token to revoke
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: revoke chatSessions
            tags:
                - chatSessions
            x-speakeasy-name-override: revoke
    /rpc/cliAuth.authorize:
        post:
            description: Mint a short-lived one-time code bound to a PKCE code_challenge, on behalf of the authenticated dashboard user. Resolves the target project (given slug, else the org's default/first project) and records {user, org, project, scopes:[agent,hooks], challenge} against the code with a ~5 minute TTL. Requires a member-available session (org:read); NOT org-admin.
            operationId: cliAuthAuthorize
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/AuthorizeRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AuthorizeResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: authorize cliAuth
            tags:
                - cliAuth
            x-speakeasy-name-override: authorize
    /rpc/cliAuth.redeem:
        post:
            description: 'Exchange a one-time code plus its PKCE code_verifier for a freshly minted per-user [agent,hooks] API key. No session or API-key auth: proving knowledge of the code_verifier that matches the stored challenge IS the credential. The code is single-use — consumed atomically on lookup — so any missing/expired/already-consumed code or PKCE mismatch returns 401. The raw key is returned exactly once and never again.'
            operationId: cliAuthRedeem
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RedeemRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RedeemResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            summary: redeem cliAuth
            tags:
                - cliAuth
            x-speakeasy-name-override: redeem
    /rpc/collections.attachServer:
        post:
            description: Attach a server to a collection. Provide exactly one of toolset_id or mcp_server_id.
            operationId: attachServerToCollection
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/AttachServerRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/MCPCollection'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: attachServer collections
            tags:
                - collections
            x-speakeasy-name-override: attachServer
    /rpc/collections.create:
        post:
            description: Create an MCP collection within the organization
            operationId: createCollection
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateRequestBody2'
                required: true
            responses:
                "201":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/MCPCollection'
                    description: Created response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: create collections
            tags:
                - collections
            x-speakeasy-name-override: create
    /rpc/collections.delete:
        delete:
            description: Delete an MCP collection
            operationId: deleteCollection
            parameters:
                - allowEmptyValue: true
                  description: ID of the collection to delete
                  in: query
                  name: collection_id
                  required: true
                  schema:
                    description: ID of the collection to delete
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: delete collections
            tags:
                - collections
            x-speakeasy-name-override: delete
    /rpc/collections.detachServer:
        post:
            description: Detach a server from a collection. Provide exactly one of toolset_id or mcp_server_id.
            operationId: detachServerFromCollection
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/AttachServerRequestBody'
                required: true
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: detachServer collections
            tags:
                - collections
            x-speakeasy-name-override: detachServer
    /rpc/collections.list:
        get:
            description: List MCP collections in the organization
            operationId: listCollections
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: list collections
            tags:
                - collections
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: ListCollections
    /rpc/collections.listServers:
        get:
            description: List published MCP servers from a collection
            operationId: listCollectionServers
            parameters:
                - allowEmptyValue: true
                  description: Slug of the collection to serve
                  in: query
                  name: collection_slug
                  required: true
                  schema:
                    description: Slug of the collection to serve
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListServersResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: listServers collections
            tags:
                - collections
            x-speakeasy-name-override: listServers
    /rpc/collections.update:
        post:
            description: Update an MCP collection
            operationId: updateCollection
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/MCPCollection'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: update collections
            tags:
                - collections
            x-speakeasy-name-override: update
    /rpc/deployments.active:
        get:
            description: Get the active deployment for a project.
            operationId: getActiveDeployment
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetActiveDeploymentResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getActiveDeployment deployments
            tags:
                - deployments
            x-speakeasy-name-override: active
            x-speakeasy-react-hook:
                name: ActiveDeployment
    /rpc/deployments.create:
        post:
            description: Create a deployment to load tool definitions.
            operationId: createDeployment
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
                - allowEmptyValue: true
                  description: A unique identifier that will mitigate against duplicate deployments.
                  example: 01jqq0ajmb4qh9eppz48dejr2m
                  in: header
                  name: Idempotency-Key
                  required: true
                  schema:
                    description: A unique identifier that will mitigate against duplicate deployments.
                    example: 01jqq0ajmb4qh9eppz48dejr2m
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateDeploymentRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateDeploymentResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: createDeployment deployments
            tags:
                - deployments
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: CreateDeployment
    /rpc/deployments.evolve:
        post:
            description: Create a new deployment with additional or updated tool sources.
            operationId: evolveDeployment
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/EvolveForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/EvolveResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: evolve deployments
            tags:
                - deployments
            x-speakeasy-name-override: evolveDeployment
            x-speakeasy-react-hook:
                name: EvolveDeployment
    /rpc/deployments.get:
        get:
            description: Get a deployment by its ID.
            operationId: getDeployment
            parameters:
                - allowEmptyValue: true
                  description: The ID of the deployment
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the deployment
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetDeploymentResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getDeployment deployments
            tags:
                - deployments
            x-speakeasy-name-override: getById
            x-speakeasy-react-hook:
                name: Deployment
    /rpc/deployments.latest:
        get:
            description: Get the latest deployment for a project.
            operationId: getLatestDeployment
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetLatestDeploymentResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getLatestDeployment deployments
            tags:
                - deployments
            x-speakeasy-name-override: latest
            x-speakeasy-react-hook:
                name: LatestDeployment
    /rpc/deployments.list:
        get:
            description: List all deployments in descending order of creation.
            operationId: listDeployments
            parameters:
                - allowEmptyValue: true
                  description: The cursor to fetch results from
                  in: query
                  name: cursor
                  schema:
                    description: The cursor to fetch results from
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListDeploymentResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listDeployments deployments
            tags:
                - deployments
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: ListDeployments
    /rpc/deployments.logs:
        get:
            description: Get logs for a deployment.
            operationId: getDeploymentLogs
            parameters:
                - allowEmptyValue: true
                  description: The ID of the deployment
                  in: query
                  name: deployment_id
                  required: true
                  schema:
                    description: The ID of the deployment
                    type: string
                - allowEmptyValue: true
                  description: The cursor to fetch results from
                  in: query
                  name: cursor
                  schema:
                    description: The cursor to fetch results from
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetDeploymentLogsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getDeploymentLogs deployments
            tags:
                - deployments
            x-speakeasy-name-override: logs
            x-speakeasy-react-hook:
                name: DeploymentLogs
    /rpc/deployments.redeploy:
        post:
            description: Redeploys an existing deployment.
            operationId: redeployDeployment
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RedeployRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RedeployResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: redeploy deployments
            tags:
                - deployments
            x-speakeasy-name-override: redeployDeployment
            x-speakeasy-react-hook:
                name: RedeployDeployment
    /rpc/deviceIntegrations.deleteConfig:
        post:
            description: Disconnect the org-wide device integration for a provider. Synced inventory becomes invisible to coverage; reconnecting starts fresh.
            operationId: deleteDeviceIntegrationConfig
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/DeleteConfigRequestBody'
                required: true
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: deleteConfig deviceIntegrations
            tags:
                - deviceIntegrations
            x-speakeasy-name-override: deleteConfig
            x-speakeasy-react-hook:
                name: DeleteDeviceIntegrationConfig
    /rpc/deviceIntegrations.getConfig:
        get:
            description: Get the org-wide device integration config for a provider. Returns an empty config (enabled=false, has_credentials=false) when none is set.
            operationId: getDeviceIntegrationConfig
            parameters:
                - allowEmptyValue: true
                  description: Provider identifier (e.g. jamf, kandji, drata, vanta).
                  in: query
                  name: provider
                  required: true
                  schema:
                    description: Provider identifier (e.g. jamf, kandji, drata, vanta).
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/DeviceIntegrationConfig'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: getConfig deviceIntegrations
            tags:
                - deviceIntegrations
            x-speakeasy-name-override: getConfig
            x-speakeasy-react-hook:
                name: DeviceIntegrationConfig
    /rpc/deviceIntegrations.getCoverage:
        get:
            description: Summarize agent coverage across the org's connected MDM inventories, optionally scoped to one provider.
            operationId: getDeviceIntegrationCoverage
            parameters:
                - allowEmptyValue: true
                  description: Optionally scope coverage to one provider (e.g. jamf).
                  in: query
                  name: provider
                  schema:
                    description: Optionally scope coverage to one provider (e.g. jamf).
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/DeviceIntegrationCoverage'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: getCoverage deviceIntegrations
            tags:
                - deviceIntegrations
            x-speakeasy-name-override: getCoverage
            x-speakeasy-react-hook:
                name: DeviceIntegrationCoverage
    /rpc/deviceIntegrations.listManagedDevices:
        get:
            description: Page through the org's synced MDM device inventory, newest first, with each device's coverage bucket.
            operationId: listManagedDevices
            parameters:
                - allowEmptyValue: true
                  description: Only devices synced from this provider.
                  in: query
                  name: provider
                  schema:
                    description: Only devices synced from this provider.
                    type: string
                - allowEmptyValue: true
                  description: Only devices in this coverage bucket.
                  in: query
                  name: coverage_bucket
                  schema:
                    description: Only devices in this coverage bucket.
                    enum:
                        - agent_active
                        - agent_stale
                        - agent_other_device
                        - no_agent
                        - no_email
                        - unresolved_email
                        - missing
                    type: string
                - allowEmptyValue: true
                  description: Pagination cursor from a previous page.
                  in: query
                  name: cursor
                  schema:
                    description: Pagination cursor from a previous page.
                    type: string
                - allowEmptyValue: true
                  description: Page size. Defaults to 50, maximum 200.
                  in: query
                  name: limit
                  schema:
                    default: 50
                    description: Page size. Defaults to 50, maximum 200.
                    format: int64
                    maximum: 200
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListManagedDevicesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: listManagedDevices deviceIntegrations
            tags:
                - deviceIntegrations
            x-speakeasy-name-override: listManagedDevices
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: ManagedDevices
    /rpc/deviceIntegrations.listProviders:
        get:
            description: List the providers the device integrations framework supports, including the credential fields each needs.
            operationId: listDeviceIntegrationProviders
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListDeviceIntegrationProvidersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: listProviders deviceIntegrations
            tags:
                - deviceIntegrations
            x-speakeasy-name-override: listProviders
            x-speakeasy-react-hook:
                name: DeviceIntegrationProviders
    /rpc/deviceIntegrations.listSchedules:
        get:
            description: List the sync schedules and their state for a provider's org-wide device integration config. Returns an empty list when no config is set.
            operationId: listDeviceIntegrationSchedules
            parameters:
                - allowEmptyValue: true
                  description: Provider identifier (e.g. jamf, kandji, drata, vanta).
                  in: query
                  name: provider
                  required: true
                  schema:
                    description: Provider identifier (e.g. jamf, kandji, drata, vanta).
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListDeviceIntegrationSchedulesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: listSchedules deviceIntegrations
            tags:
                - deviceIntegrations
            x-speakeasy-name-override: listSchedules
            x-speakeasy-react-hook:
                name: DeviceIntegrationSchedules
    /rpc/deviceIntegrations.retrySchedule:
        post:
            description: Make one sync schedule due immediately, lifting any automatic pause and resetting its failure streak.
            operationId: retryDeviceIntegrationSchedule
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RetryScheduleRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/DeviceIntegrationScheduleState'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: retrySchedule deviceIntegrations
            tags:
                - deviceIntegrations
            x-speakeasy-name-override: retrySchedule
            x-speakeasy-react-hook:
                name: RetryDeviceIntegrationSchedule
    /rpc/deviceIntegrations.setScheduleEnabled:
        post:
            description: Enable or disable one sync schedule of a provider's device integration. Disabling records user intent on the schedule; only re-enabling clears it — config saves do not.
            operationId: setDeviceIntegrationScheduleEnabled
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetScheduleEnabledRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/DeviceIntegrationScheduleState'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: setScheduleEnabled deviceIntegrations
            tags:
                - deviceIntegrations
            x-speakeasy-name-override: setScheduleEnabled
            x-speakeasy-react-hook:
                name: SetDeviceIntegrationScheduleEnabled
    /rpc/deviceIntegrations.testConnection:
        post:
            description: Probe the provider with the stored credentials to verify they work. Save the config first; this tests what is stored, so secrets never round-trip.
            operationId: testDeviceIntegrationConnection
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/DeleteConfigRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/DeviceIntegrationTestConnectionResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: testConnection deviceIntegrations
            tags:
                - deviceIntegrations
            x-speakeasy-name-override: testConnection
            x-speakeasy-react-hook:
                name: TestDeviceIntegrationConnection
    /rpc/deviceIntegrations.upsertConfig:
        post:
            description: 'Create or update the org-wide device integration config for a provider. Omit credentials to keep the stored secrets; supplying credentials rotates them in place and resets the schedules'' sync state. Settings merge per key: an omitted key keeps its stored value, a supplied key overwrites it.'
            operationId: upsertDeviceIntegrationConfig
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpsertConfigRequestBody2'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/DeviceIntegrationConfig'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: upsertConfig deviceIntegrations
            tags:
                - deviceIntegrations
            x-speakeasy-name-override: upsertConfig
            x-speakeasy-react-hook:
                name: UpsertDeviceIntegrationConfig
    /rpc/domain.checkHealth:
        post:
            description: Check the routing and certificate health of the organization's custom domain
            operationId: checkDomainHealth
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CustomDomain'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: checkHealth domains
            tags:
                - domains
            x-speakeasy-name-override: checkHealth
            x-speakeasy-react-hook:
                name: CheckDomainHealth
    /rpc/domain.delete:
        delete:
            description: Delete a custom domain
            operationId: deleteDomain
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: deleteDomain domains
            tags:
                - domains
            x-speakeasy-name-override: deleteDomain
            x-speakeasy-react-hook:
                name: deleteDomain
    /rpc/domain.get:
        get:
            description: Get the custom domain for an organization
            operationId: getDomain
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CustomDomain'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getDomain domains
            tags:
                - domains
            x-speakeasy-name-override: getDomain
            x-speakeasy-react-hook:
                name: getDomain
    /rpc/domain.list:
        get:
            description: List the custom domains for an organization. The result is empty when no custom domain has been configured.
            operationId: listDomains
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListCustomDomainsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listDomains domains
            tags:
                - domains
            x-speakeasy-name-override: listDomains
            x-speakeasy-react-hook:
                name: listDomains
    /rpc/domain.listMcpEndpoints:
        get:
            description: List the MCP endpoints registered under the organization's custom domain across every project. Returns enriched rows that include the parent MCP server and project so callers can preview what a custom-domain deletion would cascade through.
            operationId: listCustomDomainMcpEndpoints
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListCustomDomainMcpEndpointsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listMcpEndpoints domains
            tags:
                - domains
            x-speakeasy-name-override: listMcpEndpoints
            x-speakeasy-react-hook:
                name: CustomDomainMcpEndpoints
    /rpc/domain.register:
        post:
            description: Create a custom domain for an organization
            operationId: registerDomain
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateDomainRequestBody'
                required: true
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: createDomain domains
            tags:
                - domains
            x-speakeasy-name-override: registerDomain
            x-speakeasy-react-hook:
                name: registerDomain
    /rpc/domain.setRootMcpEndpoint:
        post:
            description: Set or clear the MCP endpoint mapped to a custom domain's root
            operationId: setRootMcpEndpoint
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetRootMcpEndpointRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CustomDomain'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: setRootMcpEndpoint domains
            tags:
                - domains
            x-speakeasy-name-override: setRootMcpEndpoint
            x-speakeasy-react-hook:
                name: SetRootMcpEndpoint
    /rpc/domain.update:
        post:
            description: Update settings for the organization's custom domain
            operationId: updateDomain
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateDomainRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CustomDomain'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: updateDomain domains
            tags:
                - domains
            x-speakeasy-name-override: updateDomain
            x-speakeasy-react-hook:
                name: updateDomain
    /rpc/environments.clone:
        post:
            description: Clone an environment into a new one. Either copies only the variable names with empty placeholder values, or copies the encrypted values verbatim. Encrypted secret values are never decrypted by the application during the clone operation.
            operationId: cloneEnvironment
            parameters:
                - allowEmptyValue: true
                  description: The slug of the source environment to clone
                  in: query
                  name: slug
                  required: true
                  schema:
                    description: A short url-friendly label that uniquely identifies a resource.
                    maxLength: 40
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CloneEnvironmentRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Environment'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: cloneEnvironment environments
            tags:
                - environments
            x-speakeasy-name-override: clone
            x-speakeasy-react-hook:
                name: CloneEnvironment
    /rpc/environments.create:
        post:
            description: Create a new environment
            operationId: createEnvironment
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateEnvironmentForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Environment'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: createEnvironment environments
            tags:
                - environments
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: CreateEnvironment
    /rpc/environments.delete:
        delete:
            description: Delete an environment
            operationId: deleteEnvironment
            parameters:
                - allowEmptyValue: true
                  description: The slug of the environment to delete
                  in: query
                  name: slug
                  required: true
                  schema:
                    description: A short url-friendly label that uniquely identifies a resource.
                    maxLength: 40
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: deleteEnvironment environments
            tags:
                - environments
            x-speakeasy-name-override: deleteBySlug
            x-speakeasy-react-hook:
                name: DeleteEnvironment
    /rpc/environments.deleteSourceLink:
        delete:
            description: Delete a link between a source and an environment
            operationId: deleteSourceEnvironmentLink
            parameters:
                - allowEmptyValue: true
                  description: The kind of source (http or function)
                  in: query
                  name: source_kind
                  required: true
                  schema:
                    description: The kind of source that can be linked to an environment
                    enum:
                        - http
                        - function
                    type: string
                - allowEmptyValue: true
                  description: The slug of the source
                  in: query
                  name: source_slug
                  required: true
                  schema:
                    description: The slug of the source
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: deleteSourceEnvironmentLink environments
            tags:
                - environments
            x-speakeasy-name-override: deleteSourceLink
            x-speakeasy-react-hook:
                name: DeleteSourceEnvironmentLink
    /rpc/environments.deleteToolsetLink:
        delete:
            description: Delete a link between a toolset and an environment
            operationId: deleteToolsetEnvironmentLink
            parameters:
                - allowEmptyValue: true
                  description: The ID of the toolset
                  in: query
                  name: toolset_id
                  required: true
                  schema:
                    description: The ID of the toolset
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: deleteToolsetEnvironmentLink environments
            tags:
                - environments
            x-speakeasy-name-override: deleteToolsetLink
            x-speakeasy-react-hook:
                name: DeleteToolsetEnvironmentLink
    /rpc/environments.getSourceEnvironment:
        get:
            description: Get the environment linked to a source
            operationId: getSourceEnvironment
            parameters:
                - allowEmptyValue: true
                  description: The kind of source (http or function)
                  in: query
                  name: source_kind
                  required: true
                  schema:
                    description: The kind of source that can be linked to an environment
                    enum:
                        - http
                        - function
                    type: string
                - allowEmptyValue: true
                  description: The slug of the source
                  in: query
                  name: source_slug
                  required: true
                  schema:
                    description: The slug of the source
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Environment'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getSourceEnvironment environments
            tags:
                - environments
            x-speakeasy-name-override: getBySource
            x-speakeasy-react-hook:
                name: GetSourceEnvironment
    /rpc/environments.getToolsetEnvironment:
        get:
            description: Get the environment linked to a toolset
            operationId: getToolsetEnvironment
            parameters:
                - allowEmptyValue: true
                  description: The ID of the toolset
                  in: query
                  name: toolset_id
                  required: true
                  schema:
                    description: The ID of the toolset
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Environment'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getToolsetEnvironment environments
            tags:
                - environments
            x-speakeasy-name-override: getByToolset
            x-speakeasy-react-hook:
                name: GetToolsetEnvironment
    /rpc/environments.list:
        get:
            description: List all environments for an organization
            operationId: listEnvironments
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListEnvironmentsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listEnvironments environments
            tags:
                - environments
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: ListEnvironments
    /rpc/environments.setSourceLink:
        put:
            description: Set (upsert) a link between a source and an environment
            operationId: setSourceEnvironmentLink
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetSourceEnvironmentLinkRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SourceEnvironmentLink'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: setSourceEnvironmentLink environments
            tags:
                - environments
            x-speakeasy-name-override: setSourceLink
            x-speakeasy-react-hook:
                name: SetSourceEnvironmentLink
    /rpc/environments.setToolsetLink:
        put:
            description: Set (upsert) a link between a toolset and an environment
            operationId: setToolsetEnvironmentLink
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetToolsetEnvironmentLinkRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ToolsetEnvironmentLink'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: setToolsetEnvironmentLink environments
            tags:
                - environments
            x-speakeasy-name-override: setToolsetLink
            x-speakeasy-react-hook:
                name: SetToolsetEnvironmentLink
    /rpc/environments.update:
        post:
            description: Update an environment
            operationId: updateEnvironment
            parameters:
                - allowEmptyValue: true
                  description: The slug of the environment to update
                  in: query
                  name: slug
                  required: true
                  schema:
                    description: A short url-friendly label that uniquely identifies a resource.
                    maxLength: 40
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateEnvironmentRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Environment'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: updateEnvironment environments
            tags:
                - environments
            x-speakeasy-name-override: updateBySlug
            x-speakeasy-react-hook:
                name: UpdateEnvironment
    /rpc/external.receiveWorkOSWebhook:
        post:
            description: Receive and enqueue a WorkOS webhook event.
            operationId: receiveWorkOSWebhook
            parameters:
                - allowEmptyValue: true
                  description: WorkOS webhook signature header
                  in: header
                  name: WorkOS-Signature
                  schema:
                    description: WorkOS webhook signature header
                    type: string
            responses:
                "204":
                    description: No Content response.
            summary: receiveWorkOSWebhook external
            tags:
                - external
            x-speakeasy-name-override: receiveWorkOSWebhook
            x-speakeasy-react-hook:
                disabled: true
    /rpc/externalCredentials.createAwsIam:
        post:
            description: Create an AWS IAM external credential. Requires org:admin.
            operationId: createAwsIamCredential
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateAwsIamCredentialForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AwsIamCredential'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: createAwsIamCredential externalCredentials
            tags:
                - externalCredentials
            x-speakeasy-name-override: createAwsIam
            x-speakeasy-react-hook:
                name: CreateAwsIamCredential
    /rpc/externalCredentials.createGcpIam:
        post:
            description: Create a GCP IAM external credential. Requires org:admin.
            operationId: createGcpIamCredential
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateGcpIamCredentialForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GcpIamCredential'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: createGcpIamCredential externalCredentials
            tags:
                - externalCredentials
            x-speakeasy-name-override: createGcpIam
            x-speakeasy-react-hook:
                name: CreateGcpIamCredential
    /rpc/externalCredentials.deleteAwsIam:
        delete:
            description: Soft-delete an AWS IAM external credential by ID. Requires org:admin. Refused with a conflict while any live external key still names the credential, since deleting it would leave those keys unable to reach the key material they sign with.
            operationId: deleteAwsIamCredential
            parameters:
                - allowEmptyValue: true
                  description: The ID of the credential to delete.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the credential to delete.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: deleteAwsIamCredential externalCredentials
            tags:
                - externalCredentials
            x-speakeasy-name-override: deleteAwsIam
            x-speakeasy-react-hook:
                name: DeleteAwsIamCredential
    /rpc/externalCredentials.deleteGcpIam:
        delete:
            description: Soft-delete a GCP IAM external credential by ID. Requires org:admin. Refused with a conflict while any live external key still names the credential, since deleting it would leave those keys unable to reach the key material they sign with.
            operationId: deleteGcpIamCredential
            parameters:
                - allowEmptyValue: true
                  description: The ID of the credential to delete.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the credential to delete.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: deleteGcpIamCredential externalCredentials
            tags:
                - externalCredentials
            x-speakeasy-name-override: deleteGcpIam
            x-speakeasy-react-hook:
                name: DeleteGcpIamCredential
    /rpc/externalCredentials.getAwsIam:
        get:
            description: Get an AWS IAM external credential by ID. Requires org:read.
            operationId: getAwsIamCredential
            parameters:
                - allowEmptyValue: true
                  description: The ID of the credential to get.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the credential to get.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AwsIamCredential'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getAwsIamCredential externalCredentials
            tags:
                - externalCredentials
            x-speakeasy-name-override: getAwsIam
            x-speakeasy-react-hook:
                name: GetAwsIamCredential
    /rpc/externalCredentials.getGcpIam:
        get:
            description: Get a GCP IAM external credential by ID. Requires org:read.
            operationId: getGcpIamCredential
            parameters:
                - allowEmptyValue: true
                  description: The ID of the credential to get.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the credential to get.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GcpIamCredential'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getGcpIamCredential externalCredentials
            tags:
                - externalCredentials
            x-speakeasy-name-override: getGcpIam
            x-speakeasy-react-hook:
                name: GetGcpIamCredential
    /rpc/externalCredentials.getGcpSetupInfo:
        get:
            description: Report what the customer must grant in their own GCP project before Gram can impersonate a service account there. Readable before any credential exists, since impersonation is a precondition of creating one. Requires org:read.
            operationId: getGcpSetupInfo
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GcpSetupInfo'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getGcpSetupInfo externalCredentials
            tags:
                - externalCredentials
            x-speakeasy-name-override: getGcpSetupInfo
            x-speakeasy-react-hook:
                name: GcpSetupInfo
    /rpc/externalCredentials.list:
        get:
            description: List the organization's external credentials (provider-independent summary). Optionally filter by provider. Requires org:read.
            operationId: listExternalCredentials
            parameters:
                - allowEmptyValue: true
                  description: Only return credentials for this provider.
                  in: query
                  name: provider
                  schema:
                    description: Only return credentials for this provider.
                    enum:
                        - aws_iam
                        - gcp_iam
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListExternalCredentialsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listExternalCredentials externalCredentials
            tags:
                - externalCredentials
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: ListExternalCredentials
    /rpc/externalCredentials.listAwsIam:
        get:
            description: List the organization's AWS IAM external credentials. Requires org:read.
            operationId: listAwsIamCredentials
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListExternalCredentialsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listAwsIamCredentials externalCredentials
            tags:
                - externalCredentials
            x-speakeasy-name-override: listAwsIam
            x-speakeasy-react-hook:
                name: ListAwsIamCredentials
    /rpc/externalCredentials.listGcpIam:
        get:
            description: List the organization's GCP IAM external credentials. Requires org:read.
            operationId: listGcpIamCredentials
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListExternalCredentialsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listGcpIamCredentials externalCredentials
            tags:
                - externalCredentials
            x-speakeasy-name-override: listGcpIam
            x-speakeasy-react-hook:
                name: ListGcpIamCredentials
    /rpc/externalCredentials.updateAwsIam:
        post:
            description: Replace an AWS IAM external credential's configuration. Requires org:admin.
            operationId: updateAwsIamCredential
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateAwsIamCredentialRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AwsIamCredential'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: updateAwsIamCredential externalCredentials
            tags:
                - externalCredentials
            x-speakeasy-name-override: updateAwsIam
            x-speakeasy-react-hook:
                name: UpdateAwsIamCredential
    /rpc/externalCredentials.updateGcpIam:
        post:
            description: Replace a GCP IAM external credential's configuration. Requires org:admin.
            operationId: updateGcpIamCredential
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateGcpIamCredentialRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GcpIamCredential'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: updateGcpIamCredential externalCredentials
            tags:
                - externalCredentials
            x-speakeasy-name-override: updateGcpIam
            x-speakeasy-react-hook:
                name: UpdateGcpIamCredential
    /rpc/externalCredentials.verifyGcpIam:
        post:
            description: 'Probe that Gram can impersonate the service account a GCP IAM credential names, and report the principal it resolves to. Ephemeral: nothing is persisted. Rate limited per organization. Requires org:admin.'
            operationId: verifyGcpIamCredential
            parameters:
                - allowEmptyValue: true
                  description: The ID of the credential to verify.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the credential to verify.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/VerifyCredentialResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "429":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'rate_limit_exceeded: rate limit exceeded'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: verifyGcpIamCredential externalCredentials
            tags:
                - externalCredentials
            x-speakeasy-name-override: verifyGcpIam
            x-speakeasy-react-hook:
                name: VerifyGcpIamCredential
    /rpc/externalKeys.createAwsKms:
        post:
            description: Create an AWS KMS external key. Requires org:admin.
            operationId: createAwsKmsKey
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateAwsKmsKeyForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AwsKmsKey'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: createAwsKmsKey externalKeys
            tags:
                - externalKeys
            x-speakeasy-name-override: createAwsKms
            x-speakeasy-react-hook:
                name: CreateAwsKmsKey
    /rpc/externalKeys.createGcpKms:
        post:
            description: Create a GCP KMS external key. Requires org:admin.
            operationId: createGcpKmsKey
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateGcpKmsKeyForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GcpKmsKey'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: createGcpKmsKey externalKeys
            tags:
                - externalKeys
            x-speakeasy-name-override: createGcpKms
            x-speakeasy-react-hook:
                name: CreateGcpKmsKey
    /rpc/externalKeys.deleteAwsKms:
        delete:
            description: Soft-delete an AWS KMS external key by ID. Requires org:admin. Refused with a conflict while any JSON Web Key Set or published JSON Web Key still references the key, since deleting it would break verification for every already-published kid.
            operationId: deleteAwsKmsKey
            parameters:
                - allowEmptyValue: true
                  description: The ID of the key to delete.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the key to delete.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: deleteAwsKmsKey externalKeys
            tags:
                - externalKeys
            x-speakeasy-name-override: deleteAwsKms
            x-speakeasy-react-hook:
                name: DeleteAwsKmsKey
    /rpc/externalKeys.deleteGcpKms:
        delete:
            description: Soft-delete a GCP KMS external key by ID. Requires org:admin. Refused with a conflict while any JSON Web Key Set or published JSON Web Key still references the key, since deleting it would break verification for every already-published kid.
            operationId: deleteGcpKmsKey
            parameters:
                - allowEmptyValue: true
                  description: The ID of the key to delete.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the key to delete.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: deleteGcpKmsKey externalKeys
            tags:
                - externalKeys
            x-speakeasy-name-override: deleteGcpKms
            x-speakeasy-react-hook:
                name: DeleteGcpKmsKey
    /rpc/externalKeys.getAwsKms:
        get:
            description: Get an AWS KMS external key by ID. Requires org:read.
            operationId: getAwsKmsKey
            parameters:
                - allowEmptyValue: true
                  description: The ID of the key to get.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the key to get.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AwsKmsKey'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getAwsKmsKey externalKeys
            tags:
                - externalKeys
            x-speakeasy-name-override: getAwsKms
            x-speakeasy-react-hook:
                name: GetAwsKmsKey
    /rpc/externalKeys.getGcpKms:
        get:
            description: Get a GCP KMS external key by ID. Requires org:read.
            operationId: getGcpKmsKey
            parameters:
                - allowEmptyValue: true
                  description: The ID of the key to get.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the key to get.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GcpKmsKey'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getGcpKmsKey externalKeys
            tags:
                - externalKeys
            x-speakeasy-name-override: getGcpKms
            x-speakeasy-react-hook:
                name: GetGcpKmsKey
    /rpc/externalKeys.list:
        get:
            description: List the organization's external keys (provider-independent summary). Optionally filter by provider. Requires org:read.
            operationId: listExternalKeys
            parameters:
                - allowEmptyValue: true
                  description: Only return keys for this provider.
                  in: query
                  name: provider
                  schema:
                    description: Only return keys for this provider.
                    enum:
                        - aws_kms
                        - gcp_kms
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListExternalKeysResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listExternalKeys externalKeys
            tags:
                - externalKeys
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: ListExternalKeys
    /rpc/externalKeys.listAwsKms:
        get:
            description: List the organization's AWS KMS external keys. Requires org:read.
            operationId: listAwsKmsKeys
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListExternalKeysResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listAwsKmsKeys externalKeys
            tags:
                - externalKeys
            x-speakeasy-name-override: listAwsKms
            x-speakeasy-react-hook:
                name: ListAwsKmsKeys
    /rpc/externalKeys.listGcpKms:
        get:
            description: List the organization's GCP KMS external keys. Requires org:read.
            operationId: listGcpKmsKeys
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListExternalKeysResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listGcpKmsKeys externalKeys
            tags:
                - externalKeys
            x-speakeasy-name-override: listGcpKms
            x-speakeasy-react-hook:
                name: ListGcpKmsKeys
    /rpc/externalKeys.updateAwsKms:
        post:
            description: 'Update an AWS KMS external key''s name, backing credential and customer grant reference. Requires org:admin. These three fields are replaced, not patched: omitting the optional customer_grant_reference clears it. The key ARN and algorithm are immutable: an external key identifies exactly one signable key permanently, so changing what the key is means deleting it and creating a new one. The backing credential stays editable because repairing the path to a key does not change the key material Gram signs with.'
            operationId: updateAwsKmsKey
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateAwsKmsKeyRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AwsKmsKey'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: updateAwsKmsKey externalKeys
            tags:
                - externalKeys
            x-speakeasy-name-override: updateAwsKms
            x-speakeasy-react-hook:
                name: UpdateAwsKmsKey
    /rpc/externalKeys.updateGcpKms:
        post:
            description: 'Update a GCP KMS external key''s name, backing credential and customer grant reference. Requires org:admin. These three fields are replaced, not patched: omitting the optional customer_grant_reference clears it. The resource name and algorithm are immutable: an external key identifies exactly one signable crypto key version permanently, so changing what the key is means deleting it and creating a new one. The backing credential stays editable because repairing the path to a key does not change the key material Gram signs with.'
            operationId: updateGcpKmsKey
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateGcpKmsKeyRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GcpKmsKey'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: updateGcpKmsKey externalKeys
            tags:
                - externalKeys
            x-speakeasy-name-override: updateGcpKms
            x-speakeasy-react-hook:
                name: UpdateGcpKmsKey
    /rpc/externalKeys.verifyGcpKms:
        post:
            description: 'Probe that Gram can reach a GCP KMS external key through its backing credential and use it to sign: read the key''s public half, confirm its algorithm matches the one recorded, sign a probe digest, and verify that signature locally against the public half. Performs a real signing operation, which is billed to the key''s owner and lands in their Cloud Audit Log. Ephemeral: nothing is persisted. Rate limited per organization. Requires org:admin.'
            operationId: verifyGcpKmsKey
            parameters:
                - allowEmptyValue: true
                  description: The ID of the key to verify.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the key to verify.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/VerifyKmsKeyResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "429":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'rate_limit_exceeded: rate limit exceeded'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: verifyGcpKmsKey externalKeys
            tags:
                - externalKeys
            x-speakeasy-name-override: verifyGcpKms
            x-speakeasy-react-hook:
                name: VerifyGcpKmsKey
    /rpc/hooks.claude:
        post:
            tags:
                - hooks
            summary: claude hooks
            description: Unified endpoint for all Claude Code hook events. Handles SessionStart, PreToolUse, PostToolUse, and PostToolUseFailure.
            operationId: hooks#claude
            parameters:
                - name: Gram-Key
                  in: header
                  description: Optional API key for plugin-driven attribution.
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: Optional API key for plugin-driven attribution.
                - name: Gram-Project
                  in: header
                  description: Optional project slug for plugin-driven attribution.
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: Optional project slug for plugin-driven attribution.
                - name: X-Gram-Hook-Hostname
                  in: header
                  description: Optional endpoint hostname supplied by the Gram hook plugin.
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: Optional endpoint hostname supplied by the Gram hook plugin.
                - name: Idempotency-Key
                  in: header
                  description: Optional per-invocation token reused across retries so the server stores a redelivered event exactly once.
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: Optional per-invocation token reused across retries so the server stores a redelivered event exactly once.
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/ClaudeHookPayload'
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ClaudeHookResult'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
    /rpc/hooks.codex:
        post:
            tags:
                - hooks
            summary: codex hooks
            description: Endpoint for Codex hook events. Handles SessionStart, PreToolUse, PermissionRequest, PostToolUse, UserPromptSubmit, and Stop.
            operationId: hooks#codex
            parameters:
                - name: Gram-Key
                  in: header
                  description: API Key header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: API Key header
                - name: Gram-Project
                  in: header
                  description: project header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: project header
                - name: X-Gram-Hook-Hostname
                  in: header
                  description: Optional endpoint hostname supplied by the Gram hook plugin.
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: Optional endpoint hostname supplied by the Gram hook plugin.
                - name: Idempotency-Key
                  in: header
                  description: Optional per-invocation token reused across retries so the server stores a redelivered event exactly once.
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: Optional per-invocation token reused across retries so the server stores a redelivered event exactly once.
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CodexHookPayload'
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CodexHookResult'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
    /rpc/hooks.cursor:
        post:
            tags:
                - hooks
            summary: cursor hooks
            description: Endpoint for Cursor hook events. Handles beforeSubmitPrompt, stop, afterAgentResponse, afterAgentThought, preToolUse, postToolUse, postToolUseFailure, beforeMCPExecution, and afterMCPExecution.
            operationId: hooks#cursor
            parameters:
                - name: Gram-Key
                  in: header
                  description: API Key header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: API Key header
                - name: Gram-Project
                  in: header
                  description: project header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: project header
                - name: X-Gram-Hook-Hostname
                  in: header
                  description: Optional endpoint hostname supplied by the Gram hook plugin.
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: Optional endpoint hostname supplied by the Gram hook plugin.
                - name: Idempotency-Key
                  in: header
                  description: Optional per-invocation token reused across retries so the server stores a redelivered event exactly once.
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: Optional per-invocation token reused across retries so the server stores a redelivered event exactly once.
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CursorHookPayload'
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CursorHookResult'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
    /rpc/hooks.deleteServerNameOverride:
        post:
            tags:
                - hooksServerNames
            summary: delete hooksServerNames
            description: Delete a server name display override
            operationId: deleteServerNameOverride
            parameters:
                - name: Gram-Key
                  in: header
                  description: API Key header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: API Key header
                - name: Gram-Session
                  in: header
                  description: Session header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: Session header
                - name: Gram-Project
                  in: header
                  description: project header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: project header
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/DeleteRequestBody'
            responses:
                "204":
                    description: No Content response.
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
    /rpc/hooks.ingest:
        post:
            description: Feature-first unified endpoint for hook events from supported coding assistants.
            operationId: ingestHookEvent
            parameters:
                - allowEmptyValue: true
                  description: Optional API key for plugin-driven attribution.
                  in: header
                  name: Gram-Key
                  schema:
                    description: Optional API key for plugin-driven attribution.
                    type: string
                - allowEmptyValue: true
                  description: Optional project slug for plugin-driven attribution.
                  in: header
                  name: Gram-Project
                  schema:
                    description: Optional project slug for plugin-driven attribution.
                    type: string
                - allowEmptyValue: true
                  description: Optional per-invocation token reused across retries so the server stores a redelivered event exactly once.
                  in: header
                  name: Idempotency-Key
                  schema:
                    description: Optional per-invocation token reused across retries so the server stores a redelivered event exactly once.
                    type: string
                - allowEmptyValue: true
                  description: Set when the event is redelivered from a device's offline spool after control-plane downtime, under its original Idempotency-Key and occurred_at.
                  in: header
                  name: X-Gram-Replayed
                  schema:
                    description: Set when the event is redelivered from a device's offline spool after control-plane downtime, under its original Idempotency-Key and occurred_at.
                    type: boolean
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/IngestRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/IngestHookResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            summary: ingest hooks
            tags:
                - hooks
            x-speakeasy-name-override: ingest
            x-speakeasy-react-hook:
                name: IngestHookEvent
    /rpc/hooks.listServerNameOverrides:
        get:
            tags:
                - hooksServerNames
            summary: list hooksServerNames
            description: List all server name display overrides for a project
            operationId: listServerNameOverrides
            parameters:
                - name: Gram-Key
                  in: header
                  description: API Key header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: API Key header
                - name: Gram-Session
                  in: header
                  description: Session header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: Session header
                - name: Gram-Project
                  in: header
                  description: project header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: project header
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                type: array
                                items:
                                    $ref: '#/components/schemas/ServerNameOverride'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
    /rpc/hooks.otel/v1/logs:
        post:
            tags:
                - hooks
            summary: logs hooks
            description: Endpoint to receive OTEL logs data from Claude Code. Requires API key authentication.
            operationId: hooks#logs
            parameters:
                - name: Gram-Key
                  in: header
                  description: API Key header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: API Key header
                - name: Gram-Project
                  in: header
                  description: project header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: project header
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/OTELLogsPayload'
            responses:
                "202":
                    description: Accepted response.
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
    /rpc/hooks.otel/v1/metrics:
        post:
            tags:
                - hooks
            summary: metrics hooks
            description: Endpoint to receive OTEL metrics data from Claude Code. Requires API key authentication.
            operationId: hooks#metrics
            parameters:
                - name: Gram-Key
                  in: header
                  description: API Key header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: API Key header
                - name: Gram-Project
                  in: header
                  description: project header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: project header
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/OTELMetricsPayload'
            responses:
                "202":
                    description: Accepted response.
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
    /rpc/hooks.skillFeedback:
        post:
            description: Records agent-volunteered feedback about a distributed skill.
            operationId: skillFeedback
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SkillFeedbackPayload'
                required: true
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: skillFeedback hooks
            tags:
                - hooks
            x-speakeasy-name-override: skillFeedback
    /rpc/hooks.uploadSkillContent:
        post:
            description: Uploads skill manifest content requested by the unified hook ingest endpoint.
            operationId: uploadSkillContent
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UploadSkillContentPayload'
                required: true
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: uploadSkillContent hooks
            tags:
                - hooks
            x-speakeasy-name-override: uploadSkillContent
    /rpc/hooks.upsertServerNameOverride:
        post:
            tags:
                - hooksServerNames
            summary: upsert hooksServerNames
            description: Create or update a server name display override
            operationId: upsertServerNameOverride
            parameters:
                - name: Gram-Key
                  in: header
                  description: API Key header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: API Key header
                - name: Gram-Session
                  in: header
                  description: Session header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: Session header
                - name: Gram-Project
                  in: header
                  description: project header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: project header
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpsertRequestBody'
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ServerNameOverride'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
    /rpc/instances.get:
        get:
            description: Load all relevant data for an instance of a toolset and environment
            operationId: getInstance
            parameters:
                - allowEmptyValue: true
                  description: The slug of the toolset to load
                  in: query
                  name: toolset_slug
                  required: true
                  schema:
                    description: A short url-friendly label that uniquely identifies a resource.
                    maxLength: 40
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Chat Sessions token header
                  in: header
                  name: Gram-Chat-Session
                  schema:
                    description: Chat Sessions token header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetInstanceResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - chat_sessions_token_header_Gram-Chat-Session: []
            summary: getInstance instances
            tags:
                - instances
            x-speakeasy-name-override: getBySlug
            x-speakeasy-react-hook:
                name: Instance
    /rpc/integrations.get:
        get:
            tags:
                - integrations
            summary: get integrations
            description: Get a third-party integration by ID or name.
            operationId: integrations#get
            parameters:
                - name: id
                  in: query
                  description: The ID of the integration to get (refers to a package id).
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: The ID of the integration to get (refers to a package id).
                - name: name
                  in: query
                  description: The name of the integration to get (refers to a package name).
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: The name of the integration to get (refers to a package name).
                - name: Gram-Session
                  in: header
                  description: Session header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: Session header
                - name: Gram-Project
                  in: header
                  description: project header
                  allowEmptyValue: true
                  schema:
                    type: string
                    description: project header
            responses:
                "200":
                    description: OK response.
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetIntegrationResult'
                "400":
                    description: 'bad_request: request is invalid'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "401":
                    description: 'unauthorized: unauthorized access'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "403":
                    description: 'forbidden: permission denied'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "404":
                    description: 'not_found: resource not found'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "409":
                    description: 'conflict: resource already exists'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "415":
                    description: 'unsupported_media: unsupported media type'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "422":
                    description: 'invalid: request contains one or more invalidation fields'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "500":
                    description: 'unexpected: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                "502":
                    description: 'gateway_error: an unexpected error occurred'
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
    /rpc/integrations.list:
        get:
            description: List available third-party integrations.
            operationId: listIntegrations
            parameters:
                - allowEmptyValue: true
                  description: Keywords to filter integrations by
                  in: query
                  name: keywords
                  schema:
                    description: Keywords to filter integrations by
                    items:
                        maxLength: 20
                        type: string
                    type: array
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListIntegrationsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: list integrations
            tags:
                - integrations
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: ListIntegrations
    /rpc/keys.create:
        post:
            description: Create a new api key
            operationId: createAPIKey
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateKeyForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Key'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: createKey keys
            tags:
                - keys
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: CreateAPIKey
    /rpc/keys.list:
        get:
            description: List all api keys for an organization
            operationId: listAPIKeys
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListKeysResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listKeys keys
            tags:
                - keys
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: ListAPIKeys
    /rpc/keys.revoke:
        delete:
            description: Revoke a api key
            operationId: revokeAPIKey
            parameters:
                - allowEmptyValue: true
                  description: The ID of the key to revoke
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the key to revoke
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: revokeKey keys
            tags:
                - keys
            x-speakeasy-name-override: revokeById
            x-speakeasy-react-hook:
                name: RevokeAPIKey
    /rpc/keys.verify:
        get:
            description: Verify an api key
            operationId: validateAPIKey
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ValidateKeyResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
            summary: verifyKey keys
            tags:
                - keys
            x-speakeasy-name-override: validate
            x-speakeasy-react-hook:
                name: ValidateAPIKey
    /rpc/litellm.createInstance:
        post:
            description: Provision a LiteLLM integration for a project and return its plaintext ingestion key once. Requires org:admin.
            operationId: createLiteLLMInstance
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateInstanceRequestBody'
                required: true
            responses:
                "201":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/LitellmInstanceKeyResult'
                    description: Created response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: createInstance litellm
            tags:
                - litellm
            x-speakeasy-name-override: createInstance
            x-speakeasy-react-hook:
                name: CreateLiteLLMInstance
    /rpc/litellm.ingest/beta/litellm_basic_guardrail_api:
        post:
            description: Evaluates and captures a LiteLLM model request before it reaches the provider.
            operationId: ingestLiteLLMGuardrail
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/IngestRequestBody2'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/LitellmIngestResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: ingest litellm
            tags:
                - litellm
            x-speakeasy-name-override: ingestGuardrail
            x-speakeasy-react-hook:
                disabled: true
    /rpc/litellm.listInstances:
        get:
            description: List active and revoked LiteLLM integrations for a project. Plaintext keys are never returned. Requires org:admin.
            operationId: listLiteLLMInstances
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListInstancesResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listInstances litellm
            tags:
                - litellm
            x-speakeasy-name-override: listInstances
            x-speakeasy-react-hook:
                name: LiteLLMInstances
    /rpc/litellm.revokeInstance:
        delete:
            description: Revoke a LiteLLM integration and immediately invalidate its active key. Requires org:admin.
            operationId: revokeLiteLLMInstance
            parameters:
                - allowEmptyValue: true
                  in: query
                  name: id
                  required: true
                  schema:
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: revokeInstance litellm
            tags:
                - litellm
            x-speakeasy-name-override: revokeInstance
            x-speakeasy-react-hook:
                name: RevokeLiteLLMInstance
    /rpc/litellm.rotateInstanceKey:
        post:
            description: Atomically replace a LiteLLM integration key and return the new plaintext value once. Requires org:admin.
            operationId: rotateLiteLLMInstanceKey
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RiskIDRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/LitellmInstanceKeyResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: rotateInstanceKey litellm
            tags:
                - litellm
            x-speakeasy-name-override: rotateInstanceKey
            x-speakeasy-react-hook:
                name: RotateLiteLLMInstanceKey
    /rpc/mcpApproval.createRequest:
        post:
            description: Ask for an MCP server to be reviewed. Repeat asks for the same server attach to the existing review rather than opening a second one.
            operationId: createMcpApprovalRequest
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateRequestRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ApprovalRequestSummary'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: createRequest mcpApproval
            tags:
                - mcpApproval
            x-speakeasy-name-override: createRequest
            x-speakeasy-react-hook:
                name: CreateMcpApprovalRequest
    /rpc/mcpApproval.ensureServerReview:
        post:
            description: Resolve the evidence dossier for a server URL, opening one when none exists. Gathers evidence without recording any ask or decision, so a server can be inspected before — or without — anyone requesting it.
            operationId: ensureMcpServerReview
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/EnsureServerReviewRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ApprovalRequestSummary'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: ensureServerReview mcpApproval
            tags:
                - mcpApproval
            x-speakeasy-name-override: ensureServerReview
            x-speakeasy-react-hook:
                name: EnsureMcpServerReview
    /rpc/mcpApproval.getRequest:
        get:
            description: Fetch one MCP approval request with its evidence and decision history.
            operationId: getMcpApprovalRequest
            parameters:
                - allowEmptyValue: true
                  description: The approval request ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The approval request ID.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ApprovalRequestDetail'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: getRequest mcpApproval
            tags:
                - mcpApproval
            x-speakeasy-name-override: getRequest
            x-speakeasy-react-hook:
                name: GetMcpApprovalRequest
    /rpc/mcpApproval.listRequests:
        get:
            description: List MCP approval requests for a project.
            operationId: listMcpApprovalRequests
            parameters:
                - allowEmptyValue: true
                  description: Only return requests in this status.
                  in: query
                  name: status
                  schema:
                    description: Only return requests in this status.
                    type: string
                - allowEmptyValue: true
                  description: The number of requests to return per page
                  in: query
                  name: limit
                  schema:
                    description: The number of requests to return per page
                    format: int32
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListApprovalRequestsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listRequests mcpApproval
            tags:
                - mcpApproval
            x-speakeasy-name-override: listRequests
            x-speakeasy-react-hook:
                name: ListMcpApprovalRequests
    /rpc/mcpApproval.promote:
        post:
            description: Promote a risk-policy bypass request into an approval request, carrying its requester and justification into the review queue.
            operationId: promoteMcpApprovalRequest
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/PromoteRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ApprovalRequestSummary'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: promote mcpApproval
            tags:
                - mcpApproval
            x-speakeasy-name-override: promote
            x-speakeasy-react-hook:
                name: PromoteMcpApprovalRequest
    /rpc/mcpApproval.recordDecision:
        post:
            description: Approve or deny an MCP approval request, recording the rationale and who it applies to.
            operationId: recordMcpApprovalDecision
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RecordDecisionRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ApprovalDecision'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: recordDecision mcpApproval
            tags:
                - mcpApproval
            x-speakeasy-name-override: recordDecision
            x-speakeasy-react-hook:
                name: RecordMcpApprovalDecision
    /rpc/mcpApproval.refreshEvidence:
        post:
            description: Re-run every evidence source for a request and replace its current evidence with the fresh gather. Frozen decision snapshots are never touched.
            operationId: refreshMcpApprovalEvidence
            parameters:
                - allowEmptyValue: true
                  description: The approval request ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The approval request ID.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ApprovalRequestDetail'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: refreshEvidence mcpApproval
            tags:
                - mcpApproval
            x-speakeasy-name-override: refreshEvidence
            x-speakeasy-react-hook:
                name: RefreshMcpApprovalEvidence
    /rpc/mcpEndpoints.checkSlugAvailability:
        get:
            description: 'Check whether an MCP endpoint slug is available. The uniqueness scope depends on whether a custom_domain_id is provided: platform-domain slugs are checked across all platform-domain endpoints (custom_domain_id IS NULL); custom-domain slugs are checked within the (custom_domain_id, slug) pair. Returns true when the slug is free.'
            operationId: checkMcpEndpointSlugAvailability
            parameters:
                - allowEmptyValue: true
                  description: The slug to check
                  in: query
                  name: slug
                  required: true
                  schema:
                    description: A url-friendly label (up to 128 characters) that addresses an MCP server through a slug-based URL. Platform-domain slugs (no custom domain) must be prefixed with the organization slug.
                    maxLength: 128
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: Optional custom domain ID. Omit to check platform-domain slug availability.
                  in: query
                  name: custom_domain_id
                  schema:
                    description: Optional custom domain ID. Omit to check platform-domain slug availability.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                type: boolean
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: checkMcpEndpointSlugAvailability mcpEndpoints
            tags:
                - mcpEndpoints
            x-speakeasy-name-override: checkSlugAvailability
            x-speakeasy-react-hook:
                name: CheckMcpEndpointSlugAvailability
    /rpc/mcpEndpoints.create:
        post:
            description: Create a new MCP endpoint for an MCP server
            operationId: createMcpEndpoint
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateMcpEndpointForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/McpEndpoint'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: createMcpEndpoint mcpEndpoints
            tags:
                - mcpEndpoints
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: CreateMcpEndpoint
    /rpc/mcpEndpoints.delete:
        delete:
            description: Delete an MCP endpoint
            operationId: deleteMcpEndpoint
            parameters:
                - allowEmptyValue: true
                  description: The ID of the MCP endpoint to delete
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the MCP endpoint to delete
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: deleteMcpEndpoint mcpEndpoints
            tags:
                - mcpEndpoints
            x-speakeasy-name-override: delete
            x-speakeasy-react-hook:
                name: DeleteMcpEndpoint
    /rpc/mcpEndpoints.get:
        get:
            description: Get an MCP endpoint by id or by (custom_domain_id, slug). Provide either id, or slug with an optional custom_domain_id — not both.
            operationId: getMcpEndpoint
            parameters:
                - allowEmptyValue: true
                  description: The ID of the MCP endpoint
                  in: query
                  name: id
                  schema:
                    description: The ID of the MCP endpoint
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: The ID of the custom domain the endpoint slug is registered under. Omit to look up a platform-domain endpoint.
                  in: query
                  name: custom_domain_id
                  schema:
                    description: The ID of the custom domain the endpoint slug is registered under. Omit to look up a platform-domain endpoint.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: The slug to look up
                  in: query
                  name: slug
                  schema:
                    description: A url-friendly label (up to 128 characters) that addresses an MCP server through a slug-based URL. Platform-domain slugs (no custom domain) must be prefixed with the organization slug.
                    maxLength: 128
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/McpEndpoint'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: getMcpEndpoint mcpEndpoints
            tags:
                - mcpEndpoints
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: GetMcpEndpoint
    /rpc/mcpEndpoints.list:
        get:
            description: List MCP endpoints for a project. Optionally filter to only those associated with a specific MCP server.
            operationId: listMcpEndpoints
            parameters:
                - allowEmptyValue: true
                  description: 'Optional filter: only return endpoints associated with this MCP server.'
                  in: query
                  name: mcp_server_id
                  schema:
                    description: 'Optional filter: only return endpoints associated with this MCP server.'
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListMcpEndpointsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listMcpEndpoints mcpEndpoints
            tags:
                - mcpEndpoints
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: McpEndpoints
    /rpc/mcpEndpoints.update:
        post:
            description: 'Update an MCP endpoint. This is a full-record replace: fields omitted from the request become null on the stored record. The id, mcp_server_id, and slug fields are required.'
            operationId: updateMcpEndpoint
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateMcpEndpointForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/McpEndpoint'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: updateMcpEndpoint mcpEndpoints
            tags:
                - mcpEndpoints
            x-speakeasy-name-override: update
            x-speakeasy-react-hook:
                name: UpdateMcpEndpoint
    /rpc/mcpMetadata.export:
        post:
            description: Export MCP server details as JSON for documentation and integration purposes.
            operationId: exportMcpMetadata
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/ExportMcpMetadataRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/McpExport'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: exportMcpMetadata mcpMetadata
            tags:
                - mcpMetadata
            x-speakeasy-name-override: export
            x-speakeasy-react-hook:
                name: ExportMcpMetadata
    /rpc/mcpMetadata.get:
        get:
            description: Fetch the metadata that powers the MCP install page. Exactly one of toolset_slug or mcp_server_id must be provided.
            operationId: getMcpMetadata
            parameters:
                - allowEmptyValue: true
                  description: The slug of the toolset associated with this install page metadata. Mutually exclusive with mcp_server_id.
                  in: query
                  name: toolset_slug
                  schema:
                    description: A short url-friendly label that uniquely identifies a resource.
                    maxLength: 40
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: The ID of the MCP server associated with this install page metadata. Mutually exclusive with toolset_slug.
                  in: query
                  name: mcp_server_id
                  schema:
                    description: The ID of the MCP server associated with this install page metadata. Mutually exclusive with toolset_slug.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetMcpMetadataResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getMcpMetadata mcpMetadata
            tags:
                - mcpMetadata
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: GetMcpMetadata
    /rpc/mcpMetadata.set:
        post:
            description: Create or update the metadata that powers the MCP install page. Exactly one of toolset_slug or mcp_server_id must be provided.
            operationId: setMcpMetadata
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetMcpMetadataRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/McpMetadata'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: setMcpMetadata mcpMetadata
            tags:
                - mcpMetadata
            x-speakeasy-name-override: set
    /rpc/mcpRegistries.clearCache:
        delete:
            description: Clear the registry cache for a specific registry (admin only)
            operationId: clearMCPRegistryCache
            parameters:
                - allowEmptyValue: true
                  description: The registry to clear cache for
                  in: query
                  name: registry_id
                  required: true
                  schema:
                    description: The registry to clear cache for
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: clearCache mcpRegistries
            tags:
                - mcpRegistries
            x-speakeasy-name-override: clearCache
    /rpc/mcpRegistries.getServerDetails:
        get:
            description: Get detailed information about an MCP server including remotes
            operationId: getMCPServerDetails
            parameters:
                - allowEmptyValue: true
                  description: ID of the registry
                  in: query
                  name: registry_id
                  required: true
                  schema:
                    description: ID of the registry
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Server specifier (e.g., 'io.github.user/server')
                  in: query
                  name: server_specifier
                  required: true
                  schema:
                    description: Server specifier (e.g., 'io.github.user/server')
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ExternalMCPServer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: getServerDetails mcpRegistries
            tags:
                - mcpRegistries
            x-speakeasy-name-override: getServerDetails
    /rpc/mcpRegistries.getSetupDocs:
        get:
            description: Get the published setup documentation for an upstream MCP server, located by endpoint URL and/or registry identifier
            operationId: getMCPSetupDocs
            parameters:
                - allowEmptyValue: true
                  description: URL of the upstream MCP server endpoint
                  example: https://mcp.box.com
                  in: query
                  name: server_url
                  schema:
                    description: URL of the upstream MCP server endpoint
                    example: https://mcp.box.com
                    type: string
                - allowEmptyValue: true
                  description: Registry specifier for the server, as returned by listCatalog (e.g., 'com.pulsemcp.mirror/box')
                  example: com.pulsemcp.mirror/box
                  in: query
                  name: registry_specifier
                  schema:
                    description: Registry specifier for the server, as returned by listCatalog (e.g., 'com.pulsemcp.mirror/box')
                    example: com.pulsemcp.mirror/box
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetSetupDocsResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: getSetupDocs mcpRegistries
            tags:
                - mcpRegistries
            x-speakeasy-name-override: getSetupDocs
            x-speakeasy-react-hook:
                name: GetMCPSetupDocs
    /rpc/mcpRegistries.listCatalog:
        get:
            description: List available MCP servers from configured registries
            operationId: listMCPCatalog
            parameters:
                - allowEmptyValue: true
                  description: Filter to a specific registry
                  in: query
                  name: registry_id
                  schema:
                    description: Filter to a specific registry
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Search query to filter servers by name
                  in: query
                  name: search
                  schema:
                    description: Search query to filter servers by name
                    type: string
                - allowEmptyValue: true
                  description: Pagination cursor
                  in: query
                  name: cursor
                  schema:
                    description: Pagination cursor
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListCatalogResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listCatalog mcpRegistries
            tags:
                - mcpRegistries
            x-speakeasy-name-override: listCatalog
            x-speakeasy-react-hook:
                name: ListMCPCatalog
    /rpc/mcpRegistries.listRegistries:
        get:
            description: List all MCP registries (admin only)
            operationId: listMCPRegistries
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListRegistriesResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listRegistries mcpRegistries
            tags:
                - mcpRegistries
            x-speakeasy-name-override: listRegistries
            x-speakeasy-react-hook:
                name: ListMCPRegistries
    /rpc/mcpServers.addToolMetadataBatch:
        post:
            description: Strictly additive batch insert of tool metadata for an MCP server. Every tool in the payload is inserted; if any of them already has a live stored entry the whole batch fails with a conflict and nothing is inserted. Stored tools absent from the payload are left untouched and nothing is deleted. Callers are expected to send only tools they know are new.
            operationId: addMcpServerToolMetadataBatch
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetToolMetadataBatchRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AddToolMetadataBatchResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: addToolMetadataBatch mcpServers
            tags:
                - mcpServers
            x-speakeasy-name-override: addToolMetadataBatch
            x-speakeasy-react-hook:
                name: AddMcpServerToolMetadataBatch
    /rpc/mcpServers.create:
        post:
            description: Create a new MCP server
            operationId: createMcpServer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateMcpServerForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/McpServer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: createMcpServer mcpServers
            tags:
                - mcpServers
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: CreateMcpServer
    /rpc/mcpServers.delete:
        delete:
            description: Delete an MCP server
            operationId: deleteMcpServer
            parameters:
                - allowEmptyValue: true
                  description: The ID of the MCP server to delete
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the MCP server to delete
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: deleteMcpServer mcpServers
            tags:
                - mcpServers
            x-speakeasy-name-override: delete
            x-speakeasy-react-hook:
                name: DeleteMcpServer
    /rpc/mcpServers.deleteToolMetadata:
        delete:
            description: Soft-delete a single tool metadata entry.
            operationId: deleteMcpServerToolMetadata
            parameters:
                - allowEmptyValue: true
                  description: The ID of the MCP server the tool metadata belongs to
                  in: query
                  name: mcp_server_id
                  required: true
                  schema:
                    description: The ID of the MCP server the tool metadata belongs to
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: The name of the tool to delete
                  in: query
                  name: tool_name
                  required: true
                  schema:
                    description: The name of the tool to delete
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: deleteToolMetadata mcpServers
            tags:
                - mcpServers
            x-speakeasy-name-override: deleteToolMetadata
            x-speakeasy-react-hook:
                name: DeleteMcpServerToolMetadata
    /rpc/mcpServers.get:
        get:
            description: Get an MCP server by ID or slug. Exactly one of id or slug must be provided.
            operationId: getMcpServer
            parameters:
                - allowEmptyValue: true
                  description: The ID of the MCP server. Mutually exclusive with slug.
                  in: query
                  name: id
                  schema:
                    description: The ID of the MCP server. Mutually exclusive with slug.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: The slug of the MCP server. Mutually exclusive with id.
                  in: query
                  name: slug
                  schema:
                    description: The slug of the MCP server. Mutually exclusive with id.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/McpServer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: getMcpServer mcpServers
            tags:
                - mcpServers
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: GetMcpServer
    /rpc/mcpServers.list:
        get:
            description: List MCP servers for a project. Accepts optional remote_mcp_server_id, tunneled_mcp_server_id, toolset_id, or unproxied_mcp_server_id filters to scope the result to a single backend; at most one filter may be supplied since the backends are mutually exclusive.
            operationId: listMcpServers
            parameters:
                - allowEmptyValue: true
                  description: Filter to MCP servers backed by this remote MCP server
                  in: query
                  name: remote_mcp_server_id
                  schema:
                    description: Filter to MCP servers backed by this remote MCP server
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Filter to MCP servers backed by this tunneled MCP server
                  in: query
                  name: tunneled_mcp_server_id
                  schema:
                    description: Filter to MCP servers backed by this tunneled MCP server
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Filter to MCP servers backed by this toolset
                  in: query
                  name: toolset_id
                  schema:
                    description: Filter to MCP servers backed by this toolset
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Filter to MCP servers backed by this unproxied MCP server
                  in: query
                  name: unproxied_mcp_server_id
                  schema:
                    description: Filter to MCP servers backed by this unproxied MCP server
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListMcpServersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listMcpServers mcpServers
            tags:
                - mcpServers
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: McpServers
    /rpc/mcpServers.listForOrg:
        get:
            description: List all MCP servers across the organization
            operationId: listMcpServersForOrg
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListMcpServersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listMcpServersForOrg mcpServers
            tags:
                - mcpServers
            x-speakeasy-name-override: listForOrg
            x-speakeasy-react-hook:
                name: ListMcpServersForOrg
    /rpc/mcpServers.listToolFilters:
        get:
            description: List the tool filter scopes (tags) available on an MCP server and the tools under each, including tools excluded from all filters. Exactly one of id or slug must be provided. Read-only; reflects the explicit tool variations group resolved from the chain (mcp_servers then toolsets), deriving effective tags with the same logic as the runtime ?tags= filter. Returns filtering disabled when no explicit group is set.
            operationId: listMcpServerToolFilters
            parameters:
                - allowEmptyValue: true
                  description: The ID of the MCP server. Mutually exclusive with slug.
                  in: query
                  name: id
                  schema:
                    description: The ID of the MCP server. Mutually exclusive with slug.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: The slug of the MCP server. Mutually exclusive with id.
                  in: query
                  name: slug
                  schema:
                    description: The slug of the MCP server. Mutually exclusive with id.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListToolFiltersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listToolFilters mcpServers
            tags:
                - mcpServers
            x-speakeasy-name-override: listToolFilters
            x-speakeasy-react-hook:
                name: ListMcpServerToolFilters
    /rpc/mcpServers.listToolMetadata:
        get:
            description: List stored tool metadata for an MCP server.
            operationId: listMcpServerToolMetadata
            parameters:
                - allowEmptyValue: true
                  description: The ID of the MCP server the tool metadata belongs to
                  in: query
                  name: mcp_server_id
                  required: true
                  schema:
                    description: The ID of the MCP server the tool metadata belongs to
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Include soft-deleted tool metadata entries in the result. Deleted entries carry a deleted_at timestamp.
                  in: query
                  name: include_deleted
                  schema:
                    description: Include soft-deleted tool metadata entries in the result. Deleted entries carry a deleted_at timestamp.
                    type: boolean
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListToolMetadataResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listToolMetadata mcpServers
            tags:
                - mcpServers
            x-speakeasy-name-override: listToolMetadata
            x-speakeasy-react-hook:
                name: ListMcpServerToolMetadata
    /rpc/mcpServers.setToolMetadata:
        put:
            description: 'Set the annotation hints of a single tool metadata entry (manual override). This is a full-record replace: omitted hints become unset on the stored record.'
            operationId: setMcpServerToolMetadata
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetToolMetadataRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ToolMetadata'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: setToolMetadata mcpServers
            tags:
                - mcpServers
            x-speakeasy-name-override: setToolMetadata
            x-speakeasy-react-hook:
                name: SetMcpServerToolMetadata
    /rpc/mcpServers.setToolMetadataBatch:
        put:
            description: Authoritative batch upsert of tool metadata for an MCP server. Every tool in the payload is upserted and any stored tool absent from the payload is soft-deleted, all in one transaction.
            operationId: setMcpServerToolMetadataBatch
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetToolMetadataBatchRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SetToolMetadataBatchResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: setToolMetadataBatch mcpServers
            tags:
                - mcpServers
            x-speakeasy-name-override: setToolMetadataBatch
            x-speakeasy-react-hook:
                name: SetMcpServerToolMetadataBatch
    /rpc/mcpServers.update:
        post:
            description: 'Update an MCP server. This is a full-record replace for the optional UUID references: fields omitted from the request become null on the stored record. name is an exception — omitting it leaves the existing display name unchanged, while providing it requires a non-empty value and recomputes the server-side slug. The id and visibility fields are required; exactly one of remote_mcp_server_id, tunneled_mcp_server_id, or toolset_id must be provided.'
            operationId: updateMcpServer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateMcpServerForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/McpServer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: updateMcpServer mcpServers
            tags:
                - mcpServers
            x-speakeasy-name-override: update
            x-speakeasy-react-hook:
                name: UpdateMcpServer
    /rpc/modelKeys.deleteKey:
        delete:
            description: Delete a model provider key. Completions on the affected slot fall back to the project default key or the platform key.
            operationId: deleteModelProviderKey
            parameters:
                - allowEmptyValue: true
                  description: The ID of the key to delete.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the key to delete.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: deleteKey modelKeys
            tags:
                - modelKeys
            x-speakeasy-name-override: deleteKey
            x-speakeasy-react-hook:
                name: DeleteModelProviderKey
    /rpc/modelKeys.listKeys:
        get:
            description: List the model provider keys configured for a project. Key material is never returned.
            operationId: listModelProviderKeys
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListKeysResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listKeys modelKeys
            tags:
                - modelKeys
            x-speakeasy-name-override: listKeys
            x-speakeasy-react-hook:
                name: ModelProviderKeys
    /rpc/modelKeys.setKeyEnabled:
        post:
            description: Enable or disable a model provider key without replacing its key material.
            operationId: setModelProviderKeyEnabled
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetKeyEnabledRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ModelProviderKey'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: setKeyEnabled modelKeys
            tags:
                - modelKeys
            x-speakeasy-name-override: setKeyEnabled
            x-speakeasy-react-hook:
                name: SetModelProviderKeyEnabled
    /rpc/modelKeys.upsertKey:
        post:
            description: Create or replace the model provider key for a slot. The key is validated with the provider, then stored encrypted.
            operationId: upsertModelProviderKey
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpsertKeyRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ModelProviderKey'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: upsertKey modelKeys
            tags:
                - modelKeys
            x-speakeasy-name-override: upsertKey
            x-speakeasy-react-hook:
                name: UpsertModelProviderKey
    /rpc/organizationAssets.uploadImage:
        post:
            description: Upload an organization-tier image (e.g. a remote identity provider logo). Requires org:admin.
            operationId: uploadOrganizationImage
            parameters:
                - allowEmptyValue: true
                  in: header
                  name: Content-Type
                  required: true
                  schema:
                    type: string
                - allowEmptyValue: true
                  in: header
                  name: Content-Length
                  required: true
                  schema:
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UploadImageResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: uploadOrganizationImage organizationAssets
            tags:
                - organizationAssets
            x-speakeasy-name-override: uploadImage
            x-speakeasy-react-hook:
                name: UploadOrganizationImage
    /rpc/organizationRemoteSessionClients.create:
        post:
            description: 'Register a standalone remote_session_client under an existing remote_session_issuer in the caller''s organization, with no user_session_issuer attachments. The client is project-scoped: it inherits a project-specific issuer''s project, or the caller names a project (which must belong to the organization) when the issuer is organization-level. Requires org:admin.'
            operationId: createOrganizationRemoteSessionClient
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateOrganizationRemoteSessionClientForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionClient'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: createClient organizationRemoteSessionClients
            tags:
                - organizationRemoteSessionClients
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: CreateOrganizationRemoteSessionClient
    /rpc/organizationRemoteSessionClients.createCimd:
        post:
            description: 'Register a standalone remote_session_client in Client ID Metadata Document (CIMD) mode under an existing remote_session_issuer in the caller''s organization, with no user_session_issuer attachments. Gram generates the client_id and hosts the metadata document; the issuer must advertise client_id_metadata_document_supported. The client is project-scoped: it inherits a project-specific issuer''s project, or the caller names a project (which must belong to the organization) when the issuer is organization-level. Requires org:admin.'
            operationId: createCimdOrganizationRemoteSessionClient
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateCimdOrganizationRemoteSessionClientForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionClient'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: createCimdClient organizationRemoteSessionClients
            tags:
                - organizationRemoteSessionClients
            x-speakeasy-name-override: createCimd
            x-speakeasy-react-hook:
                name: CreateCimdOrganizationRemoteSessionClient
    /rpc/organizationRemoteSessionClients.delete:
        delete:
            description: Soft-delete a remote_session_client in the caller's organization. Cascades to the remote_sessions minted against it. Requires org:admin.
            operationId: deleteOrganizationRemoteSessionClient
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_client id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The remote_session_client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: deleteClient organizationRemoteSessionClients
            tags:
                - organizationRemoteSessionClients
            x-speakeasy-name-override: delete
            x-speakeasy-react-hook:
                name: DeleteOrganizationRemoteSessionClient
    /rpc/organizationRemoteSessionClients.get:
        get:
            description: Get a remote_session_client in the caller's organization by id. Requires org:read.
            operationId: getOrganizationRemoteSessionClient
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_client id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The remote_session_client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionClient'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: getClient organizationRemoteSessionClients
            tags:
                - organizationRemoteSessionClients
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: OrganizationRemoteSessionClient
    /rpc/organizationRemoteSessionClients.getDeletePreflight:
        get:
            description: 'Authoritative impact summary for deleting a remote_session_client: associated session count and affected MCP server names. Requires org:read.'
            operationId: getOrganizationRemoteSessionClientDeletePreflight
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_client id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The remote_session_client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/OrganizationClientDeletePreflight'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: getClientDeletePreflight organizationRemoteSessionClients
            tags:
                - organizationRemoteSessionClients
            x-speakeasy-name-override: getDeletePreflight
            x-speakeasy-react-hook:
                name: OrganizationRemoteSessionClientDeletePreflight
    /rpc/organizationRemoteSessionClients.list:
        get:
            description: List the remote_session_clients registered with a given issuer in the caller's organization, each with its MCP server attachment count. Requires org:read.
            operationId: listOrganizationRemoteSessionClients
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_issuer id to list clients for.
                  in: query
                  name: issuer_id
                  required: true
                  schema:
                    description: The remote_session_issuer id to list clients for.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Pagination cursor.
                  in: query
                  name: cursor
                  schema:
                    description: Pagination cursor.
                    type: string
                - allowEmptyValue: true
                  description: Page size (default 50, max 100).
                  in: query
                  name: limit
                  schema:
                    description: Page size (default 50, max 100).
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListOrganizationRemoteSessionClientsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: listClients organizationRemoteSessionClients
            tags:
                - organizationRemoteSessionClients
            x-speakeasy-name-override: list
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: OrganizationRemoteSessionClients
    /rpc/organizationRemoteSessionClients.listMcpServers:
        get:
            description: List the MCP servers a remote_session_client is attached to (resolved through user_session_issuers) in the caller's organization. Requires org:read.
            operationId: listOrganizationRemoteSessionClientMcpServers
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_client id.
                  in: query
                  name: client_id
                  required: true
                  schema:
                    description: The remote_session_client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListOrganizationMcpServersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: listClientMcpServers organizationRemoteSessionClients
            tags:
                - organizationRemoteSessionClients
            x-speakeasy-name-override: listMcpServers
            x-speakeasy-react-hook:
                name: OrganizationRemoteSessionClientMcpServers
    /rpc/organizationRemoteSessionClients.removeFromMcpServer:
        post:
            description: Detach a remote_session_client from an MCP server (clears the MCP server's user_session_issuer link) in the caller's organization. Requires org:admin.
            operationId: removeOrganizationRemoteSessionClientFromMcpServer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RemoveClientFromMcpServerRequestBody'
                required: true
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: removeClientFromMcpServer organizationRemoteSessionClients
            tags:
                - organizationRemoteSessionClients
            x-speakeasy-name-override: removeFromMcpServer
            x-speakeasy-react-hook:
                name: RemoveOrganizationRemoteSessionClientFromMcpServer
    /rpc/organizationRemoteSessionClients.update:
        post:
            description: Update a remote_session_client's non-secret fields in the caller's organization. Requires org:admin.
            operationId: updateOrganizationRemoteSessionClient
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateRemoteSessionClientForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionClient'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: updateClient organizationRemoteSessionClients
            tags:
                - organizationRemoteSessionClients
            x-speakeasy-name-override: update
            x-speakeasy-react-hook:
                name: UpdateOrganizationRemoteSessionClient
    /rpc/organizationRemoteSessionIssuers.create:
        post:
            description: Create a remote_session_issuer in the caller's organization. With no project_id the issuer is organization-level (project_id NULL, inherited by every project); with a project_id (which must belong to the organization) it is project-specific. Requires org:admin.
            operationId: createOrganizationRemoteSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateIssuerRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: createIssuer organizationRemoteSessionIssuers
            tags:
                - organizationRemoteSessionIssuers
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: CreateOrganizationRemoteSessionIssuer
    /rpc/organizationRemoteSessionIssuers.delete:
        delete:
            description: Soft-delete any remote_session_issuer (organizational or project-specific) in the caller's organization. Blocked when any remote_session_clients still reference it. Requires org:admin.
            operationId: deleteOrganizationRemoteSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_issuer id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The remote_session_issuer id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: deleteIssuer organizationRemoteSessionIssuers
            tags:
                - organizationRemoteSessionIssuers
            x-speakeasy-name-override: delete
            x-speakeasy-react-hook:
                name: DeleteOrganizationRemoteSessionIssuer
    /rpc/organizationRemoteSessionIssuers.fetchMetadata:
        post:
            description: Hit an upstream issuer's RFC 8414 .well-known/oauth-authorization-server document and return a draft suitable for organizationRemoteSessionIssuers.create. Keyed by issuer URL; no record need exist and nothing is persisted. The organization-scoped counterpart of remoteSessionIssuers.fetchMetadata, so creating an organization-level issuer no longer has to borrow an unrelated project's scope. Requires org:admin.
            operationId: fetchOrganizationRemoteSessionIssuerMetadata
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/FetchIssuerMetadataRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuerDraft'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: fetchIssuerMetadata organizationRemoteSessionIssuers
            tags:
                - organizationRemoteSessionIssuers
            x-speakeasy-name-override: fetchMetadata
            x-speakeasy-react-hook:
                name: FetchOrganizationRemoteSessionIssuerMetadata
    /rpc/organizationRemoteSessionIssuers.get:
        get:
            description: Get any remote_session_issuer (organizational or project-specific) in the caller's organization by id. Requires org:read.
            operationId: getOrganizationRemoteSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_issuer id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The remote_session_issuer id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: getIssuer organizationRemoteSessionIssuers
            tags:
                - organizationRemoteSessionIssuers
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: OrganizationRemoteSessionIssuer
    /rpc/organizationRemoteSessionIssuers.getDeletePreflight:
        get:
            description: 'Authoritative impact summary for deleting a remote_session_issuer: associated client count and affected MCP server names. Requires org:read.'
            operationId: getOrganizationRemoteSessionIssuerDeletePreflight
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_issuer id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The remote_session_issuer id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/OrganizationIssuerDeletePreflight'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: getIssuerDeletePreflight organizationRemoteSessionIssuers
            tags:
                - organizationRemoteSessionIssuers
            x-speakeasy-name-override: getDeletePreflight
            x-speakeasy-react-hook:
                name: OrganizationRemoteSessionIssuerDeletePreflight
    /rpc/organizationRemoteSessionIssuers.getDuplicatePreflight:
        get:
            description: |-
                Report the existing remote_session_issuers that already describe an upstream issuer URL, so a create or edit form can warn before it duplicates one. Requires org:read.

                Covers every issuer in the caller's organization — organization-level and project-specific alike — plus the platform catalog. The project-specific rows are the point: an organization administrator about to add an organization-level issuer most needs to know that several of their projects already configured the same URL separately, because those are exactly the records migrateIssuer can consolidate. The answer does not depend on whether the issuer being created is organization-level or project-scoped; an org administrator holds org:read either way.

                Advisory only. Duplicating an issuer URL is legitimate, so nothing here blocks a write and no lock is taken. Matching uses the same canonicalization as getRemoteSessionIssuer, and a URL that cannot be parsed as an issuer identifier returns no matches rather than an error.
            operationId: getOrganizationRemoteSessionIssuerDuplicatePreflight
            parameters:
                - allowEmptyValue: true
                  description: The upstream issuer URL being entered (e.g. https://login.linear.app). Empty or unparseable returns no matches.
                  in: query
                  name: issuer
                  schema:
                    description: The upstream issuer URL being entered (e.g. https://login.linear.app). Empty or unparseable returns no matches.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuerDuplicatePreflight'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: getIssuerDuplicatePreflight organizationRemoteSessionIssuers
            tags:
                - organizationRemoteSessionIssuers
            x-speakeasy-name-override: getDuplicatePreflight
            x-speakeasy-react-hook:
                name: OrganizationRemoteSessionIssuerDuplicatePreflight
    /rpc/organizationRemoteSessionIssuers.getMigratePreflight:
        get:
            description: 'Authoritative impact summary for migrating a remote_session_issuer''s clients onto another issuer: the clients that would move, the affected MCP servers, and every blocker (endpoint mismatches, conflicting MCP-server bindings). Requires org:read.'
            operationId: getOrganizationRemoteSessionIssuerMigratePreflight
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_issuer to migrate away from.
                  in: query
                  name: source_id
                  required: true
                  schema:
                    description: The remote_session_issuer to migrate away from.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: The remote_session_issuer to migrate onto.
                  in: query
                  name: target_id
                  required: true
                  schema:
                    description: The remote_session_issuer to migrate onto.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/OrganizationIssuerMigratePreflight'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: getIssuerMigratePreflight organizationRemoteSessionIssuers
            tags:
                - organizationRemoteSessionIssuers
            x-speakeasy-name-override: getMigratePreflight
            x-speakeasy-react-hook:
                name: OrganizationRemoteSessionIssuerMigratePreflight
    /rpc/organizationRemoteSessionIssuers.list:
        get:
            description: List all remote_session_issuers in the caller's organization — organizational (project_id NULL) and project-specific — each with its associated client count and, for project-specific issuers, the owning project name. Requires org:read.
            operationId: listOrganizationRemoteSessionIssuers
            parameters:
                - allowEmptyValue: true
                  description: Pagination cursor.
                  in: query
                  name: cursor
                  schema:
                    description: Pagination cursor.
                    type: string
                - allowEmptyValue: true
                  description: Page size (default 50, max 100).
                  in: query
                  name: limit
                  schema:
                    description: Page size (default 50, max 100).
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListOrganizationRemoteSessionIssuersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: listIssuers organizationRemoteSessionIssuers
            tags:
                - organizationRemoteSessionIssuers
            x-speakeasy-name-override: list
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: OrganizationRemoteSessionIssuers
    /rpc/organizationRemoteSessionIssuers.migrate:
        post:
            description: 'Consolidate two remote_session_issuers that point at the same upstream authorization server: re-point every client from the source issuer onto the target issuer, then soft-delete the source. Existing remote sessions are preserved, so no user re-authenticates. Both issuers must belong to the caller''s organization and agree on issuer, token_endpoint, and authorization_endpoint. The issuer identifier is compared canonically, so two spellings differing only by a trailing slash or an explicit default port count as the same upstream; the two endpoints are compared literally. The target may not be narrower in scope than the source: a project-specific issuer may migrate onto an issuer in the same project or onto an organization-level issuer, and an organization-level issuer may migrate onto another organization-level issuer. Requires org:admin.'
            operationId: migrateOrganizationRemoteSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/MigrateIssuerRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/MigrateOrganizationRemoteSessionIssuerResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: migrateIssuer organizationRemoteSessionIssuers
            tags:
                - organizationRemoteSessionIssuers
            x-speakeasy-name-override: migrate
            x-speakeasy-react-hook:
                name: MigrateOrganizationRemoteSessionIssuer
    /rpc/organizationRemoteSessionIssuers.move:
        post:
            description: 'Re-scope a remote_session_issuer in the caller''s organization: provide a project_id (which must belong to the organization) to make it project-specific, or omit it to make it organization-level (project_id NULL, inherited by every project). Requires org:admin.'
            operationId: moveOrganizationRemoteSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/MoveIssuerRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: moveIssuer organizationRemoteSessionIssuers
            tags:
                - organizationRemoteSessionIssuers
            x-speakeasy-name-override: move
            x-speakeasy-react-hook:
                name: MoveOrganizationRemoteSessionIssuer
    /rpc/organizationRemoteSessionIssuers.refreshMetadata:
        post:
            description: Re-fetch an existing remote_session_issuer's RFC 8414 metadata document and persist the discovered values. Keyed by issuer id; serves both organizational and project-specific issuers in the caller's organization. Only RFC 8414-derived columns are written — endpoints, the *_supported arrays, client_id_metadata_document_supported, and the documentation URLs. Gram behavior and display fields (oidc, passthrough, name, slug, logo, client setup documentation) are left alone. Requires org:admin.
            operationId: refreshOrganizationRemoteSessionIssuerMetadata
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RiskIDRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuerRefresh'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: refreshIssuerMetadata organizationRemoteSessionIssuers
            tags:
                - organizationRemoteSessionIssuers
            x-speakeasy-name-override: refreshMetadata
            x-speakeasy-react-hook:
                name: RefreshOrganizationRemoteSessionIssuerMetadata
    /rpc/organizationRemoteSessionIssuers.update:
        post:
            description: Update any remote_session_issuer (organizational or project-specific) in the caller's organization. Requires org:admin.
            operationId: updateOrganizationRemoteSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateRemoteSessionIssuerForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: updateIssuer organizationRemoteSessionIssuers
            tags:
                - organizationRemoteSessionIssuers
            x-speakeasy-name-override: update
            x-speakeasy-react-hook:
                name: UpdateOrganizationRemoteSessionIssuer
    /rpc/organizationRemoteSessions.list:
        get:
            description: List the remote_sessions minted against a remote_session_client in the caller's organization. access_token_encrypted and refresh_token_encrypted are never returned. Requires org:read.
            operationId: listOrganizationRemoteSessionClientSessions
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_client id.
                  in: query
                  name: client_id
                  required: true
                  schema:
                    description: The remote_session_client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Pagination cursor.
                  in: query
                  name: cursor
                  schema:
                    description: Pagination cursor.
                    type: string
                - allowEmptyValue: true
                  description: Page size (default 50, max 100).
                  in: query
                  name: limit
                  schema:
                    description: Page size (default 50, max 100).
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListOrganizationRemoteSessionsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: listClientSessions organizationRemoteSessions
            tags:
                - organizationRemoteSessions
            x-speakeasy-name-override: list
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: OrganizationRemoteSessionClientSessions
    /rpc/organizationRemoteSessions.refresh:
        post:
            description: Force an upstream token refresh on a single remote_session in the caller's organization, regardless of current access-token expiry. Returns the updated remote_session so callers can reflect the new expiry without a refetch. Fails with a bad-request error when the session holds no refresh token. Requires org:admin.
            operationId: refreshOrganizationRemoteSession
            parameters:
                - allowEmptyValue: true
                  description: The remote_session id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The remote_session id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSession'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: refreshSession organizationRemoteSessions
            tags:
                - organizationRemoteSessions
            x-speakeasy-name-override: refresh
            x-speakeasy-react-hook:
                name: RefreshOrganizationRemoteSession
    /rpc/organizationRemoteSessions.revoke:
        post:
            description: Revoke (soft-delete) a single remote_session in the caller's organization. Requires org:admin.
            operationId: revokeOrganizationRemoteSession
            parameters:
                - allowEmptyValue: true
                  description: The remote_session id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The remote_session id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: revokeSession organizationRemoteSessions
            tags:
                - organizationRemoteSessions
            x-speakeasy-name-override: revoke
            x-speakeasy-react-hook:
                name: RevokeOrganizationRemoteSession
    /rpc/organizationRemoteSessions.revokeAll:
        post:
            description: Revoke (soft-delete) all remote_sessions minted against a remote_session_client in the caller's organization. Requires org:admin.
            operationId: revokeAllOrganizationRemoteSessionClientSessions
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_client id.
                  in: query
                  name: client_id
                  required: true
                  schema:
                    description: The remote_session_client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RevokeAllRemoteSessionsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: revokeAllClientSessions organizationRemoteSessions
            tags:
                - organizationRemoteSessions
            x-speakeasy-name-override: revokeAll
            x-speakeasy-react-hook:
                name: RevokeAllOrganizationRemoteSessionClientSessions
    /rpc/organizations.createPortalSession:
        post:
            description: Create a webhook portal session.
            operationId: createPortalSession
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreatePortalSessionResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: createPortalSession organizations
            tags:
                - organizations
            x-speakeasy-name-override: createPortalSession
            x-speakeasy-react-hook:
                name: CreatePortalSession
    /rpc/organizations.disableWebhooks:
        post:
            description: Disable  webhooks for the active organization.
            operationId: disableWebhooks
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: disableWebhooks organizations
            tags:
                - organizations
            x-speakeasy-name-override: disableWebhooks
            x-speakeasy-react-hook:
                name: DisableWebhooks
    /rpc/organizations.enableWebhooks:
        post:
            description: Enable  webhooks for the active organization.
            operationId: enableWebhooks
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: enableWebhooks organizations
            tags:
                - organizations
            x-speakeasy-name-override: enableWebhooks
            x-speakeasy-react-hook:
                name: EnableWebhooks
    /rpc/organizations.generateWorkOSAdminPortalLink:
        post:
            description: Generate a WorkOS Admin Portal link for the given intent (e.g. dsync, sso).
            operationId: generateWorkOSAdminPortalLink
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GenerateWorkOSAdminPortalLinkRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GenerateWorkOSAdminPortalLinkResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: generateWorkOSAdminPortalLink organizations
            tags:
                - organizations
            x-speakeasy-name-override: generateWorkOSAdminPortalLink
            x-speakeasy-react-hook:
                name: GenerateWorkOSAdminPortalLink
    /rpc/organizations.get:
        get:
            description: Get the active organization from the session.
            operationId: getOrganization
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Organization'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: get organizations
            tags:
                - organizations
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: Organization
    /rpc/organizations.getOnboardingStatus:
        get:
            description: Get the onboarding status for the active organization by checking WorkOS SSO connections and directory sync state.
            operationId: getOnboardingStatus
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/OnboardingStatusResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getOnboardingStatus organizations
            tags:
                - organizations
            x-speakeasy-name-override: getOnboardingStatus
            x-speakeasy-react-hook:
                name: OnboardingStatus
    /rpc/organizations.listInvites:
        get:
            description: List pending WorkOS invitations for the active organization.
            operationId: listInvites
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListInvitesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listInvites organizations
            tags:
                - organizations
            x-speakeasy-name-override: listInvites
            x-speakeasy-react-hook:
                name: ListInvites
    /rpc/organizations.listUsers:
        get:
            description: List users in the active organization from Gram organization_user_relationships.
            operationId: listOrganizationUsers
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListUsersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listUsers organizations
            tags:
                - organizations
            x-speakeasy-name-override: listUsers
            x-speakeasy-react-hook:
                name: ListOrganizationUsers
    /rpc/organizations.removeUser:
        delete:
            description: Remove a user from the active organization in Gram and delete their WorkOS organization membership.
            operationId: removeOrganizationUser
            parameters:
                - allowEmptyValue: true
                  description: Gram user ID to remove.
                  in: query
                  name: user_id
                  required: true
                  schema:
                    description: Gram user ID to remove.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: removeUser organizations
            tags:
                - organizations
            x-speakeasy-name-override: removeUser
            x-speakeasy-react-hook:
                name: RemoveOrganizationUser
    /rpc/organizations.revokeInvite:
        delete:
            description: Revoke a pending WorkOS invitation.
            operationId: revokeInvite
            parameters:
                - allowEmptyValue: true
                  description: WorkOS invitation ID.
                  in: query
                  name: invitation_id
                  required: true
                  schema:
                    description: WorkOS invitation ID.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: revokeInvite organizations
            tags:
                - organizations
            x-speakeasy-name-override: revokeInvite
            x-speakeasy-react-hook:
                name: RevokeInvite
    /rpc/organizations.sendEnterpriseAdminOnboardingEmail:
        post:
            description: Send the enterprise admin onboarding email to one or more recipients. The email links each recipient to the wizard for the active organization. Used by the Platform Admin onboarding tools.
            operationId: sendEnterpriseAdminOnboardingEmail
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SendEnterpriseAdminOnboardingEmailRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SendEnterpriseAdminOnboardingEmailResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: sendEnterpriseAdminOnboardingEmail organizations
            tags:
                - organizations
            x-speakeasy-name-override: sendEnterpriseAdminOnboardingEmail
            x-speakeasy-react-hook:
                name: SendEnterpriseAdminOnboardingEmail
    /rpc/organizations.sendInvite:
        post:
            description: Send a WorkOS invitation for the active organization.
            operationId: sendInvite
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SendInviteRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/OrganizationInvitation'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: sendInvite organizations
            tags:
                - organizations
            x-speakeasy-name-override: sendInvite
            x-speakeasy-react-hook:
                name: SendInvite
    /rpc/organizations.updateInviteRole:
        put:
            description: Change the role assigned to a pending WorkOS invitation.
            operationId: updateInviteRole
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateInviteRoleRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/OrganizationInvitation'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: updateInviteRole organizations
            tags:
                - organizations
            x-speakeasy-name-override: updateInviteRole
            x-speakeasy-react-hook:
                name: UpdateInviteRole
    /rpc/organizations.verifyOnboardingHooksSetup:
        get:
            description: Return recent hook events for the active organization so the onboarding wizard can confirm that coding agent instrumentation is delivering events to Gram. Polled from the confirm-traffic step.
            operationId: verifyOnboardingHooksSetup
            parameters:
                - allowEmptyValue: true
                  description: Only return events with time_unix_nano greater than this value. Pass the previous response's latest_unix_nano to poll for new events. Stringified to preserve int64 precision.
                  in: query
                  name: since_unix_nano
                  schema:
                    description: Only return events with time_unix_nano greater than this value. Pass the previous response's latest_unix_nano to poll for new events. Stringified to preserve int64 precision.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/VerifyOnboardingHooksSetupResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: verifyOnboardingHooksSetup organizations
            tags:
                - organizations
            x-speakeasy-name-override: verifyOnboardingHooksSetup
            x-speakeasy-react-hook:
                name: VerifyOnboardingHooksSetup
    /rpc/otelForwarding.deleteConfig:
        post:
            description: Delete the org-wide OTEL forwarding config.
            operationId: deleteOtelForwardingConfig
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: deleteConfig otelForwarding
            tags:
                - otelForwarding
            x-speakeasy-name-override: deleteConfig
            x-speakeasy-react-hook:
                name: DeleteOtelForwardingConfig
    /rpc/otelForwarding.getConfig:
        get:
            description: Get the org-wide OTEL forwarding config. Returns an empty config (enabled=false, no URL) when none is set.
            operationId: getOtelForwardingConfig
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/OtelForwardingConfig'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: getConfig otelForwarding
            tags:
                - otelForwarding
            x-speakeasy-name-override: getConfig
            x-speakeasy-react-hook:
                name: OtelForwardingConfig
    /rpc/otelForwarding.upsertConfig:
        post:
            description: Create or update the org-wide OTEL forwarding config. Replaces the full header set on each call.
            operationId: upsertOtelForwardingConfig
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpsertConfigRequestBody3'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/OtelForwardingConfig'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: upsertConfig otelForwarding
            tags:
                - otelForwarding
            x-speakeasy-name-override: upsertConfig
            x-speakeasy-react-hook:
                name: UpsertOtelForwardingConfig
    /rpc/packages.create:
        post:
            description: Create a new package for a project.
            operationId: createPackage
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreatePackageForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreatePackageResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: createPackage packages
            tags:
                - packages
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: CreatePackage
    /rpc/packages.list:
        get:
            description: List all packages for a project.
            operationId: listPackages
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListPackagesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listPackages packages
            tags:
                - packages
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: ListPackages
    /rpc/packages.listVersions:
        get:
            description: List published versions of a package.
            operationId: listVersions
            parameters:
                - allowEmptyValue: true
                  description: The name of the package
                  in: query
                  name: name
                  required: true
                  schema:
                    description: The name of the package
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListVersionsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listVersions packages
            tags:
                - packages
            x-speakeasy-name-override: listVersions
            x-speakeasy-react-hook:
                name: ListVersions
    /rpc/packages.publish:
        post:
            description: Publish a new version of a package.
            operationId: publish
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/PublishPackageForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PublishPackageResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: publish packages
            tags:
                - packages
            x-speakeasy-name-override: publish
            x-speakeasy-react-hook:
                name: PublishPackage
    /rpc/packages.update:
        put:
            description: Update package details.
            operationId: updatePackage
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdatePackageForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UpdatePackageResult'
                    description: OK response.
                "304":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/NotModified'
                    description: 'not_modified: Not Modified response.'
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: updatePackage packages
            tags:
                - packages
            x-speakeasy-name-override: update
            x-speakeasy-react-hook:
                name: UpdatePackage
    /rpc/platformMcp.dismissOnboarding:
        post:
            description: Dismiss the optional current user's Platform MCP onboarding workflow without changing organization setup or project resources.
            operationId: dismissPlatformMCPOnboarding
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: dismissOnboarding platformMcp
            tags:
                - platformMcp
            x-speakeasy-name-override: dismissOnboarding
            x-speakeasy-react-hook:
                name: DismissPlatformMCPOnboarding
    /rpc/platformMcp.distributeOnboardingCandidate:
        post:
            description: Attach the workflow-bound ready local MCP to the selected project's existing Default plugin. The caller supplies only the selected project slug and its opaque server-issued version token.
            operationId: distributePlatformMCPOnboardingCandidate
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/DistributeOnboardingCandidateRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PlatformMCPOnboardingState'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: distributeOnboardingCandidate platformMcp
            tags:
                - platformMcp
            x-speakeasy-name-override: distributeOnboardingCandidate
            x-speakeasy-react-hook:
                name: DistributePlatformMCPOnboardingCandidate
    /rpc/platformMcp.getOnboarding:
        get:
            description: Get the current user's safe Platform MCP onboarding projection for the active organization.
            operationId: getPlatformMCPOnboarding
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PlatformMCPOnboardingState'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getOnboarding platformMcp
            tags:
                - platformMcp
            x-speakeasy-name-override: getOnboarding
            x-speakeasy-react-hook:
                name: PlatformMCPOnboarding
    /rpc/platformMcp.recheckOnboardingReadiness:
        post:
            description: Force a rate-limited authenticated readiness recheck for the workflow-bound local registration.
            operationId: recheckPlatformMCPOnboardingReadiness
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PlatformMCPOnboardingState'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: recheckOnboardingReadiness platformMcp
            tags:
                - platformMcp
            x-speakeasy-name-override: recheckOnboardingReadiness
            x-speakeasy-react-hook:
                name: RecheckPlatformMCPOnboardingReadiness
    /rpc/platformMcp.recordAgentConfigurationCopied:
        post:
            description: Record that the user copied the displayed Platform MCP configuration or completed an equivalent supported agent-setup action.
            operationId: recordPlatformMCPAgentConfigurationCopied
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PlatformMCPOnboardingState'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: recordAgentConfigurationCopied platformMcp
            tags:
                - platformMcp
            x-speakeasy-name-override: recordAgentConfigurationCopied
            x-speakeasy-react-hook:
                name: RecordPlatformMCPAgentConfigurationCopied
    /rpc/platformMcp.recordDashboardCtaEvent:
        post:
            description: Record a bounded Platform MCP dashboard CTA impression, selection, or dismissal.
            operationId: recordPlatformMCPDashboardCtaEvent
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RecordDashboardCtaEventRequestBody'
                required: true
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: recordDashboardCtaEvent platformMcp
            tags:
                - platformMcp
            x-speakeasy-name-override: recordDashboardCtaEvent
            x-speakeasy-react-hook:
                name: RecordPlatformMCPDashboardCtaEvent
    /rpc/platformMcp.recordInstallIntent:
        post:
            description: Record a selected manual-install client family for the current user's Platform MCP workflow.
            operationId: recordPlatformMCPInstallIntent
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RecordInstallIntentRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PlatformMCPOnboardingState'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: recordInstallIntent platformMcp
            tags:
                - platformMcp
            x-speakeasy-name-override: recordInstallIntent
            x-speakeasy-react-hook:
                name: RecordPlatformMCPInstallIntent
    /rpc/platformMcp.removeOnboardingDistribution:
        post:
            description: Remove only the workflow-bound MCP from the selected project's existing Default plugin. Registration, readiness, connection, and prior evidence remain intact.
            operationId: removePlatformMCPOnboardingDistribution
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/DistributeOnboardingCandidateRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PlatformMCPOnboardingState'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: removeOnboardingDistribution platformMcp
            tags:
                - platformMcp
            x-speakeasy-name-override: removeOnboardingDistribution
            x-speakeasy-react-hook:
                name: RemovePlatformMCPOnboardingDistribution
    /rpc/platformMcp.repairOnboardingPublication:
        post:
            description: Retry in-memory local package publication for the workflow-bound distribution without changing its attachment or version.
            operationId: repairPlatformMCPOnboardingPublication
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/DistributeOnboardingCandidateRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PlatformMCPOnboardingState'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: repairOnboardingPublication platformMcp
            tags:
                - platformMcp
            x-speakeasy-name-override: repairOnboardingPublication
            x-speakeasy-react-hook:
                name: RepairPlatformMCPOnboardingPublication
    /rpc/platformMcp.startOnboarding:
        post:
            description: Create or resume the current user's durable Platform MCP onboarding workflow.
            operationId: startPlatformMCPOnboarding
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/StartOnboardingRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PlatformMCPOnboardingState'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: startOnboarding platformMcp
            tags:
                - platformMcp
            x-speakeasy-name-override: startOnboarding
            x-speakeasy-react-hook:
                name: StartPlatformMCPOnboarding
    /rpc/platformMcp.startOnboardingSetup:
        post:
            description: Return the secure setup continuation for the workflow-bound registration. Browser Catalogue registrations return their existing same-origin dashboard Inspect page; the local fixture returns a one-time handoff for its synthetic provider setup endpoint.
            operationId: startPlatformMCPOnboardingSetup
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PlatformMCPOnboardingSetupHandoff'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: startOnboardingSetup platformMcp
            tags:
                - platformMcp
            x-speakeasy-name-override: startOnboardingSetup
            x-speakeasy-react-hook:
                name: StartPlatformMCPOnboardingSetup
    /rpc/plugins.addPluginServer:
        post:
            description: Add an MCP server to a plugin.
            operationId: addPluginServer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/AddPluginServerForm'
                required: true
            responses:
                "201":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PluginServer'
                    description: Created response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: addPluginServer plugins
            tags:
                - plugins
            x-speakeasy-name-override: addPluginServer
            x-speakeasy-react-hook:
                name: AddPluginServer
    /rpc/plugins.createPlugin:
        post:
            description: Create a new plugin.
            operationId: createPlugin
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreatePluginForm'
                required: true
            responses:
                "201":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Plugin'
                    description: Created response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: createPlugin plugins
            tags:
                - plugins
            x-speakeasy-name-override: createPlugin
            x-speakeasy-react-hook:
                name: CreatePlugin
    /rpc/plugins.deletePlugin:
        delete:
            description: Delete a plugin.
            operationId: deletePlugin
            parameters:
                - allowEmptyValue: true
                  in: query
                  name: id
                  required: true
                  schema:
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: deletePlugin plugins
            tags:
                - plugins
            x-speakeasy-name-override: deletePlugin
            x-speakeasy-react-hook:
                name: DeletePlugin
    /rpc/plugins.downloadCodexInstallScript:
        get:
            description: Download a bash install script that registers the Codex observability marketplace and pre-approves all hook events. Requires a published marketplace.
            operationId: downloadCodexInstallScript
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        text/x-shellscript:
                            schema:
                                format: binary
                                type: string
                    description: OK response.
                    headers:
                        Content-Disposition:
                            schema:
                                type: string
                        Content-Type:
                            schema:
                                type: string
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: downloadCodexInstallScript plugins
            tags:
                - plugins
            x-speakeasy-name-override: downloadCodexInstallScript
    /rpc/plugins.downloadObservabilityPlugin:
        get:
            description: Download a ZIP of the per-org observability plugin (Gram hooks). Mints a fresh hooks-scoped API key on each download and embeds it in the plugin's hook script.
            operationId: downloadObservabilityPlugin
            parameters:
                - allowEmptyValue: true
                  description: Target platform.
                  in: query
                  name: platform
                  required: true
                  schema:
                    description: Target platform.
                    enum:
                        - claude
                        - cursor
                        - codex
                        - opencode
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/zip:
                            schema:
                                format: binary
                                type: string
                    description: OK response.
                    headers:
                        Content-Disposition:
                            schema:
                                type: string
                        Content-Type:
                            schema:
                                type: string
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: downloadObservabilityPlugin plugins
            tags:
                - plugins
            x-speakeasy-name-override: downloadObservabilityPlugin
    /rpc/plugins.downloadPlatformMCPPlugin:
        get:
            description: Download a credential-free Platform MCP plugin ZIP from the server-owned package definition. This does not require a GitHub marketplace and does not mint an API key.
            operationId: downloadPlatformMCPPlugin
            parameters:
                - allowEmptyValue: true
                  description: Target package format.
                  in: query
                  name: platform
                  required: true
                  schema:
                    description: Target package format.
                    enum:
                        - claude
                        - cursor
                        - codex
                        - opencode
                        - agent-plugin
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/zip:
                            schema:
                                format: binary
                                type: string
                    description: OK response.
                    headers:
                        Content-Disposition:
                            schema:
                                type: string
                        Content-Type:
                            schema:
                                type: string
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "412":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'failed_precondition: resource is not in a valid state for this operation'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: downloadPlatformMCPPlugin plugins
            tags:
                - plugins
            x-speakeasy-name-override: downloadPlatformMCPPlugin
    /rpc/plugins.downloadPluginPackage:
        get:
            description: Download a ZIP of a single plugin package for direct installation.
            operationId: downloadPluginPackage
            parameters:
                - allowEmptyValue: true
                  description: The plugin to download.
                  in: query
                  name: plugin_id
                  required: true
                  schema:
                    description: The plugin to download.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Target platform to download plugins for.
                  in: query
                  name: platform
                  required: true
                  schema:
                    description: Target platform to download plugins for.
                    enum:
                        - claude
                        - cursor
                        - codex
                        - agent-plugin
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/zip:
                            schema:
                                format: binary
                                type: string
                    description: OK response.
                    headers:
                        Content-Disposition:
                            schema:
                                type: string
                        Content-Type:
                            schema:
                                type: string
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "412":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'failed_precondition: resource is not in a valid state for this operation'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: downloadPluginPackage plugins
            tags:
                - plugins
            x-speakeasy-name-override: downloadPluginPackage
    /rpc/plugins.getMarketplaceSettings:
        get:
            description: Get the marketplace settings for the current project, including the effective marketplace name and the server-side default.
            operationId: getMarketplaceSettings
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/MarketplaceSettingsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getMarketplaceSettings plugins
            tags:
                - plugins
            x-speakeasy-name-override: getMarketplaceSettings
            x-speakeasy-react-hook:
                name: MarketplaceSettings
    /rpc/plugins.getPlatformMCPPackageStatus:
        get:
            description: Get the organization-scoped Platform MCP package and canonical default-project marketplace status.
            operationId: getPlatformMCPPackageStatus
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PlatformMCPPackageStatusResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getPlatformMCPPackageStatus plugins
            tags:
                - plugins
            x-speakeasy-name-override: getPlatformMCPPackageStatus
            x-speakeasy-react-hook:
                name: PlatformMCPPackageStatus
    /rpc/plugins.getPlugin:
        get:
            description: Get a plugin with its servers and assignments.
            operationId: getPlugin
            parameters:
                - allowEmptyValue: true
                  in: query
                  name: id
                  required: true
                  schema:
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Plugin'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getPlugin plugins
            tags:
                - plugins
            x-speakeasy-name-override: getPlugin
            x-speakeasy-react-hook:
                name: Plugin
    /rpc/plugins.getPublishStatus:
        get:
            description: Check whether GitHub publishing is configured and connected for this project.
            operationId: getPublishStatus
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PublishStatusResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getPublishStatus plugins
            tags:
                - plugins
            x-speakeasy-name-override: getPublishStatus
            x-speakeasy-react-hook:
                name: PublishStatus
    /rpc/plugins.listPlugins:
        get:
            description: List all plugins for the current project.
            operationId: listPlugins
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListPluginsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listPlugins plugins
            tags:
                - plugins
            x-speakeasy-name-override: listPlugins
            x-speakeasy-react-hook:
                name: Plugins
    /rpc/plugins.publishPlugins:
        post:
            description: Generate and publish all plugin packages to a GitHub repository.
            operationId: publishPlugins
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/PublishPluginsRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PublishPluginsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: publishPlugins plugins
            tags:
                - plugins
            x-speakeasy-name-override: publishPlugins
            x-speakeasy-react-hook:
                name: PublishPlugins
    /rpc/plugins.removePluginServer:
        delete:
            description: Remove a server from a plugin.
            operationId: removePluginServer
            parameters:
                - allowEmptyValue: true
                  description: The plugin server ID to remove.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The plugin server ID to remove.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  in: query
                  name: plugin_id
                  required: true
                  schema:
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: removePluginServer plugins
            tags:
                - plugins
            x-speakeasy-name-override: removePluginServer
            x-speakeasy-react-hook:
                name: RemovePluginServer
    /rpc/plugins.repairPlatformMCPPackage:
        post:
            description: Idempotently publish or repair the Platform MCP package in the organization's canonical default-project marketplace.
            operationId: repairPlatformMCPPackage
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PlatformMCPPackageStatusResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "412":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'failed_precondition: resource is not in a valid state for this operation'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: repairPlatformMCPPackage plugins
            tags:
                - plugins
            x-speakeasy-name-override: repairPlatformMCPPackage
            x-speakeasy-react-hook:
                name: RepairPlatformMCPPackage
    /rpc/plugins.setPluginAssignments:
        put:
            description: Replace all assignments for a plugin with the given list of principal URNs.
            operationId: setPluginAssignments
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetPluginAssignmentsForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SetPluginAssignmentsResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: setPluginAssignments plugins
            tags:
                - plugins
            x-speakeasy-name-override: setPluginAssignments
            x-speakeasy-react-hook:
                name: SetPluginAssignments
    /rpc/plugins.updateMarketplaceSettings:
        post:
            description: Update the marketplace settings for the current project. If a marketplace is already published, the updated settings are pushed to GitHub before the call returns.
            operationId: updateMarketplaceSettings
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateMarketplaceSettingsRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UpdateMarketplaceSettingsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: updateMarketplaceSettings plugins
            tags:
                - plugins
            x-speakeasy-name-override: updateMarketplaceSettings
            x-speakeasy-react-hook:
                name: UpdateMarketplaceSettings
    /rpc/plugins.updatePlugin:
        put:
            description: Update plugin metadata.
            operationId: updatePlugin
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdatePluginForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Plugin'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: updatePlugin plugins
            tags:
                - plugins
            x-speakeasy-name-override: updatePlugin
            x-speakeasy-react-hook:
                name: UpdatePlugin
    /rpc/plugins.updatePluginServer:
        put:
            description: Update a server's configuration within a plugin.
            operationId: updatePluginServer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdatePluginServerForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PluginServer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: updatePluginServer plugins
            tags:
                - plugins
            x-speakeasy-name-override: updatePluginServer
            x-speakeasy-react-hook:
                name: UpdatePluginServer
    /rpc/productFeatures.get:
        get:
            description: Get the current state of all product feature flags.
            operationId: getProductFeatures
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetProductFeaturesResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getProductFeatures features
            tags:
                - features
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: ProductFeatures
    /rpc/productFeatures.set:
        post:
            description: Enable or disable an organization feature flag.
            operationId: setProductFeature
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetProductFeatureRequestBody'
                required: true
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: setProductFeature features
            tags:
                - features
            x-speakeasy-name-override: set
    /rpc/productFeatures.setRemoteSessionAutoRefreshPolicy:
        post:
            description: Set the organization policy for automatic remote-session refresh.
            operationId: setRemoteSessionAutoRefreshPolicy
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetRemoteSessionAutoRefreshPolicyRequestBody'
                required: true
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: setRemoteSessionAutoRefreshPolicy features
            tags:
                - features
            x-speakeasy-name-override: setRemoteSessionAutoRefreshPolicy
            x-speakeasy-react-hook:
                name: SetRemoteSessionAutoRefreshPolicy
    /rpc/projects.create:
        post:
            description: Create a new project.
            operationId: createProject
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateProjectRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateProjectResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: createProject projects
            tags:
                - projects
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: CreateProject
    /rpc/projects.delete:
        delete:
            description: Delete a project by its ID
            operationId: deleteProject
            parameters:
                - allowEmptyValue: true
                  description: The id of the project to delete
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The id of the project to delete
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: deleteProject projects
            tags:
                - projects
            x-speakeasy-name-override: deleteById
            x-speakeasy-react-hook:
                name: DeleteProject
    /rpc/projects.get:
        get:
            description: Get project details by slug.
            operationId: getProject
            parameters:
                - allowEmptyValue: true
                  description: The slug of the project to get
                  in: query
                  name: slug
                  required: true
                  schema:
                    description: A short url-friendly label that uniquely identifies a resource.
                    maxLength: 40
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetProjectResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: getProject projects
            tags:
                - projects
            x-speakeasy-name-override: read
            x-speakeasy-react-hook:
                name: Project
    /rpc/projects.list:
        get:
            description: List all projects for an organization.
            operationId: listProjects
            parameters:
                - allowEmptyValue: true
                  description: The ID of the organization to list projects for
                  in: query
                  name: organization_id
                  required: true
                  schema:
                    description: The ID of the organization to list projects for
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListProjectsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: listProjects projects
            tags:
                - projects
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: ListProjects
    /rpc/projects.listAllowedOrigins:
        get:
            description: List allowed origins for a project.
            operationId: listAllowedOrigins
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListAllowedOriginsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listAllowedOrigins projects
            tags:
                - projects
            x-speakeasy-name-override: listAllowedOrigins
            x-speakeasy-react-hook:
                name: ListAllowedOrigins
    /rpc/projects.setLogo:
        post:
            description: Uploads a logo for a project.
            operationId: setProjectLogo
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetSignedAssetURLForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SetProjectLogoResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: setLogo projects
            tags:
                - projects
            x-speakeasy-name-override: setLogo
            x-speakeasy-react-hook:
                name: setProjectLogo
    /rpc/projects.setOrganizationWhitelist:
        post:
            description: Set organization whitelist status (admin only - requires speakeasy-team API key)
            operationId: setOrganizationWhitelist
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetOrganizationWhitelistRequestBody'
                required: true
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
            summary: setOrganizationWhitelist projects
            tags:
                - projects
            x-speakeasy-name-override: setOrganizationWhitelist
    /rpc/projects.upsertAllowedOrigin:
        post:
            description: Upsert an allowed origin for a project.
            operationId: upsertAllowedOrigin
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpsertAllowedOriginForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UpsertAllowedOriginResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: upsertAllowedOrigin projects
            tags:
                - projects
            x-speakeasy-name-override: upsertAllowedOrigin
            x-speakeasy-react-hook:
                name: UpsertAllowedOrigin
    /rpc/remoteMcp.createServer:
        post:
            description: Create a new remote MCP server
            operationId: createRemoteMcpServer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateServerForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteMcpServer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: createServer remoteMcp
            tags:
                - remoteMcp
            x-speakeasy-name-override: createServer
            x-speakeasy-react-hook:
                name: CreateRemoteMcpServer
    /rpc/remoteMcp.createServerHeader:
        post:
            description: Create a header on a remote MCP server
            operationId: createRemoteMcpServerHeader
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateServerHeaderForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteMcpServerHeader'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: createServerHeader remoteMcp
            tags:
                - remoteMcp
            x-speakeasy-name-override: createServerHeader
            x-speakeasy-react-hook:
                name: CreateRemoteMcpServerHeader
    /rpc/remoteMcp.deleteServer:
        delete:
            description: Delete a remote MCP server
            operationId: deleteRemoteMcpServer
            parameters:
                - allowEmptyValue: true
                  description: The ID of the remote MCP server to delete
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the remote MCP server to delete
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: deleteServer remoteMcp
            tags:
                - remoteMcp
            x-speakeasy-name-override: deleteServer
            x-speakeasy-react-hook:
                name: DeleteRemoteMcpServer
    /rpc/remoteMcp.deleteServerHeader:
        delete:
            description: Delete a remote MCP server header
            operationId: deleteRemoteMcpServerHeader
            parameters:
                - allowEmptyValue: true
                  description: The ID of the header to delete
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the header to delete
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: deleteServerHeader remoteMcp
            tags:
                - remoteMcp
            x-speakeasy-name-override: deleteServerHeader
            x-speakeasy-react-hook:
                name: DeleteRemoteMcpServerHeader
    /rpc/remoteMcp.discoverProtectedResourceMetadata:
        post:
            description: Probe the remote MCP server's origin for an RFC 9728 .well-known/oauth-protected-resource document and return either the parsed metadata or a typed unavailability reason. Runs server-side under guardian.Policy so production resource servers without CORS can still be inspected.
            operationId: discoverRemoteMcpProtectedResourceMetadata
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/DiscoverProtectedResourceMetadataRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ProtectedResourceMetadataDiscovery'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: discoverProtectedResourceMetadata remoteMcp
            tags:
                - remoteMcp
            x-speakeasy-name-override: discoverProtectedResourceMetadata
            x-speakeasy-react-hook:
                name: DiscoverRemoteMcpProtectedResourceMetadata
    /rpc/remoteMcp.getServer:
        get:
            description: Get a remote MCP server by ID or slug. Exactly one of id or slug must be provided.
            operationId: getRemoteMcpServer
            parameters:
                - allowEmptyValue: true
                  description: The ID of the remote MCP server. Mutually exclusive with slug.
                  in: query
                  name: id
                  schema:
                    description: The ID of the remote MCP server. Mutually exclusive with slug.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: The slug of the remote MCP server. Mutually exclusive with id.
                  in: query
                  name: slug
                  schema:
                    description: The slug of the remote MCP server. Mutually exclusive with id.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteMcpServer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: getServer remoteMcp
            tags:
                - remoteMcp
            x-speakeasy-name-override: getServer
            x-speakeasy-react-hook:
                name: GetRemoteMcpServer
    /rpc/remoteMcp.getServerHeader:
        get:
            description: Get a remote MCP server header by ID
            operationId: getRemoteMcpServerHeader
            parameters:
                - allowEmptyValue: true
                  description: The ID of the header
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the header
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteMcpServerHeader'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: getServerHeader remoteMcp
            tags:
                - remoteMcp
            x-speakeasy-name-override: getServerHeader
            x-speakeasy-react-hook:
                name: GetRemoteMcpServerHeader
    /rpc/remoteMcp.listServerHeaders:
        get:
            description: List the headers configured for a remote MCP server
            operationId: listRemoteMcpServerHeaders
            parameters:
                - allowEmptyValue: true
                  description: The ID of the remote MCP server
                  in: query
                  name: remote_mcp_server_id
                  required: true
                  schema:
                    description: The ID of the remote MCP server
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListServerHeadersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listServerHeaders remoteMcp
            tags:
                - remoteMcp
            x-speakeasy-name-override: listServerHeaders
            x-speakeasy-react-hook:
                name: RemoteMcpServerHeaders
    /rpc/remoteMcp.listServers:
        get:
            description: List all remote MCP servers for a project
            operationId: listRemoteMcpServers
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListServersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listServers remoteMcp
            tags:
                - remoteMcp
            x-speakeasy-name-override: listServers
            x-speakeasy-react-hook:
                name: RemoteMcpServers
    /rpc/remoteMcp.updateServer:
        post:
            description: Update a remote MCP server
            operationId: updateRemoteMcpServer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateServerForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteMcpServer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: updateServer remoteMcp
            tags:
                - remoteMcp
            x-speakeasy-name-override: updateServer
            x-speakeasy-react-hook:
                name: UpdateRemoteMcpServer
    /rpc/remoteMcp.updateServerHeader:
        post:
            description: Update a remote MCP server header
            operationId: updateRemoteMcpServerHeader
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateServerHeaderForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteMcpServerHeader'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: updateServerHeader remoteMcp
            tags:
                - remoteMcp
            x-speakeasy-name-override: updateServerHeader
            x-speakeasy-react-hook:
                name: UpdateRemoteMcpServerHeader
    /rpc/remoteMcp.verifyURL:
        post:
            description: Probe a candidate remote MCP server URL by issuing an MCP initialize request and reporting the outcome. Used to give users a reachability signal before they save a new or updated remote MCP server. Treats reachable-but-401/403 responses as verified — auth verification is intentionally out of scope.
            operationId: verifyRemoteMcpURL
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/VerifyURLForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/VerifyURLResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: verifyURL remoteMcp
            tags:
                - remoteMcp
            x-speakeasy-name-override: verifyURL
            x-speakeasy-react-hook:
                name: VerifyRemoteMcpURL
    /rpc/remoteSessionClients.attachUserSessionIssuer:
        post:
            description: Attach a user_session_issuer to a remote_session_client by recording the binding in the join table. Rejected when another client is already bound to the same user_session_issuer for this client's remote_session_issuer.
            operationId: attachUserSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/AttachUserSessionIssuerForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionClient'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: attachUserSessionIssuer remoteSessionClients
            tags:
                - remoteSessionClients
            x-speakeasy-name-override: attachUserSessionIssuer
            x-speakeasy-react-hook:
                name: AttachUserSessionIssuer
    /rpc/remoteSessionClients.create:
        post:
            description: Register a remote_session_client by supplying a client_id and optional client_secret obtained out-of-band from the upstream issuer.
            operationId: createRemoteSessionClient
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateRemoteSessionClientForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionClient'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: createRemoteSessionClient remoteSessionClients
            tags:
                - remoteSessionClients
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: CreateRemoteSessionClient
    /rpc/remoteSessionClients.createCimd:
        post:
            description: Register a remote_session_client in Client ID Metadata Document (CIMD) mode. Gram generates the client_id (the URL of a hosted client metadata document) and serves the document publicly; the client carries no secret and authenticates with token_endpoint_auth_method=none. The owning issuer must advertise client_id_metadata_document_supported.
            operationId: createCimdRemoteSessionClient
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateCimdForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionClient'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: createCimd remoteSessionClients
            tags:
                - remoteSessionClients
            x-speakeasy-name-override: createCimd
            x-speakeasy-react-hook:
                name: CreateCimdRemoteSessionClient
    /rpc/remoteSessionClients.delete:
        delete:
            description: Soft-delete a remote_session_client. Cascades to remote_sessions rows pointing at this client; affected principals are forced to re-authenticate.
            operationId: deleteRemoteSessionClient
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_client id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The remote_session_client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: deleteRemoteSessionClient remoteSessionClients
            tags:
                - remoteSessionClients
            x-speakeasy-name-override: delete
            x-speakeasy-react-hook:
                name: DeleteRemoteSessionClient
    /rpc/remoteSessionClients.detachUserSessionIssuer:
        post:
            description: Detach a user_session_issuer from a remote_session_client by removing the binding from the join table. A no-op when the binding does not exist.
            operationId: detachUserSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/AttachUserSessionIssuerForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionClient'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: detachUserSessionIssuer remoteSessionClients
            tags:
                - remoteSessionClients
            x-speakeasy-name-override: detachUserSessionIssuer
            x-speakeasy-react-hook:
                name: DetachUserSessionIssuer
    /rpc/remoteSessionClients.get:
        get:
            description: Get a remote_session_client by id.
            operationId: getRemoteSessionClient
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_client id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The remote_session_client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionClient'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: getRemoteSessionClient remoteSessionClients
            tags:
                - remoteSessionClients
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: RemoteSessionClient
    /rpc/remoteSessionClients.list:
        get:
            description: List remote_session_clients in the caller's project.
            operationId: listRemoteSessionClients
            parameters:
                - allowEmptyValue: true
                  description: Filter to clients registered with this issuer.
                  in: query
                  name: remote_session_issuer_id
                  schema:
                    description: Filter to clients registered with this issuer.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Filter to clients paired with this user_session_issuer.
                  in: query
                  name: user_session_issuer_id
                  schema:
                    description: Filter to clients paired with this user_session_issuer.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Pagination cursor.
                  in: query
                  name: cursor
                  schema:
                    description: Pagination cursor.
                    type: string
                - allowEmptyValue: true
                  description: Page size (default 50, max 100).
                  in: query
                  name: limit
                  schema:
                    description: Page size (default 50, max 100).
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListRemoteSessionClientsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listRemoteSessionClients remoteSessionClients
            tags:
                - remoteSessionClients
            x-speakeasy-name-override: list
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: RemoteSessionClients
    /rpc/remoteSessionClients.update:
        post:
            description: Rotate the client_secret or change the non-issuer settings on an existing remote_session_client. Issuer attachments are managed via attachUserSessionIssuer / detachUserSessionIssuer.
            operationId: updateRemoteSessionClient
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateRemoteSessionClientForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionClient'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: updateRemoteSessionClient remoteSessionClients
            tags:
                - remoteSessionClients
            x-speakeasy-name-override: update
            x-speakeasy-react-hook:
                name: UpdateRemoteSessionClient
    /rpc/remoteSessionIssuers.create:
        post:
            description: Create a new remote_session_issuer.
            operationId: createRemoteSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateRemoteSessionIssuerForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: createRemoteSessionIssuer remoteSessionIssuers
            tags:
                - remoteSessionIssuers
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: CreateRemoteSessionIssuer
    /rpc/remoteSessionIssuers.delete:
        delete:
            description: Soft-delete a remote_session_issuer. Blocked if any remote_session_clients still reference it.
            operationId: deleteRemoteSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_issuer id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The remote_session_issuer id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: deleteRemoteSessionIssuer remoteSessionIssuers
            tags:
                - remoteSessionIssuers
            x-speakeasy-name-override: delete
            x-speakeasy-react-hook:
                name: DeleteRemoteSessionIssuer
    /rpc/remoteSessionIssuers.fetchMetadata:
        post:
            description: Hit an upstream issuer's RFC 8414 .well-known/oauth-authorization-server document and return a draft suitable for createRemoteSessionIssuer. Keyed by issuer URL; no record need exist and nothing is persisted. Use refreshMetadata to re-discover and persist against an existing issuer.
            operationId: fetchRemoteSessionIssuerMetadata
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/FetchIssuerMetadataRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuerDraft'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: fetchRemoteSessionIssuerMetadata remoteSessionIssuers
            tags:
                - remoteSessionIssuers
            x-speakeasy-name-override: fetchMetadata
            x-speakeasy-react-hook:
                name: FetchRemoteSessionIssuerMetadata
    /rpc/remoteSessionIssuers.get:
        get:
            description: |-
                Get a remote_session_issuer by id, by slug, or by upstream issuer URL. Provide exactly one.

                Looking up by issuer is how an automatic setup flow decides whether an upstream authorization server already has an identity provider before creating one: a 404 means nothing describes that URL yet, so create it. Unlike id and slug, which address at most one record, several issuers may legitimately describe the same URL — a project may keep its own alongside one inherited from its organization or from the platform catalog. This returns the one this project would use, preferring project over organization over platform and, within a tier, the oldest.

                The issuer URL is canonicalized before matching: scheme and host are lowercased, the scheme's default port is dropped, and trailing slashes are stripped. http and https are deliberately NOT equated, path case is significant, and a URL carrying a query or fragment is rejected (RFC 8414 forbids both on issuer identifiers). Canonicalization applies to the supplied URL only, never to stored values, so an issuer recorded with an unusual spelling may not be found and a duplicate is created instead, which is the safe direction to fail.
            operationId: getRemoteSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: The remote_session_issuer id.
                  in: query
                  name: id
                  schema:
                    description: The remote_session_issuer id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: The remote_session_issuer slug.
                  in: query
                  name: slug
                  schema:
                    description: The remote_session_issuer slug.
                    type: string
                - allowEmptyValue: true
                  description: The upstream issuer URL (e.g. https://login.linear.app). Returns the issuer this project would use for that URL, or 404 when none describes it.
                  in: query
                  name: issuer
                  schema:
                    description: The upstream issuer URL (e.g. https://login.linear.app). Returns the issuer this project would use for that URL, or 404 when none describes it.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: getRemoteSessionIssuer remoteSessionIssuers
            tags:
                - remoteSessionIssuers
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: RemoteSessionIssuer
    /rpc/remoteSessionIssuers.getDuplicatePreflight:
        get:
            description: |-
                Report the existing remote_session_issuers that already describe an upstream issuer URL, so a create or edit form can warn before it duplicates one. Covers this project's own issuers plus those inherited from the organization and the platform catalog.

                Advisory only. Duplicating an issuer URL is legitimate — a project may want its own record so it can attach different documentation, branding or scopes — so nothing here blocks a write, and no lock is taken. A create that races another create still produces two records, which is a supported state.

                Matching uses the same canonicalization as getRemoteSessionIssuer. A URL that cannot be parsed as an issuer identifier returns no matches rather than an error, because a partially typed URL is the normal state of a form field.
            operationId: getRemoteSessionIssuerDuplicatePreflight
            parameters:
                - allowEmptyValue: true
                  description: The upstream issuer URL being entered (e.g. https://login.linear.app). Empty or unparseable returns no matches.
                  in: query
                  name: issuer
                  schema:
                    description: The upstream issuer URL being entered (e.g. https://login.linear.app). Empty or unparseable returns no matches.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuerDuplicatePreflight'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: getRemoteSessionIssuerDuplicatePreflight remoteSessionIssuers
            tags:
                - remoteSessionIssuers
            x-speakeasy-name-override: getDuplicatePreflight
            x-speakeasy-react-hook:
                name: RemoteSessionIssuerDuplicatePreflight
    /rpc/remoteSessionIssuers.list:
        get:
            description: List remote_session_issuers in the caller's project.
            operationId: listRemoteSessionIssuers
            parameters:
                - allowEmptyValue: true
                  description: Pagination cursor.
                  in: query
                  name: cursor
                  schema:
                    description: Pagination cursor.
                    type: string
                - allowEmptyValue: true
                  description: Page size (default 50, max 100).
                  in: query
                  name: limit
                  schema:
                    description: Page size (default 50, max 100).
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListRemoteSessionIssuersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listRemoteSessionIssuers remoteSessionIssuers
            tags:
                - remoteSessionIssuers
            x-speakeasy-name-override: list
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: RemoteSessionIssuers
    /rpc/remoteSessionIssuers.refreshMetadata:
        post:
            description: Re-fetch an existing remote_session_issuer's RFC 8414 metadata document and persist the discovered values. Keyed by issuer id. Only RFC 8414-derived columns are written — endpoints, the *_supported arrays, client_id_metadata_document_supported, and the documentation URLs. Gram behavior and display fields (oidc, passthrough, name, slug, logo, client setup documentation) are left alone. Requires project:write.
            operationId: refreshRemoteSessionIssuerMetadata
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RiskIDRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuerRefresh'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: refreshRemoteSessionIssuerMetadata remoteSessionIssuers
            tags:
                - remoteSessionIssuers
            x-speakeasy-name-override: refreshMetadata
            x-speakeasy-react-hook:
                name: RefreshRemoteSessionIssuerMetadata
    /rpc/remoteSessionIssuers.update:
        post:
            description: Update fields on an existing remote_session_issuer.
            operationId: updateRemoteSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateRemoteSessionIssuerForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RemoteSessionIssuer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: updateRemoteSessionIssuer remoteSessionIssuers
            tags:
                - remoteSessionIssuers
            x-speakeasy-name-override: update
            x-speakeasy-react-hook:
                name: UpdateRemoteSessionIssuer
    /rpc/remoteSessions.list:
        get:
            description: List remote_sessions in the caller's project. access_token_encrypted and refresh_token_encrypted are never returned — only metadata (access_expires_at, refresh_expires_at, scopes).
            operationId: listRemoteSessions
            parameters:
                - allowEmptyValue: true
                  description: Exact-match filter on subject URN.
                  in: query
                  name: subject_urn
                  schema:
                    description: Exact-match filter on subject URN.
                    type: string
                - allowEmptyValue: true
                  description: Filter by remote_session_client id.
                  in: query
                  name: remote_session_client_id
                  schema:
                    description: Filter by remote_session_client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Pagination cursor.
                  in: query
                  name: cursor
                  schema:
                    description: Pagination cursor.
                    type: string
                - allowEmptyValue: true
                  description: Page size (default 50, max 100).
                  in: query
                  name: limit
                  schema:
                    description: Page size (default 50, max 100).
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListRemoteSessionsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listRemoteSessions remoteSessions
            tags:
                - remoteSessions
            x-speakeasy-name-override: list
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: RemoteSessions
    /rpc/remoteSessions.revoke:
        post:
            description: Drop a remote_session row. The next /mcp call by that principal triggers a fresh authn challenge.
            operationId: revokeRemoteSession
            parameters:
                - allowEmptyValue: true
                  description: The remote_session id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The remote_session id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: revokeRemoteSession remoteSessions
            tags:
                - remoteSessions
            x-speakeasy-name-override: revoke
            x-speakeasy-react-hook:
                name: RevokeRemoteSession
    /rpc/resources.list:
        get:
            description: List all resources for a project
            operationId: listResources
            parameters:
                - allowEmptyValue: true
                  description: The cursor to fetch results from
                  in: query
                  name: cursor
                  schema:
                    description: The cursor to fetch results from
                    type: string
                - allowEmptyValue: true
                  description: The number of resources to return per page
                  in: query
                  name: limit
                  schema:
                    description: The number of resources to return per page
                    format: int32
                    type: integer
                - allowEmptyValue: true
                  description: The deployment ID. If unset, latest deployment will be used.
                  in: query
                  name: deployment_id
                  schema:
                    description: The deployment ID. If unset, latest deployment will be used.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListResourcesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listResources resources
            tags:
                - resources
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: ListResources
    /rpc/risk.acknowledgePolicyChallenge:
        post:
            description: Acknowledge a risk policy warn/challenge from a warning-link token. Records the acknowledgement so the user's retried action proceeds; self-service (no admin approval).
            operationId: acknowledgeRiskPolicyChallenge
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/AcknowledgeRiskPolicyChallengeRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/AcknowledgeRiskPolicyChallengeResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: acknowledgeRiskPolicyChallenge risk
            tags:
                - risk
            x-speakeasy-group: risk.policyChallenges
            x-speakeasy-name-override: acknowledge
            x-speakeasy-react-hook:
                name: RiskAcknowledgePolicyChallenge
                type: mutation
    /rpc/risk.approvePolicyBypassRequest:
        post:
            description: Approve a risk policy bypass request for the requested policy target.
            operationId: approveRiskPolicyBypassRequest
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RiskPolicyBypassApprovalRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskPolicyBypassRequest'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: approveRiskPolicyBypassRequest risk
            tags:
                - risk
            x-speakeasy-group: risk.policyBypassRequests
            x-speakeasy-name-override: approve
            x-speakeasy-react-hook:
                name: RiskApprovePolicyBypassRequest
                type: mutation
    /rpc/risk.compileCELExpression:
        get:
            description: Compile a single CEL expression (a detection predicate or a policy scope predicate) without evaluating it, so the editor can validate as the author types. Returns ok=true when it compiles, otherwise ok=false with the compiler error message. An empty expression is valid (ok=true).
            operationId: compileExpr
            parameters:
                - allowEmptyValue: true
                  description: The CEL expression to compile. Empty is valid and compiles to ok=true.
                  in: query
                  name: expr
                  schema:
                    default: ""
                    description: The CEL expression to compile. Empty is valid and compiles to ok=true.
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ExprCompileResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: compileExpr risk
            tags:
                - risk
            x-speakeasy-group: risk.expr
            x-speakeasy-name-override: compile
            x-speakeasy-react-hook:
                name: RiskCompileExpr
    /rpc/risk.createCustomRule:
        post:
            description: Create a custom regex-backed detection rule for the current project.
            operationId: createCustomDetectionRule
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateCustomDetectionRuleRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskCustomDetectionRule'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: createCustomDetectionRule risk
            tags:
                - risk
            x-speakeasy-group: risk.customRules
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: RiskCreateCustomDetectionRule
                type: mutation
    /rpc/risk.createExclusions:
        post:
            description: Create a risk exclusion. Omit risk_policy_id to create a global exclusion that applies to every policy in the project.
            operationId: createRiskExclusion
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateRiskExclusionRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskExclusion'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: createRiskExclusion risk
            tags:
                - risk
            x-speakeasy-group: risk.exclusions
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: RiskCreateExclusion
                type: mutation
    /rpc/risk.createPolicy:
        post:
            description: Create a new risk analysis policy for the current project.
            operationId: createRiskPolicy
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateRiskPolicyRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskPolicy'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: createRiskPolicy risk
            tags:
                - risk
            x-speakeasy-group: risk.policies
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: RiskCreatePolicy
                type: mutation
    /rpc/risk.createPolicyBypassRequest:
        post:
            description: Create or refresh a risk policy bypass request from a signed request URL token.
            operationId: createRiskPolicyBypassRequest
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateRiskPolicyBypassRequestRequestBody'
                required: true
            responses:
                "201":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PolicyBypassRedemption'
                    description: Created response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: createRiskPolicyBypassRequest risk
            tags:
                - risk
            x-speakeasy-group: risk.policyBypassRequests
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: RiskCreatePolicyBypassRequest
                type: mutation
    /rpc/risk.declinePolicyChallenge:
        post:
            description: 'Decline a risk policy warn/challenge from a warning-link token: invalidate the link and mark the challenge declined. The blocked action stays blocked.'
            operationId: declineRiskPolicyChallenge
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/AcknowledgeRiskPolicyChallengeRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/DeclineRiskPolicyChallengeResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: declineRiskPolicyChallenge risk
            tags:
                - risk
            x-speakeasy-group: risk.policyChallenges
            x-speakeasy-name-override: decline
            x-speakeasy-react-hook:
                name: RiskDeclinePolicyChallenge
                type: mutation
    /rpc/risk.deleteCustomRule:
        post:
            description: Delete a custom detection rule.
            operationId: deleteCustomDetectionRule
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RiskIDRequestBody'
                required: true
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: deleteCustomDetectionRule risk
            tags:
                - risk
            x-speakeasy-group: risk.customRules
            x-speakeasy-name-override: delete
            x-speakeasy-react-hook:
                name: RiskDeleteCustomDetectionRule
                type: mutation
    /rpc/risk.deleteExclusions:
        delete:
            description: Delete a risk exclusion. Previously suppressed findings are restored.
            operationId: deleteRiskExclusion
            parameters:
                - allowEmptyValue: true
                  description: The exclusion ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The exclusion ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: deleteRiskExclusion risk
            tags:
                - risk
            x-speakeasy-group: risk.exclusions
            x-speakeasy-name-override: delete
            x-speakeasy-react-hook:
                name: RiskDeleteExclusion
                type: mutation
    /rpc/risk.deletePolicy:
        delete:
            description: Delete a risk analysis policy.
            operationId: deleteRiskPolicy
            parameters:
                - allowEmptyValue: true
                  description: The policy ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The policy ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: deleteRiskPolicy risk
            tags:
                - risk
            x-speakeasy-group: risk.policies
            x-speakeasy-name-override: delete
    /rpc/risk.denyPolicyBypassRequest:
        post:
            description: Deny a risk policy bypass request, updating workflow state.
            operationId: denyRiskPolicyBypassRequest
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RiskIDRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskPolicyBypassRequest'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: denyRiskPolicyBypassRequest risk
            tags:
                - risk
            x-speakeasy-group: risk.policyBypassRequests
            x-speakeasy-name-override: deny
            x-speakeasy-react-hook:
                name: RiskDenyPolicyBypassRequest
                type: mutation
    /rpc/risk.getBlock:
        get:
            description: Get a tool call block by its risk result ID for the durable block page.
            operationId: getRiskBlock
            parameters:
                - allowEmptyValue: true
                  description: The block ID (the underlying risk result ID).
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The block ID (the underlying risk result ID).
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskBlock'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getRiskBlock risk
            tags:
                - risk
            x-speakeasy-group: risk.blocks
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: RiskGetBlock
                type: query
    /rpc/risk.getCustomRule:
        get:
            description: Get a custom detection rule by ID.
            operationId: getCustomDetectionRule
            parameters:
                - allowEmptyValue: true
                  description: The custom detection rule ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The custom detection rule ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskCustomDetectionRule'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getCustomDetectionRule risk
            tags:
                - risk
            x-speakeasy-group: risk.customRules
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: RiskGetCustomDetectionRule
                type: query
    /rpc/risk.getOverview:
        get:
            description: Get risk overview metrics and trend data for the current project.
            operationId: getRiskOverview
            parameters:
                - allowEmptyValue: true
                  description: Inclusive start of the overview window. Defaults to the start of the 7-day calendar window ending at to.
                  in: query
                  name: from
                  schema:
                    description: Inclusive start of the overview window. Defaults to the start of the 7-day calendar window ending at to.
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: Exclusive end of the overview window. Defaults to now.
                  in: query
                  name: to
                  schema:
                    description: Exclusive end of the overview window. Defaults to now.
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskOverviewResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getRiskOverview risk
            tags:
                - risk
            x-speakeasy-group: risk.overview
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: RiskOverview
    /rpc/risk.getPolicy:
        get:
            description: Get a risk analysis policy by ID.
            operationId: getRiskPolicy
            parameters:
                - allowEmptyValue: true
                  description: The policy ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The policy ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskPolicy'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getRiskPolicy risk
            tags:
                - risk
            x-speakeasy-group: risk.policies
            x-speakeasy-name-override: get
    /rpc/risk.getPolicyChallenge:
        post:
            description: Fetch the details of a risk policy warn/challenge from a warning-link token, WITHOUT acknowledging it. Powers the approval page (shows what was flagged and Approve/Deny actions).
            operationId: getRiskPolicyChallenge
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/AcknowledgeRiskPolicyChallengeRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetRiskPolicyChallengeResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getRiskPolicyChallenge risk
            tags:
                - risk
            x-speakeasy-group: risk.policyChallenges
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: RiskGetPolicyChallenge
                type: mutation
    /rpc/risk.getPolicyStatus:
        get:
            description: Get the analysis status of a risk policy including progress and workflow state.
            operationId: getRiskPolicyStatus
            parameters:
                - allowEmptyValue: true
                  description: The policy ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The policy ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskPolicyStatus'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getRiskPolicyStatus risk
            tags:
                - risk
            x-speakeasy-group: risk.policies
            x-speakeasy-name-override: status
    /rpc/risk.getRuleBreakdown:
        get:
            description: Get per-rule_id finding counts for a category within a time window. Powers the per-category drill-down chart on /risk-overview.
            operationId: getRiskRuleBreakdown
            parameters:
                - allowEmptyValue: true
                  description: Required category key to break down by rule_id (e.g. secrets, pii).
                  in: query
                  name: category
                  required: true
                  schema:
                    description: Required category key to break down by rule_id (e.g. secrets, pii).
                    type: string
                - allowEmptyValue: true
                  description: Inclusive start of the window. Defaults to the same 7-day window as the overview.
                  in: query
                  name: from
                  schema:
                    description: Inclusive start of the window. Defaults to the same 7-day window as the overview.
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: Exclusive end of the window. Defaults to now.
                  in: query
                  name: to
                  schema:
                    description: Exclusive end of the window. Defaults to now.
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskRuleBreakdownResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getRiskRuleBreakdown risk
            tags:
                - risk
            x-speakeasy-group: risk.overview
            x-speakeasy-name-override: rules
            x-speakeasy-react-hook:
                name: RiskRuleBreakdown
    /rpc/risk.getSignals:
        get:
            description: Get clustered risk signals — findings grouped by rule and ranked by severity score — plus window-level KPI stats and the exposure breakdown by category. Powers the Watchdog page. Served from the ClickHouse findings store.
            operationId: getRiskSignals
            parameters:
                - allowEmptyValue: true
                  description: Inclusive start of the signals window. Defaults to the start of the 7-day calendar window ending at to.
                  in: query
                  name: from
                  schema:
                    description: Inclusive start of the signals window. Defaults to the start of the 7-day calendar window ending at to.
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: Exclusive end of the signals window. Defaults to now.
                  in: query
                  name: to
                  schema:
                    description: Exclusive end of the signals window. Defaults to now.
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskSignalsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getRiskSignals risk
            tags:
                - risk
            x-speakeasy-group: risk.signals
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: RiskSignals
    /rpc/risk.getUserBreakdown:
        get:
            description: Per-user breakdowns of findings by category and by rule_id within a time window. Powers the user drill-down on /risk-overview.
            operationId: getRiskUserBreakdown
            parameters:
                - allowEmptyValue: true
                  description: External user identifier to scope the breakdown to.
                  in: query
                  name: external_user_id
                  required: true
                  schema:
                    description: External user identifier to scope the breakdown to.
                    type: string
                - allowEmptyValue: true
                  description: Inclusive start of the window. Defaults to the same 7-day window as the overview.
                  in: query
                  name: from
                  schema:
                    description: Inclusive start of the window. Defaults to the same 7-day window as the overview.
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: Exclusive end of the window. Defaults to now.
                  in: query
                  name: to
                  schema:
                    description: Exclusive end of the window. Defaults to now.
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskUserBreakdownResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getRiskUserBreakdown risk
            tags:
                - risk
            x-speakeasy-group: risk.overview
            x-speakeasy-name-override: userBreakdown
            x-speakeasy-react-hook:
                name: RiskUserBreakdown
    /rpc/risk.listBuiltinExclusions:
        get:
            description: List the built-in exclusion library (known-safe values suppressed before they reach exclusions), grouped by category.
            operationId: listBuiltinExclusions
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListBuiltinExclusionsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listBuiltinExclusions risk
            tags:
                - risk
            x-speakeasy-group: risk.exclusions
            x-speakeasy-name-override: listBuiltinExclusions
            x-speakeasy-react-hook:
                name: BuiltinExclusions
    /rpc/risk.listCategories:
        get:
            description: 'Return the canonical risk category definitions: metadata (label/description/icon) plus the classification (source / rule_id list / rule_id prefix) used to bucket findings. Dashboards and CLIs should call this instead of maintaining their own copy of the mapping.'
            operationId: listRiskCategories
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskCategoriesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listRiskCategories risk
            tags:
                - risk
            x-speakeasy-group: risk.categories
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: RiskCategories
    /rpc/risk.listCustomRules:
        get:
            description: List custom detection rules for the current project.
            operationId: listCustomDetectionRules
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListCustomDetectionRulesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listCustomDetectionRules risk
            tags:
                - risk
            x-speakeasy-group: risk.customRules
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: RiskListCustomDetectionRules
                type: query
    /rpc/risk.listDismissedResults:
        get:
            description: List risk results manually marked as false positive for the current project (the Dismissed tab). Kept separate from listRiskResults, which never returns dismissed results.
            operationId: listDismissedRiskResults
            parameters:
                - allowEmptyValue: true
                  description: Cursor to fetch the next page of results.
                  in: query
                  name: cursor
                  schema:
                    description: Cursor to fetch the next page of results.
                    type: string
                - allowEmptyValue: true
                  description: Maximum number of results to return per page.
                  in: query
                  name: limit
                  schema:
                    description: Maximum number of results to return per page.
                    format: int64
                    maximum: 200
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListRiskResultsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listDismissedRiskResults risk
            tags:
                - risk
            x-speakeasy-group: risk.results
            x-speakeasy-name-override: listDismissed
            x-speakeasy-react-hook:
                name: RiskListDismissedResults
                type: query
    /rpc/risk.listExclusions:
        get:
            description: List risk exclusions for the current project. Optionally filter to a single policy.
            operationId: listRiskExclusions
            parameters:
                - allowEmptyValue: true
                  description: Filter to exclusions bound to this policy. Omit to return all exclusions (global plus every policy).
                  in: query
                  name: risk_policy_id
                  schema:
                    description: Filter to exclusions bound to this policy. Omit to return all exclusions (global plus every policy).
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListRiskExclusionsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listRiskExclusions risk
            tags:
                - risk
            x-speakeasy-group: risk.exclusions
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: RiskListExclusions
                type: query
    /rpc/risk.listPolicies:
        get:
            description: List all risk analysis policies for the current project.
            operationId: listRiskPolicies
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListRiskPoliciesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listRiskPolicies risk
            tags:
                - risk
            x-speakeasy-group: risk.policies
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: RiskListPolicies
    /rpc/risk.listPolicyBypassRequests:
        get:
            description: List current risk policy bypass request workflow records.
            operationId: listRiskPolicyBypassRequests
            parameters:
                - allowEmptyValue: true
                  description: Optional risk policy ID filter.
                  in: query
                  name: policy_id
                  schema:
                    description: Optional risk policy ID filter.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Optional request status filter.
                  in: query
                  name: status
                  schema:
                    description: Optional request status filter.
                    enum:
                        - requested
                        - approved
                        - denied
                        - revoked
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListRiskPolicyBypassRequestsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listRiskPolicyBypassRequests risk
            tags:
                - risk
            x-speakeasy-group: risk.policyBypassRequests
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: RiskListPolicyBypassRequests
    /rpc/risk.listResults:
        get:
            description: List risk analysis results for the current project.
            operationId: listRiskResults
            parameters:
                - allowEmptyValue: true
                  description: Optional policy ID to filter by.
                  in: query
                  name: policy_id
                  schema:
                    description: Optional policy ID to filter by.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Optional chat ID to filter by.
                  in: query
                  name: chat_id
                  schema:
                    description: Optional chat ID to filter by.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Optional rule category key to filter by (e.g. secrets, pii, financial).
                  in: query
                  name: category
                  schema:
                    description: Optional rule category key to filter by (e.g. secrets, pii, financial).
                    type: string
                - allowEmptyValue: true
                  description: Optional rule identifier substring to filter by (case-insensitive, e.g. 'secret' matches all 'secret.*' rules).
                  in: query
                  name: rule_id
                  schema:
                    description: Optional rule identifier substring to filter by (case-insensitive, e.g. 'secret' matches all 'secret.*' rules).
                    type: string
                - allowEmptyValue: true
                  description: Optional user identifier substring to filter by (case-insensitive, matched against the chat's external user id).
                  in: query
                  name: user_id
                  schema:
                    description: Optional user identifier substring to filter by (case-insensitive, matched against the chat's external user id).
                    type: string
                - allowEmptyValue: true
                  description: If true, collapse results to one row per (policy_id, rule_id, match), keeping the most recent occurrence. Useful when the same secret is detected many times within a single message body.
                  in: query
                  name: unique_match
                  schema:
                    description: If true, collapse results to one row per (policy_id, rule_id, match), keeping the most recent occurrence. Useful when the same secret is detected many times within a single message body.
                    type: boolean
                - allowEmptyValue: true
                  description: If true, only return findings from chats that are not linked to an assistant. Useful for surfacing events that are missing user attribution.
                  in: query
                  name: non_assistant
                  schema:
                    description: If true, only return findings from chats that are not linked to an assistant. Useful for surfacing events that are missing user attribution.
                    type: boolean
                - allowEmptyValue: true
                  description: Optional assistant ID; only return findings from chats linked to this assistant.
                  in: query
                  name: assistant_id
                  schema:
                    description: Optional assistant ID; only return findings from chats linked to this assistant.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Filter results to messages created at or after this timestamp (ISO 8601).
                  in: query
                  name: from
                  schema:
                    description: Filter results to messages created at or after this timestamp (ISO 8601).
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: Filter results to messages created strictly before this timestamp (ISO 8601).
                  in: query
                  name: to
                  schema:
                    description: Filter results to messages created strictly before this timestamp (ISO 8601).
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: Cursor to fetch the next page of results.
                  in: query
                  name: cursor
                  schema:
                    description: Cursor to fetch the next page of results.
                    type: string
                - allowEmptyValue: true
                  description: Maximum number of results to return per page.
                  in: query
                  name: limit
                  schema:
                    description: Maximum number of results to return per page.
                    format: int64
                    maximum: 200
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListRiskResultsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listRiskResults risk
            tags:
                - risk
            x-speakeasy-group: risk.results
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: RiskListResults
    /rpc/risk.listResultsByChat:
        get:
            description: List risk results grouped by chat session for the current project.
            operationId: listRiskResultsByChat
            parameters:
                - allowEmptyValue: true
                  description: Cursor to fetch the next page of results.
                  in: query
                  name: cursor
                  schema:
                    description: Cursor to fetch the next page of results.
                    type: string
                - allowEmptyValue: true
                  description: Maximum number of results to return per page.
                  in: query
                  name: limit
                  schema:
                    description: Maximum number of results to return per page.
                    format: int64
                    maximum: 200
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListRiskResultsByChatResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listRiskResultsByChat risk
            tags:
                - risk
            x-speakeasy-group: risk.results
            x-speakeasy-name-override: byChat
            x-speakeasy-react-hook:
                name: RiskListResultsByChat
    /rpc/risk.listResultsForAgent:
        get:
            description: List risk analysis results with the `match` field redacted to an opaque length+sha256-prefix fingerprint. Matches the payload and pagination semantics of listRiskResults. Designed for AI assistant / MCP consumption so secret content (gitleaks captures, presidio entities, prompt-injection payloads) never reaches the model context. For shadow_mcp findings the `match` value — a non-sensitive server URL or command identifier — is passed through verbatim.
            operationId: listRiskResultsForAgent
            parameters:
                - allowEmptyValue: true
                  description: Optional policy ID to filter by.
                  in: query
                  name: policy_id
                  schema:
                    description: Optional policy ID to filter by.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Optional chat ID to filter by.
                  in: query
                  name: chat_id
                  schema:
                    description: Optional chat ID to filter by.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Optional rule category key to filter by (e.g. secrets, pii, financial).
                  in: query
                  name: category
                  schema:
                    description: Optional rule category key to filter by (e.g. secrets, pii, financial).
                    type: string
                - allowEmptyValue: true
                  description: Optional rule identifier substring to filter by (case-insensitive, e.g. 'secret' matches all 'secret.*' rules).
                  in: query
                  name: rule_id
                  schema:
                    description: Optional rule identifier substring to filter by (case-insensitive, e.g. 'secret' matches all 'secret.*' rules).
                    type: string
                - allowEmptyValue: true
                  description: Optional user identifier substring to filter by (case-insensitive, matched against the chat's external user id).
                  in: query
                  name: user_id
                  schema:
                    description: Optional user identifier substring to filter by (case-insensitive, matched against the chat's external user id).
                    type: string
                - allowEmptyValue: true
                  description: If true, collapse results to one row per (policy_id, rule_id, match), keeping the most recent occurrence. Useful when the same secret is detected many times within a single message body.
                  in: query
                  name: unique_match
                  schema:
                    description: If true, collapse results to one row per (policy_id, rule_id, match), keeping the most recent occurrence. Useful when the same secret is detected many times within a single message body.
                    type: boolean
                - allowEmptyValue: true
                  description: If true, only return findings from chats that are not linked to an assistant. Useful for surfacing events that are missing user attribution.
                  in: query
                  name: non_assistant
                  schema:
                    description: If true, only return findings from chats that are not linked to an assistant. Useful for surfacing events that are missing user attribution.
                    type: boolean
                - allowEmptyValue: true
                  description: Optional assistant ID; only return findings from chats linked to this assistant.
                  in: query
                  name: assistant_id
                  schema:
                    description: Optional assistant ID; only return findings from chats linked to this assistant.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Filter results to messages created at or after this timestamp (ISO 8601).
                  in: query
                  name: from
                  schema:
                    description: Filter results to messages created at or after this timestamp (ISO 8601).
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: Filter results to messages created strictly before this timestamp (ISO 8601).
                  in: query
                  name: to
                  schema:
                    description: Filter results to messages created strictly before this timestamp (ISO 8601).
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: Cursor to fetch the next page of results.
                  in: query
                  name: cursor
                  schema:
                    description: Cursor to fetch the next page of results.
                    type: string
                - allowEmptyValue: true
                  description: Maximum number of results to return per page.
                  in: query
                  name: limit
                  schema:
                    description: Maximum number of results to return per page.
                    format: int64
                    maximum: 200
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListRiskResultsForAgentResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listRiskResultsForAgent risk
            tags:
                - risk
            x-speakeasy-group: risk.results
            x-speakeasy-name-override: listForAgent
            x-speakeasy-react-hook:
                name: RiskListResultsForAgent
    /rpc/risk.markResultsFalsePositive:
        post:
            description: 'Mark one or more risk results as manually-reviewed false positives. Distinct from exclusions: this suppresses the specific results picked, not future findings matching a rule.'
            operationId: markRiskResultsFalsePositive
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/MarkRiskResultsFalsePositiveRequestBody'
                required: true
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: markRiskResultsFalsePositive risk
            tags:
                - risk
            x-speakeasy-group: risk.results
            x-speakeasy-name-override: markFalsePositive
            x-speakeasy-react-hook:
                name: RiskMarkResultsFalsePositive
                type: mutation
    /rpc/risk.revokePolicyBypassRequest:
        post:
            description: Revoke a previously approved risk policy bypass request.
            operationId: revokeRiskPolicyBypassRequest
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RiskIDRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskPolicyBypassRequest'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: revokeRiskPolicyBypassRequest risk
            tags:
                - risk
            x-speakeasy-group: risk.policyBypassRequests
            x-speakeasy-name-override: revoke
            x-speakeasy-react-hook:
                name: RiskRevokePolicyBypassRequest
                type: mutation
    /rpc/risk.submitBlockFeedback:
        put:
            description: Record thumbs-up/thumbs-down feedback for a tool call block from the block page.
            operationId: submitRiskBlockFeedback
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SubmitRiskBlockFeedbackRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskBlock'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: submitRiskBlockFeedback risk
            tags:
                - risk
            x-speakeasy-group: risk.blocks
            x-speakeasy-name-override: submitFeedback
            x-speakeasy-react-hook:
                name: RiskSubmitBlockFeedback
                type: mutation
    /rpc/risk.suggestCustomRules:
        post:
            description: Suggest a custom detection rule (rule_id, title, description, regex, severity) from a natural-language prompt. Calls the configured LLM with a JSON-schema constrained response so the dashboard can prefill the create form.
            operationId: suggestCustomDetectionRule
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SuggestCustomDetectionRuleRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SuggestCustomDetectionRuleResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: suggestCustomDetectionRule risk
            tags:
                - risk
            x-speakeasy-group: risk.customRules
            x-speakeasy-name-override: suggest
            x-speakeasy-react-hook:
                name: RiskSuggestCustomRule
                type: mutation
    /rpc/risk.suggestExclusion:
        post:
            description: Suggest a risk exclusion (match_type, match_value, filters) from a natural-language prompt, a batch of example findings, or both. Calls the configured LLM with a JSON-schema constrained response so the dashboard can prefill the create exclusion form. At least one of prompt or finding_ids is required.
            operationId: suggestExclusion
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SuggestExclusionRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SuggestExclusionResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: suggestExclusion risk
            tags:
                - risk
            x-speakeasy-group: risk.exclusions
            x-speakeasy-name-override: suggest
            x-speakeasy-react-hook:
                name: RiskSuggestExclusion
                type: mutation
    /rpc/risk.testRule:
        post:
            description: Run a single detection rule against pasted sample text and return any matches. Reuses the same scanner code (gitleaks, Presidio, prompt-injection, custom regex) that the analyzer runs in production so the playground match shape mirrors the chat-message path.
            operationId: testDetectionRule
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/TestDetectionRuleRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/TestDetectionRuleResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: testDetectionRule risk
            tags:
                - risk
            x-speakeasy-group: risk.rules
            x-speakeasy-name-override: test
            x-speakeasy-react-hook:
                name: RiskTestDetectionRule
                type: mutation
    /rpc/risk.triggerPolicy:
        post:
            description: Manually trigger risk analysis for a policy, starting or signaling the drain workflow. Defaults to the most recent 100 unanalyzed messages; pass `limit=0` to backfill every unanalyzed message.
            operationId: triggerRiskAnalysis
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/TriggerRiskAnalysisRequestBody'
                required: true
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: triggerRiskAnalysis risk
            tags:
                - risk
            x-speakeasy-group: risk.policies
            x-speakeasy-name-override: trigger
    /rpc/risk.unmarkResultsFalsePositive:
        post:
            description: Undo a false-positive dismissal for one or more risk results.
            operationId: unmarkRiskResultsFalsePositive
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UnmarkRiskResultsFalsePositiveRequestBody'
                required: true
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: unmarkRiskResultsFalsePositive risk
            tags:
                - risk
            x-speakeasy-group: risk.results
            x-speakeasy-name-override: unmarkFalsePositive
            x-speakeasy-react-hook:
                name: RiskUnmarkResultsFalsePositive
                type: mutation
    /rpc/risk.unmaskResult:
        post:
            description: Return the plaintext match for a single risk result, on demand. Gated on the chat:read scope for the result's chat (not org:admin) — reveal is a discrete, audited access event distinct from listing redacted results.
            operationId: unmaskRiskResult
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RiskIDRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskUnmaskResultResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: unmaskRiskResult risk
            tags:
                - risk
            x-speakeasy-group: risk.results
            x-speakeasy-name-override: unmask
            x-speakeasy-react-hook:
                name: RiskUnmaskResult
                type: mutation
    /rpc/risk.updateCustomRule:
        post:
            description: Update a custom detection rule.
            operationId: updateCustomDetectionRule
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateCustomDetectionRuleRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskCustomDetectionRule'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: updateCustomDetectionRule risk
            tags:
                - risk
            x-speakeasy-group: risk.customRules
            x-speakeasy-name-override: update
            x-speakeasy-react-hook:
                name: RiskUpdateCustomDetectionRule
                type: mutation
    /rpc/risk.updateExclusions:
        put:
            description: Update a risk exclusion.
            operationId: updateRiskExclusion
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateRiskExclusionRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskExclusion'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: updateRiskExclusion risk
            tags:
                - risk
            x-speakeasy-group: risk.exclusions
            x-speakeasy-name-override: update
            x-speakeasy-react-hook:
                name: RiskUpdateExclusion
                type: mutation
    /rpc/risk.updatePolicy:
        put:
            description: Update a risk analysis policy.
            operationId: updateRiskPolicy
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateRiskPolicyRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskPolicy'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: updateRiskPolicy risk
            tags:
                - risk
            x-speakeasy-group: risk.policies
            x-speakeasy-name-override: update
    /rpc/riskEvals.deleteReview:
        delete:
            description: Remove the current reviewer's verdict for one session (the toggle-off path). A reviewer can only clear their own verdict.
            operationId: deleteRiskEvalReview
            parameters:
                - allowEmptyValue: true
                  description: The policy the verdict belongs to.
                  in: query
                  name: policy_id
                  required: true
                  schema:
                    description: The policy the verdict belongs to.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: The chat session whose verdict to clear.
                  in: query
                  name: chat_id
                  required: true
                  schema:
                    description: The chat session whose verdict to clear.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: deleteRiskEvalReview risk
            tags:
                - risk
            x-speakeasy-group: risk.evals
            x-speakeasy-name-override: deleteReview
            x-speakeasy-react-hook:
                name: RiskDeleteEvalReview
                type: mutation
    /rpc/riskEvals.evaluate:
        post:
            description: 'Replay a prompt_based guardrail against a single chat session and return the LLM judge''s per-message verdict. The guardrail (prompt + judge config + message-type scope + CEL scope) is passed inline so the policy-eval workbench can evaluate an unsaved draft before a policy exists. This path is read-only: it never writes risk_results, publishes to the outbox, or enforces. It exists purely to tune a guardrail against real transcripts. Judges only the chat''s latest generation; message-type scoping and CEL scope predicates are both applied.'
            operationId: evaluatePromptGuardrail
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/EvaluatePromptGuardrailRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PromptGuardrailEvalResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: evaluatePromptGuardrail risk
            tags:
                - risk
            x-speakeasy-group: risk.evals
            x-speakeasy-name-override: evaluate
            x-speakeasy-react-hook:
                name: RiskEvaluatePromptGuardrail
                type: query
    /rpc/riskEvals.listReviews:
        get:
            description: 'List the active regression set for a prompt-based policy: every reviewer''s current ground-truth verdicts.'
            operationId: listRiskEvalReviews
            parameters:
                - allowEmptyValue: true
                  description: The policy whose review set to list.
                  in: query
                  name: policy_id
                  required: true
                  schema:
                    description: The policy whose review set to list.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListRiskEvalReviewsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listRiskEvalReviews risk
            tags:
                - risk
            x-speakeasy-group: risk.evals
            x-speakeasy-name-override: listReviews
            x-speakeasy-react-hook:
                name: RiskListEvalReviews
                type: query
    /rpc/riskEvals.saveReview:
        post:
            description: 'Record (or replace) the current reviewer''s ground-truth verdict for one chat session under a prompt-based policy. This is the durable regression set the eval workbench scores the live guardrail against. Upserts: a reviewer has at most one verdict per session per policy.'
            operationId: saveRiskEvalReview
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SaveRiskEvalReviewRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RiskPolicyEvalReview'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: saveRiskEvalReview risk
            tags:
                - risk
            x-speakeasy-group: risk.evals
            x-speakeasy-name-override: saveReview
            x-speakeasy-react-hook:
                name: RiskSaveEvalReview
                type: mutation
    /rpc/skillEfficacy.getSettings:
        get:
            description: Get effective organization-wide skill efficacy sampling settings.
            operationId: getSkillEfficacySettings
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SkillEfficacySettings'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: getSettings skillEfficacy
            tags:
                - skillEfficacy
            x-speakeasy-name-override: getSettings
            x-speakeasy-react-hook:
                name: SkillEfficacySettings
    /rpc/skillEfficacy.queryInsights:
        get:
            description: Query activation-time skill efficacy, estimated savings, attributed session cost, and optional scored-session detail for the current project. Scores are sampled and costs fan out to every activated version.
            operationId: querySkillEfficacyInsights
            parameters:
                - allowEmptyValue: true
                  description: Active skill IDs to query (up to 200). Omit to query all active project skills.
                  in: query
                  name: skill_ids
                  schema:
                    description: Active skill IDs to query (up to 200). Omit to query all active project skills.
                    items:
                        type: string
                    type: array
                - allowEmptyValue: true
                  description: RFC3339 window start; defaults to 30 days before to.
                  in: query
                  name: from
                  schema:
                    description: RFC3339 window start; defaults to 30 days before to.
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: RFC3339 window end; defaults to now.
                  in: query
                  name: to
                  schema:
                    description: RFC3339 window end; defaults to now.
                    format: date-time
                    type: string
                - allowEmptyValue: true
                  description: Include per-version daily trends.
                  in: query
                  name: include_versions
                  schema:
                    description: Include per-version daily trends.
                    type: boolean
                - allowEmptyValue: true
                  description: Include a newest-first page of scored sessions. Intended for one skill detail view.
                  in: query
                  name: include_scored_sessions
                  schema:
                    description: Include a newest-first page of scored sessions. Intended for one skill detail view.
                    type: boolean
                - allowEmptyValue: true
                  description: Cursor for the next page of scored sessions.
                  in: query
                  name: cursor
                  schema:
                    description: Cursor for the next page of scored sessions.
                    type: string
                - allowEmptyValue: true
                  description: The number of scored sessions to return per page.
                  in: query
                  name: limit
                  schema:
                    default: 20
                    description: The number of scored sessions to return per page.
                    format: int64
                    maximum: 100
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SkillEfficacyInsightsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: queryInsights skillEfficacy
            tags:
                - skillEfficacy
            x-speakeasy-name-override: queryInsights
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: SkillEfficacyInsights
                type: query
    /rpc/skillEfficacy.upsertSettings:
        post:
            description: Create or replace organization-wide skill efficacy sampling settings.
            operationId: upsertSkillEfficacySettings
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpsertSettingsRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SkillEfficacySettings'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                - session_header_Gram-Session: []
            summary: upsertSettings skillEfficacy
            tags:
                - skillEfficacy
            x-speakeasy-name-override: upsertSettings
            x-speakeasy-react-hook:
                name: UpsertSkillEfficacySettings
    /rpc/skills.addVersion:
        post:
            description: Record an uploaded SKILL.md as a version of an existing skill. The implementation requires the skills product feature and skill write scope, and returns the existing canonical version as a no-op when appropriate.
            operationId: addSkillVersion
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/AddSkillVersionRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RecordSkillResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: addVersion skills
            tags:
                - skills
            x-speakeasy-name-override: addVersion
            x-speakeasy-react-hook:
                name: AddSkillVersion
    /rpc/skills.approveAllSuggestions:
        post:
            description: Snapshot and independently process selected skill edit suggestions, or every open suggestion when no IDs are supplied. One conflict or failure does not stop the remaining approvals.
            operationId: approveAllSkillSuggestions
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/ApproveAllSkillSuggestionsRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ApproveAllSkillSuggestionsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: approveAllSuggestions skills
            tags:
                - skills
            x-speakeasy-name-override: approveAllSuggestions
            x-speakeasy-react-hook:
                name: ApproveAllSkillSuggestions
    /rpc/skills.approveSuggestion:
        post:
            description: Approve an open skill edit suggestion, optionally replacing its proposed SKILL.md content or taking only a subset of its proposed changes. Stale suggestions are superseded instead.
            operationId: approveSkillSuggestion
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/ApproveSkillSuggestionRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ApproveSkillSuggestionResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: approveSuggestion skills
            tags:
                - skills
            x-speakeasy-name-override: approveSuggestion
            x-speakeasy-react-hook:
                name: ApproveSkillSuggestion
    /rpc/skills.archive:
        post:
            description: Idempotently archive a skill. The implementation requires the skills product feature and skill write scope. Repeated requests for the same skill succeed without creating another state transition.
            operationId: archiveSkill
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/ArchiveSkillRequestBody'
                required: true
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: archive skills
            tags:
                - skills
            x-speakeasy-name-override: archive
            x-speakeasy-react-hook:
                name: ArchiveSkill
    /rpc/skills.create:
        post:
            description: Record an uploaded SKILL.md. The implementation requires the skills product feature and skill write scope, and may create a skill, add a version to an existing skill, or return an existing canonical version as a no-op.
            operationId: createSkill
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateSkillRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RecordSkillResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: create skills
            tags:
                - skills
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: CreateSkill
    /rpc/skills.dismissSuggestion:
        post:
            description: Idempotently dismiss an open skill edit suggestion. Approved and superseded suggestions conflict.
            operationId: dismissSkillSuggestion
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/DismissSkillSuggestionRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SkillEditSuggestion'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: dismissSuggestion skills
            tags:
                - skills
            x-speakeasy-name-override: dismissSuggestion
            x-speakeasy-react-hook:
                name: DismissSkillSuggestion
    /rpc/skills.distribute:
        post:
            description: Create or update the active distribution of a skill to exactly one plugin or assistant. Repeating the request for the same target updates the version pin or is a no-op.
            operationId: distributeSkill
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        example:
                            id: 550e8400-e29b-41d4-a716-446655440000
                            plugin_id: 550e8400-e29b-41d4-a716-446655440001
                        schema:
                            $ref: '#/components/schemas/DistributeSkillRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SkillDistribution'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: distribute skills
            tags:
                - skills
            x-speakeasy-name-override: distribute
            x-speakeasy-react-hook:
                name: DistributeSkill
    /rpc/skills.get:
        get:
            description: Get an active skill and its latest version. The implementation requires the skills product feature and skill read scope.
            operationId: getSkill
            parameters:
                - allowEmptyValue: true
                  description: The skill ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The skill ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetSkillResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: get skills
            tags:
                - skills
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: Skill
    /rpc/skills.getShared:
        get:
            description: Fetch the publicly shared view of a skill by its share token. This endpoint is unauthenticated and only ever exposes the skill name, display name, summary, and latest content.
            operationId: getSharedSkill
            parameters:
                - allowEmptyValue: true
                  description: The public share token.
                  in: query
                  name: token
                  required: true
                  schema:
                    description: The public share token.
                    maxLength: 128
                    minLength: 32
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SharedSkill2'
                    description: OK response.
                    headers:
                        Cache-Control:
                            description: The Cache-Control response header.
                            schema:
                                description: The Cache-Control response header.
                                type: string
                        Referrer-Policy:
                            description: The Referrer-Policy response header.
                            schema:
                                description: The Referrer-Policy response header.
                                type: string
                        X-Robots-Tag:
                            description: The X-Robots-Tag response header.
                            schema:
                                description: The X-Robots-Tag response header.
                                type: string
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            summary: getShared skills
            tags:
                - skills
            x-speakeasy-name-override: getShared
            x-speakeasy-react-hook:
                name: SharedSkill
    /rpc/skills.list:
        get:
            description: List active skills in the project. The implementation requires the skills product feature and skill read scope.
            operationId: listSkills
            parameters:
                - allowEmptyValue: true
                  description: Cursor for the next page of skills.
                  in: query
                  name: cursor
                  schema:
                    description: Cursor for the next page of skills.
                    type: string
                - allowEmptyValue: true
                  description: The number of skills to return per page.
                  in: query
                  name: limit
                  schema:
                    default: 50
                    description: The number of skills to return per page.
                    format: int64
                    maximum: 200
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: Search skill names, display names, and summaries.
                  in: query
                  name: search
                  schema:
                    description: Search skill names, display names, and summaries.
                    maxLength: 256
                    type: string
                - allowEmptyValue: true
                  description: Only return skills from these sources.
                  in: query
                  name: source_kinds
                  schema:
                    description: Only return skills from these sources.
                    items:
                        enum:
                            - manual
                            - captured
                        type: string
                    type: array
                - allowEmptyValue: true
                  description: Only return skills with these classifications.
                  in: query
                  name: classifications
                  schema:
                    description: Only return skills with these classifications.
                    items:
                        enum:
                            - custom
                            - built_in
                        type: string
                    type: array
                - allowEmptyValue: true
                  description: Only return skills that have any of these tags.
                  in: query
                  name: tags
                  schema:
                    description: Only return skills that have any of these tags.
                    items:
                        maxLength: 64
                        type: string
                    type: array
                - allowEmptyValue: true
                  description: How to order skills.
                  in: query
                  name: sort
                  schema:
                    default: name
                    description: How to order skills.
                    enum:
                        - name
                        - updated
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListSkillsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: list skills
            tags:
                - skills
            x-speakeasy-name-override: list
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: Skills
    /rpc/skills.listDistributions:
        get:
            description: List active plugin skill distributions for the current project.
            operationId: listSkillDistributions
            parameters:
                - allowEmptyValue: true
                  description: Only return distributions of this skill.
                  in: query
                  name: skill_id
                  schema:
                    description: Only return distributions of this skill.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Only return distributions carried by this plugin.
                  in: query
                  name: plugin_id
                  schema:
                    description: Only return distributions carried by this plugin.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Cursor for the next page of skill distributions.
                  in: query
                  name: cursor
                  schema:
                    description: Cursor for the next page of skill distributions.
                    type: string
                - allowEmptyValue: true
                  description: The number of skill distributions to return per page.
                  in: query
                  name: limit
                  schema:
                    default: 20
                    description: The number of skill distributions to return per page.
                    format: int64
                    maximum: 50
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListSkillDistributionsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listDistributions skills
            tags:
                - skills
            x-speakeasy-name-override: listDistributions
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: SkillDistributions
    /rpc/skills.listFeedback:
        get:
            description: List outcome counts, collection metrics, volume, and recent resolved feedback for a skill. Name-only feedback is excluded.
            operationId: listSkillFeedback
            parameters:
                - allowEmptyValue: true
                  description: The skill ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The skill ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Cursor for the next page of feedback.
                  in: query
                  name: cursor
                  schema:
                    description: Cursor for the next page of feedback.
                    type: string
                - allowEmptyValue: true
                  description: The number of feedback rows to return per page.
                  in: query
                  name: limit
                  schema:
                    default: 20
                    description: The number of feedback rows to return per page.
                    format: int64
                    maximum: 50
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListSkillFeedbackResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listFeedback skills
            tags:
                - skills
            x-speakeasy-name-override: listFeedback
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: SkillFeedback
    /rpc/skills.listSuggestionFeedback:
        get:
            description: List the agent feedback cited as the reason for one proposed change, newest first.
            operationId: listSkillSuggestionFeedback
            parameters:
                - allowEmptyValue: true
                  description: The proposed change ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The proposed change ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: The number of feedback records to return.
                  in: query
                  name: limit
                  schema:
                    default: 50
                    description: The number of feedback records to return.
                    format: int64
                    maximum: 50
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListSkillSuggestionFeedbackResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listSuggestionFeedback skills
            tags:
                - skills
            x-speakeasy-name-override: listSuggestionFeedback
            x-speakeasy-react-hook:
                name: SkillSuggestionFeedback
    /rpc/skills.listSuggestions:
        get:
            description: List open skill edit suggestions in the project, newest first. The implementation requires the skills product feature and skill read scope.
            operationId: listSkillSuggestions
            parameters:
                - allowEmptyValue: true
                  description: Only return suggestions for this skill.
                  in: query
                  name: skill_id
                  schema:
                    description: Only return suggestions for this skill.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Cursor for the next page of suggestions.
                  in: query
                  name: cursor
                  schema:
                    description: Cursor for the next page of suggestions.
                    type: string
                - allowEmptyValue: true
                  description: The number of suggestions to return per page.
                  in: query
                  name: limit
                  schema:
                    default: 20
                    description: The number of suggestions to return per page.
                    format: int64
                    maximum: 50
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListSkillSuggestionsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listSuggestions skills
            tags:
                - skills
            x-speakeasy-name-override: listSuggestions
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: SkillSuggestions
    /rpc/skills.listTags:
        get:
            description: List distinct tags used by active skills in the project. The implementation requires the skills product feature and skill read scope.
            operationId: listSkillTags
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListSkillTagsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listTags skills
            tags:
                - skills
            x-speakeasy-name-override: listTags
            x-speakeasy-react-hook:
                name: SkillTags
    /rpc/skills.listUnknownActivations:
        get:
            description: List terminal skill activations that could not be attributed to a skill version.
            operationId: listUnknownSkillActivations
            parameters:
                - allowEmptyValue: true
                  description: Cursor for the next page of unknown activations.
                  in: query
                  name: cursor
                  schema:
                    description: Cursor for the next page of unknown activations.
                    type: string
                - allowEmptyValue: true
                  description: The number of unknown activations to return per page.
                  in: query
                  name: limit
                  schema:
                    default: 50
                    description: The number of unknown activations to return per page.
                    format: int64
                    maximum: 200
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListUnknownSkillActivationsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listUnknownActivations skills
            tags:
                - skills
            x-speakeasy-name-override: listUnknownActivations
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: UnknownSkillActivations
    /rpc/skills.listVersions:
        get:
            description: List immutable versions of an active skill, newest first. The implementation requires the skills product feature and skill read scope.
            operationId: listSkillVersions
            parameters:
                - allowEmptyValue: true
                  description: The skill ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The skill ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Cursor for the next page of skill versions.
                  in: query
                  name: cursor
                  schema:
                    description: Cursor for the next page of skill versions.
                    type: string
                - allowEmptyValue: true
                  description: The number of skill versions to return per page.
                  in: query
                  name: limit
                  schema:
                    default: 20
                    description: The number of skill versions to return per page.
                    format: int64
                    maximum: 50
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListSkillVersionsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listVersions skills
            tags:
                - skills
            x-speakeasy-name-override: listVersions
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: SkillVersions
    /rpc/skills.restoreVersion:
        post:
            description: Restore a historical valid version as the skill's current version without changing the immutable version record or explicit distribution pins.
            operationId: restoreSkillVersion
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RestoreSkillVersionRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RecordSkillResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: restoreVersion skills
            tags:
                - skills
            x-speakeasy-name-override: restoreVersion
            x-speakeasy-react-hook:
                name: RestoreSkillVersion
    /rpc/skills.share:
        post:
            description: Create a public share link for a skill. Repeated requests return the existing active link, so each skill has at most one active share token.
            operationId: shareSkill
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/ShareSkillRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SkillShareLink'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: share skills
            tags:
                - skills
            x-speakeasy-name-override: share
            x-speakeasy-react-hook:
                name: ShareSkill
    /rpc/skills.triggerSuggestion:
        post:
            description: Manually run suggestion analysis for a skill, bypassing automatic feedback and efficacy thresholds while preserving the one-open-suggestion invariant.
            operationId: triggerSkillSuggestion
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/TriggerSkillSuggestionRequestBody'
                required: true
            responses:
                "202":
                    description: Accepted response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: triggerSuggestion skills
            tags:
                - skills
            x-speakeasy-name-override: triggerSuggestion
            x-speakeasy-react-hook:
                name: TriggerSkillSuggestion
                type: mutation
    /rpc/skills.undistribute:
        post:
            description: Revoke a skill's active distribution to exactly one plugin or assistant. Repeated requests are a no-op.
            operationId: undistributeSkill
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        example:
                            id: 550e8400-e29b-41d4-a716-446655440000
                            plugin_id: 550e8400-e29b-41d4-a716-446655440001
                        schema:
                            $ref: '#/components/schemas/UndistributeSkillRequestBody'
                required: true
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: undistribute skills
            tags:
                - skills
            x-speakeasy-name-override: undistribute
            x-speakeasy-react-hook:
                name: UndistributeSkill
    /rpc/skills.unshare:
        post:
            description: Revoke a skill's active public share link. Repeated requests are a no-op.
            operationId: unshareSkill
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UnshareSkillRequestBody'
                required: true
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: unshare skills
            tags:
                - skills
            x-speakeasy-name-override: unshare
            x-speakeasy-react-hook:
                name: UnshareSkill
    /rpc/skills.update:
        post:
            description: Rename an active skill or update its display name, summary, and tags. The implementation requires the skills product feature and skill write scope.
            operationId: updateSkill
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateSkillRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Skill'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: update skills
            tags:
                - skills
            x-speakeasy-name-override: update
            x-speakeasy-react-hook:
                name: UpdateSkill
    /rpc/spendrules.archiveRule:
        post:
            description: 'Archive a budget rule. There is no delete: archiving ends the rule''s lineage while retaining its slug, version history, and events. Any open circuits for the rule close on the next evaluation cycle.'
            operationId: archiveSpendRule
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RiskIDRequestBody'
                required: true
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: archiveSpendRule spendRules
            tags:
                - spendRules
            x-speakeasy-group: spendRules.rules
            x-speakeasy-name-override: archive
            x-speakeasy-react-hook:
                name: SpendRulesArchiveRule
                type: mutation
    /rpc/spendrules.createRule:
        post:
            description: Create a new budget rule for the current organization.
            operationId: createSpendRule
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateSpendRuleRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SpendRule'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: createSpendRule spendRules
            tags:
                - spendRules
            x-speakeasy-group: spendRules.rules
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: SpendRulesCreateRule
                type: mutation
    /rpc/spendrules.getOverview:
        get:
            description: 'Get budgets overview metrics: aggregate card numbers plus current-window usage per rule.'
            operationId: getSpendRulesOverview
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SpendRulesOverviewResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getSpendRulesOverview spendRules
            tags:
                - spendRules
            x-speakeasy-group: spendRules.overview
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: SpendRulesOverview
    /rpc/spendrules.getRule:
        get:
            description: Get a budget rule by ID.
            operationId: getSpendRule
            parameters:
                - allowEmptyValue: true
                  description: The rule ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The rule ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SpendRule'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getSpendRule spendRules
            tags:
                - spendRules
            x-speakeasy-group: spendRules.rules
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: SpendRulesGetRule
    /rpc/spendrules.listActorAttributes:
        get:
            description: List the member attributes a rule target condition can be written against, with each attribute's value kind. Static reference data that powers the rule editor's attribute picker.
            operationId: listSpendRuleActorAttributes
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListActorAttributesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listActorAttributes spendRules
            tags:
                - spendRules
            x-speakeasy-group: spendRules.actorAttributes
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: SpendRulesActorAttributes
    /rpc/spendrules.listEvents:
        get:
            description: List warning and breach events emitted by budget rule evaluation, most recent first.
            operationId: listSpendRuleEvents
            parameters:
                - allowEmptyValue: true
                  description: 'Optional rule ID to filter by. Matches the rule''s whole lineage: events from every version of the rule are returned.'
                  in: query
                  name: rule_id
                  schema:
                    description: 'Optional rule ID to filter by. Matches the rule''s whole lineage: events from every version of the rule are returned.'
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Optional event type to filter by.
                  in: query
                  name: event_type
                  schema:
                    description: Optional event type to filter by.
                    enum:
                        - warning
                        - breach
                    type: string
                - allowEmptyValue: true
                  description: Cursor to fetch the next page of events.
                  in: query
                  name: cursor
                  schema:
                    description: Cursor to fetch the next page of events.
                    type: string
                - allowEmptyValue: true
                  description: Maximum number of events to return per page.
                  in: query
                  name: limit
                  schema:
                    description: Maximum number of events to return per page.
                    format: int64
                    maximum: 200
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListSpendRuleEventsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listSpendRuleEvents spendRules
            tags:
                - spendRules
            x-speakeasy-group: spendRules.events
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: SpendRulesListEvents
    /rpc/spendrules.listRules:
        get:
            description: List all budget rules for the current organization.
            operationId: listSpendRules
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListSpendRulesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listSpendRules spendRules
            tags:
                - spendRules
            x-speakeasy-group: spendRules.rules
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: SpendRulesListRules
    /rpc/spendrules.previewRule:
        post:
            description: Preview which actors a target expression matches and their current spend against a proposed budget. Powers the live preview in the rule editor and the per-actor breakdown in the rule detail view.
            operationId: previewSpendRule
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/PreviewSpendRuleRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PreviewSpendRuleResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: previewSpendRule spendRules
            tags:
                - spendRules
            x-speakeasy-group: spendRules.rules
            x-speakeasy-name-override: preview
            x-speakeasy-react-hook:
                name: SpendRulesPreviewRule
                type: mutation
    /rpc/spendrules.updateRule:
        put:
            description: 'Update a budget rule. Rule rows are immutable version snapshots: any change besides the enabled toggle archives the current version row and creates a successor at version + 1 (returned as the result, under a new ID). Enabled-only changes toggle the live row in place.'
            operationId: updateSpendRule
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateSpendRuleRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SpendRule'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: updateSpendRule spendRules
            tags:
                - spendRules
            x-speakeasy-group: spendRules.rules
            x-speakeasy-name-override: update
            x-speakeasy-react-hook:
                name: SpendRulesUpdateRule
                type: mutation
    /rpc/telemetry.captureEvent:
        post:
            description: Capture a telemetry event and forward it to PostHog
            operationId: captureEvent
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
                - allowEmptyValue: true
                  description: Chat Sessions token header
                  in: header
                  name: Gram-Chat-Session
                  schema:
                    description: Chat Sessions token header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CaptureEventPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CaptureEventResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - chat_sessions_token_header_Gram-Chat-Session: []
            summary: captureEvent telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: captureEvent
    /rpc/telemetry.getEmployeeDataFlowGraph:
        post:
            description: Get an employee's MCP data flow graph across origins, clients, servers, and tools
            operationId: getEmployeeDataFlowGraph
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetEmployeeDataFlowGraphPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetEmployeeDataFlowGraphResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getEmployeeDataFlowGraph telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getEmployeeDataFlowGraph
            x-speakeasy-react-hook:
                name: GetEmployeeDataFlowGraph
                type: query
    /rpc/telemetry.getHooksSummary:
        post:
            description: Get aggregated hooks metrics grouped by server
            operationId: getHooksSummary
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetHooksSummaryPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetHooksSummaryResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getHooksSummary telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getHooksSummary
            x-speakeasy-react-hook:
                name: GetHooksSummary
                type: query
    /rpc/telemetry.getMcpServerActivity:
        post:
            description: Get per-MCP-server tool-call activity for the Distribute MCP listing. Returns, for every MCP server with usage in the lookback window, its total and recent tool-call counts plus the last tool-call time, so the listing can flag servers that have never received a tool call or that have gone quiet.
            operationId: getMcpServerActivity
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetMcpServerActivityPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetMcpServerActivityResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getMcpServerActivity telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getMcpServerActivity
            x-speakeasy-react-hook:
                name: GetMcpServerActivity
                type: query
    /rpc/telemetry.getObservabilityOverview:
        post:
            description: Get observability overview metrics including time series, tool breakdowns, and summary stats
            operationId: getObservabilityOverview
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetObservabilityOverviewPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetObservabilityOverviewResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getObservabilityOverview telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getObservabilityOverview
            x-speakeasy-react-hook:
                name: GetObservabilityOverview
                type: query
    /rpc/telemetry.getProjectMetricsSummary:
        post:
            description: Get aggregated metrics summary for an entire project
            operationId: getProjectMetricsSummary
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetProjectMetricsSummaryPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetMetricsSummaryResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getProjectMetricsSummary telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getProjectMetricsSummary
            x-speakeasy-react-hook:
                name: GetProjectMetricsSummary
                type: query
    /rpc/telemetry.getProjectOverview:
        post:
            description: Get project-level overview including total chats, tool calls, active servers/users, and top lists
            operationId: getProjectOverview
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetProjectMetricsSummaryPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetProjectOverviewResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getProjectOverview telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getProjectOverview
            x-speakeasy-react-hook:
                name: GetProjectOverview
                type: query
    /rpc/telemetry.getToolUsageFilterOptions:
        post:
            description: Get filter options for target-aware MCP and tool usage metrics
            operationId: getToolUsageFilterOptions
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetToolUsageFilterOptionsPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetToolUsageFilterOptionsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getToolUsageFilterOptions telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getToolUsageFilterOptions
            x-speakeasy-react-hook:
                name: GetToolUsageFilterOptions
                type: query
    /rpc/telemetry.getToolUsageSummary:
        post:
            description: Get target-aware MCP and tool usage metrics
            operationId: getToolUsageSummary
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetToolUsageSummaryPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetToolUsageSummaryResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getToolUsageSummary telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getToolUsageSummary
            x-speakeasy-react-hook:
                name: GetToolUsageSummary
                type: query
    /rpc/telemetry.getToolUsageTargetTimeSeries:
        post:
            description: Get time-series MCP and tool usage grouped by target
            operationId: getToolUsageTargetTimeSeries
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetToolUsageSummaryPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetToolUsageTargetTimeSeriesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getToolUsageTargetTimeSeries telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getToolUsageTargetTimeSeries
            x-speakeasy-react-hook:
                name: GetToolUsageTargetTimeSeries
                type: query
    /rpc/telemetry.getToolUsageTargetToolBreakdown:
        post:
            description: Get per-tool MCP and tool usage grouped by target
            operationId: getToolUsageTargetToolBreakdown
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetToolUsageSummaryPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetToolUsageTargetToolBreakdownResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getToolUsageTargetToolBreakdown telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getToolUsageTargetToolBreakdown
            x-speakeasy-react-hook:
                name: GetToolUsageTargetToolBreakdown
                type: query
    /rpc/telemetry.getToolUsageTargets:
        post:
            description: Get top MCP and tool usage targets
            operationId: getToolUsageTargets
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetToolUsageSummaryPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetToolUsageTargetsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getToolUsageTargets telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getToolUsageTargets
            x-speakeasy-react-hook:
                name: GetToolUsageTargets
                type: query
    /rpc/telemetry.getToolUsageTotals:
        post:
            description: Get overall MCP and tool usage totals
            operationId: getToolUsageTotals
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetToolUsageSummaryPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetToolUsageTotalsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getToolUsageTotals telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getToolUsageTotals
            x-speakeasy-react-hook:
                name: GetToolUsageTotals
                type: query
    /rpc/telemetry.getToolUsageUserTimeSeries:
        post:
            description: Get time-series MCP and tool usage grouped by user identity
            operationId: getToolUsageUserTimeSeries
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetToolUsageSummaryPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetToolUsageUserTimeSeriesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getToolUsageUserTimeSeries telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getToolUsageUserTimeSeries
            x-speakeasy-react-hook:
                name: GetToolUsageUserTimeSeries
                type: query
    /rpc/telemetry.getToolUsageUsers:
        post:
            description: Get top MCP and tool usage user identities
            operationId: getToolUsageUsers
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetToolUsageSummaryPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetToolUsageUsersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getToolUsageUsers telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getToolUsageUsers
            x-speakeasy-react-hook:
                name: GetToolUsageUsers
                type: query
    /rpc/telemetry.getToolUsageUsersByTarget:
        post:
            description: Get cross-dimensional MCP and tool usage grouped by target and user identity
            operationId: getToolUsageUsersByTarget
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetToolUsageSummaryPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetToolUsageUsersByTargetResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getToolUsageUsersByTarget telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getToolUsageUsersByTarget
            x-speakeasy-react-hook:
                name: GetToolUsageUsersByTarget
                type: query
    /rpc/telemetry.getUnproxiedMcpServerClientUsage:
        post:
            description: Best-effort per-client (hook source, e.g. claude-code, cursor, codex) call counts for an unproxied MCP server, sourced from Shadow MCP's hook-reported traces matched by canonicalized URL. Same coverage caveats as getUnproxiedMcpServerUsage.
            operationId: getUnproxiedMcpServerClientUsage
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UnproxiedMcpServerUsageBreakdownPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetUnproxiedMcpServerClientUsageResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getUnproxiedMcpServerClientUsage telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getUnproxiedMcpServerClientUsage
            x-speakeasy-react-hook:
                name: GetUnproxiedMcpServerClientUsage
                type: query
    /rpc/telemetry.getUnproxiedMcpServerToolUsage:
        post:
            description: Best-effort per-tool call counts for an unproxied MCP server, sourced from Shadow MCP's hook-reported traces matched by canonicalized URL. Same coverage caveats as getUnproxiedMcpServerUsage.
            operationId: getUnproxiedMcpServerToolUsage
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UnproxiedMcpServerUsageBreakdownPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetUnproxiedMcpServerToolUsageResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getUnproxiedMcpServerToolUsage telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getUnproxiedMcpServerToolUsage
            x-speakeasy-react-hook:
                name: GetUnproxiedMcpServerToolUsage
                type: query
    /rpc/telemetry.getUnproxiedMcpServerUsage:
        post:
            description: 'Best-effort tool-call activity for an unproxied MCP server, sourced from Shadow MCP''s hook-reported traces matched by canonicalized URL. Coverage is opportunistic: only calls made from hook-instrumented sessions in this project are visible, so a freshly added or rarely used server may show no data.'
            operationId: getUnproxiedMcpServerUsage
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetUnproxiedMcpServerUsageRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetUnproxiedMcpServerUsageResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getUnproxiedMcpServerUsage telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getUnproxiedMcpServerUsage
            x-speakeasy-react-hook:
                name: GetUnproxiedMcpServerUsage
                type: query
    /rpc/telemetry.getUnproxiedMcpServerUserUsage:
        post:
            description: Best-effort per-user call counts for an unproxied MCP server, sourced from Shadow MCP's hook-reported traces matched by canonicalized URL. Same coverage caveats as getUnproxiedMcpServerUsage.
            operationId: getUnproxiedMcpServerUserUsage
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UnproxiedMcpServerUsageBreakdownPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetUnproxiedMcpServerUserUsageResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getUnproxiedMcpServerUserUsage telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getUnproxiedMcpServerUserUsage
            x-speakeasy-react-hook:
                name: GetUnproxiedMcpServerUserUsage
                type: query
    /rpc/telemetry.getUserMetricsSummary:
        post:
            description: Get aggregated metrics summary grouped by user
            operationId: getUserMetricsSummary
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetUserMetricsSummaryPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetUserMetricsSummaryResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getUserMetricsSummary telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: getUserMetricsSummary
            x-speakeasy-react-hook:
                name: GetUserMetricsSummary
                type: query
    /rpc/telemetry.listAttributeKeys:
        post:
            description: List distinct attribute keys available for filtering
            operationId: listAttributeKeys
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/GetProjectMetricsSummaryPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListAttributeKeysResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listAttributeKeys telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: listAttributeKeys
            x-speakeasy-react-hook:
                name: ListAttributeKeys
                type: query
    /rpc/telemetry.listFilterOptions:
        post:
            description: List available filter options (API keys or users) for the observability overview
            operationId: listFilterOptions
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/ListFilterOptionsPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListFilterOptionsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listFilterOptions telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: listFilterOptions
            x-speakeasy-react-hook:
                name: ListFilterOptions
                type: query
    /rpc/telemetry.listHooksTraces:
        post:
            description: List hook traces aggregated by trace_id with user information
            operationId: listHooksTraces
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/ListHooksTracesPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListHooksTracesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listHooksTraces telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: listHooksTraces
            x-speakeasy-react-hook:
                name: ListHooksTraces
                type: query
    /rpc/telemetry.listSessions:
        post:
            description: Org-scoped list of individual chat sessions for a slice of usage, filtered by the same allowlisted dimensions as telemetry.query. Returns per-session cost, token, and tool metrics with cursor pagination.
            operationId: listSessions
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/ListSessionsPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListSessionsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: listSessions telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: listSessions
            x-speakeasy-react-hook:
                name: ListSessions
                type: query
    /rpc/telemetry.listToolUsageTraces:
        post:
            description: List target-aware MCP and tool usage traces
            operationId: listToolUsageTraces
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/ListToolUsageTracesPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListToolUsageTracesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listToolUsageTraces telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: listToolUsageTraces
            x-speakeasy-react-hook:
                name: ListToolUsageTraces
                type: query
    /rpc/telemetry.query:
        post:
            description: Generic, org-scoped analytics query over pre-aggregated usage metrics. Returns both a grouped table and a per-group hourly timeseries for the same slice of data, supporting arbitrary allowlisted group-by dimensions and filters (e.g. group by department_name, then drill in by filtering department_name and grouping by role).
            operationId: query
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/QueryPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/QueryResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: query telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: query
            x-speakeasy-react-hook:
                name: TelemetryQuery
                type: query
    /rpc/telemetry.queryTumDetails:
        post:
            description: 'Org-scoped daily usage details for the billing page, computed in one pass: the tokens-under-management daily token-type split (observed agent traffic; cache reads excluded) and per-dimension breakdowns over the same population.'
            operationId: queryTumDetails
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/TelemetryWindowPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/TumDetailsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: queryTumDetails telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: queryTumDetails
            x-speakeasy-react-hook:
                name: TelemetryQueryTumDetails
                type: query
    /rpc/telemetry.searchChats:
        post:
            description: Search and list chat session summaries that match a search filter
            operationId: searchChats
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SearchChatsPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SearchChatsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: searchChats telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: searchChats
            x-speakeasy-react-hook:
                name: SearchChats
                type: query
    /rpc/telemetry.searchLogs:
        post:
            description: Search and list telemetry logs that match a search filter
            operationId: searchLogs
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SearchLogsPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SearchLogsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: searchLogs telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: searchLogs
            x-speakeasy-react-hook:
                name: SearchLogs
    /rpc/telemetry.searchToolCalls:
        post:
            description: Search and list tool calls that match a search filter
            operationId: searchToolCalls
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SearchToolCallsPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SearchToolCallsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: searchToolCalls telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: searchToolCalls
            x-speakeasy-react-hook:
                name: SearchToolCalls
    /rpc/telemetry.searchUsers:
        post:
            description: Search and list user usage summaries grouped by user_id or external_user_id
            operationId: searchUsers
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SearchUsersPayload'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SearchUsersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: searchUsers telemetry
            tags:
                - telemetry
            x-speakeasy-name-override: searchUsers
            x-speakeasy-react-hook:
                name: SearchUsers
                type: query
    /rpc/templates.create:
        post:
            description: Create a new prompt template.
            operationId: createTemplate
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreatePromptTemplateForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreatePromptTemplateResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: createTemplate templates
            tags:
                - templates
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: CreateTemplate
    /rpc/templates.delete:
        delete:
            description: Delete prompt template by its ID or name.
            operationId: deleteTemplate
            parameters:
                - allowEmptyValue: true
                  description: The ID of the prompt template
                  in: query
                  name: id
                  schema:
                    description: The ID of the prompt template
                    type: string
                - allowEmptyValue: true
                  description: The name of the prompt template
                  in: query
                  name: name
                  schema:
                    description: The name of the prompt template
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: deleteTemplate templates
            tags:
                - templates
            x-speakeasy-name-override: delete
            x-speakeasy-react-hook:
                name: DeleteTemplate
    /rpc/templates.get:
        get:
            description: Get prompt template by its ID or name.
            operationId: getTemplate
            parameters:
                - allowEmptyValue: true
                  description: The ID of the prompt template
                  in: query
                  name: id
                  schema:
                    description: The ID of the prompt template
                    type: string
                - allowEmptyValue: true
                  description: The name of the prompt template
                  in: query
                  name: name
                  schema:
                    description: The name of the prompt template
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/GetPromptTemplateResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: getTemplate templates
            tags:
                - templates
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: Template
    /rpc/templates.list:
        get:
            description: List available prompt template.
            operationId: listTemplates
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListPromptTemplatesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listTemplates templates
            tags:
                - templates
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: Templates
    /rpc/templates.render:
        post:
            description: Render a prompt template by ID with provided input data.
            operationId: renderTemplateByID
            parameters:
                - allowEmptyValue: true
                  description: The ID of the prompt template to render
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the prompt template to render
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RenderTemplateByIDRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RenderTemplateResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: renderTemplateByID templates
            tags:
                - templates
            x-speakeasy-name-override: renderByID
            x-speakeasy-react-hook:
                name: RenderTemplateByID
                type: query
    /rpc/templates.renderDirect:
        post:
            description: Render a prompt template directly with all template fields provided.
            operationId: renderTemplate
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RenderTemplateRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RenderTemplateResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: renderTemplate templates
            tags:
                - templates
            x-speakeasy-name-override: render
            x-speakeasy-react-hook:
                name: RenderTemplate
                type: query
    /rpc/templates.update:
        post:
            description: Update a prompt template.
            operationId: updateTemplate
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdatePromptTemplateForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UpdatePromptTemplateResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: updateTemplate templates
            tags:
                - templates
            x-speakeasy-name-override: update
            x-speakeasy-react-hook:
                name: UpdateTemplate
    /rpc/tokenExchange.exchange:
        post:
            description: Exchange the org-scoped device-agent install credential plus a vouched user email for a long-lived, per-user API key carrying the 'agent_user' scope. Authenticated with an org-scoped API key carrying the 'agent' scope — deliberately broader than the 'agent_user' scope the minted per-user keys carry, so a leaked per-user key cannot re-enter this endpoint to forge another user's key. The raw key is returned exactly once.
            operationId: tokenExchange
            parameters:
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/ExchangeRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/TokenResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - apikey_header_Gram-Key: []
            summary: exchange tokenExchange
            tags:
                - tokenExchange
            x-speakeasy-name-override: exchange
    /rpc/tools.list:
        get:
            description: List all tools for a project
            operationId: listTools
            parameters:
                - allowEmptyValue: true
                  description: The cursor to fetch results from
                  in: query
                  name: cursor
                  schema:
                    description: The cursor to fetch results from
                    type: string
                - allowEmptyValue: true
                  description: The number of tools to return per page
                  in: query
                  name: limit
                  schema:
                    description: The number of tools to return per page
                    format: int32
                    type: integer
                - allowEmptyValue: true
                  description: The deployment ID. If unset, latest deployment will be used.
                  in: query
                  name: deployment_id
                  schema:
                    description: The deployment ID. If unset, latest deployment will be used.
                    type: string
                - allowEmptyValue: true
                  description: Filter tools by URN prefix (e.g. 'tools:http:kitchen-sink' to match all tools starting with that prefix)
                  in: query
                  name: urn_prefix
                  schema:
                    description: Filter tools by URN prefix (e.g. 'tools:http:kitchen-sink' to match all tools starting with that prefix)
                    type: string
                - allowEmptyValue: true
                  in: query
                  name: tool_types
                  schema:
                    default:
                        - http
                        - function
                        - prompt
                        - platform
                    items:
                        description: The type of tool
                        enum:
                            - http
                            - prompt
                            - function
                            - platform
                            - externalmcp
                        type: string
                    type: array
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListToolsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listTools tools
            tags:
                - tools
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: ListTools
    /rpc/toolsets.addExternalOAuthServer:
        post:
            description: Associate an external OAuth server with a toolset
            operationId: addExternalOAuthServer
            parameters:
                - allowEmptyValue: true
                  description: The slug of the toolset to update
                  in: query
                  name: slug
                  required: true
                  schema:
                    description: A short url-friendly label that uniquely identifies a resource.
                    maxLength: 40
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/AddExternalOAuthServerRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Toolset'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: addExternalOAuthServer toolsets
            tags:
                - toolsets
            x-speakeasy-name-override: addExternalOAuthServer
            x-speakeasy-react-hook:
                name: AddExternalOAuthServer
    /rpc/toolsets.checkMCPSlugAvailability:
        get:
            description: Check if a MCP slug is available
            operationId: checkMCPSlugAvailability
            parameters:
                - allowEmptyValue: true
                  description: The slug to check
                  in: query
                  name: slug
                  required: true
                  schema:
                    description: A short url-friendly label that uniquely identifies a resource.
                    maxLength: 40
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                type: boolean
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: checkMCPSlugAvailability toolsets
            tags:
                - toolsets
            x-speakeasy-name-override: checkMCPSlugAvailability
            x-speakeasy-react-hook:
                name: CheckMCPSlugAvailability
    /rpc/toolsets.clone:
        post:
            description: Clone an existing toolset with a new name
            operationId: cloneToolset
            parameters:
                - allowEmptyValue: true
                  description: The slug of the toolset to clone
                  in: query
                  name: slug
                  required: true
                  schema:
                    description: A short url-friendly label that uniquely identifies a resource.
                    maxLength: 40
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Toolset'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Authorization: []
                  project_slug_header_Gram-Project: []
            summary: cloneToolset toolsets
            tags:
                - toolsets
            x-speakeasy-name-override: cloneBySlug
            x-speakeasy-react-hook:
                name: CloneToolset
    /rpc/toolsets.create:
        post:
            description: Create a new toolset with associated tools
            operationId: createToolset
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateToolsetRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Toolset'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: createToolset toolsets
            tags:
                - toolsets
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: CreateToolset
    /rpc/toolsets.delete:
        delete:
            description: Delete a toolset by its ID
            operationId: deleteToolset
            parameters:
                - allowEmptyValue: true
                  description: The slug of the toolset
                  in: query
                  name: slug
                  required: true
                  schema:
                    description: A short url-friendly label that uniquely identifies a resource.
                    maxLength: 40
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "204":
                    description: No Content response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: deleteToolset toolsets
            tags:
                - toolsets
            x-speakeasy-name-override: deleteBySlug
            x-speakeasy-react-hook:
                name: DeleteToolset
    /rpc/toolsets.get:
        get:
            description: Get detailed information about a toolset including full HTTP tool definitions
            operationId: getToolset
            parameters:
                - allowEmptyValue: true
                  description: The slug of the toolset
                  in: query
                  name: slug
                  required: true
                  schema:
                    description: A short url-friendly label that uniquely identifies a resource.
                    maxLength: 40
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Toolset'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: getToolset toolsets
            tags:
                - toolsets
            x-speakeasy-name-override: getBySlug
            x-speakeasy-react-hook:
                name: Toolset
    /rpc/toolsets.list:
        get:
            description: List all toolsets for a project
            operationId: listToolsets
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListToolsetsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listToolsets toolsets
            tags:
                - toolsets
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: ListToolsets
    /rpc/toolsets.listForOrg:
        get:
            description: List all toolsets across the organization (summary view)
            operationId: listToolsetsForOrg
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListToolsetSummariesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
            summary: listToolsetsForOrg toolsets
            tags:
                - toolsets
            x-speakeasy-name-override: listForOrg
            x-speakeasy-react-hook:
                name: ListToolsetsForOrg
    /rpc/toolsets.listToolFilters:
        get:
            description: List the tool filter scopes (tags) available on a toolset-backed MCP server and the tools under each, including tools excluded from all filters. Read-only; reflects the explicit tool variations group configured on the toolset, deriving effective tags with the same logic as the runtime ?tags= filter. Returns filtering disabled when no explicit group is set.
            operationId: listToolsetToolFilters
            parameters:
                - allowEmptyValue: true
                  description: The slug of the toolset
                  in: query
                  name: slug
                  required: true
                  schema:
                    description: A short url-friendly label that uniquely identifies a resource.
                    maxLength: 40
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListToolFiltersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listToolFilters toolsets
            tags:
                - toolsets
            x-speakeasy-name-override: listToolFilters
            x-speakeasy-react-hook:
                name: ListToolsetToolFilters
    /rpc/toolsets.removeOAuthServer:
        post:
            description: Remove OAuth server association from a toolset
            operationId: removeOAuthServer
            parameters:
                - allowEmptyValue: true
                  description: The slug of the toolset
                  in: query
                  name: slug
                  required: true
                  schema:
                    description: A short url-friendly label that uniquely identifies a resource.
                    maxLength: 40
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Toolset'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: removeOAuthServer toolsets
            tags:
                - toolsets
            x-speakeasy-name-override: removeOAuthServer
            x-speakeasy-react-hook:
                name: RemoveOAuthServer
    /rpc/toolsets.setToolVariationsGroup:
        post:
            description: Assign a tool variations group to a toolset to enable MCP tool filtering (or pass null to disable). The group must already exist in the caller's project.
            operationId: setToolsetToolVariationsGroup
            parameters:
                - allowEmptyValue: true
                  description: The slug of the toolset to configure
                  in: query
                  name: slug
                  required: true
                  schema:
                    description: A short url-friendly label that uniquely identifies a resource.
                    maxLength: 40
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetToolVariationsGroupRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Toolset'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: setToolVariationsGroup toolsets
            tags:
                - toolsets
            x-speakeasy-name-override: setToolVariationsGroup
            x-speakeasy-react-hook:
                name: SetToolsetToolVariationsGroup
    /rpc/toolsets.setUserSessionIssuer:
        post:
            description: Link a toolset to a user_session_issuer (or pass null to unlink). The user_session_issuer must already exist in the caller's project.
            operationId: setToolsetUserSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: The slug of the toolset to link
                  in: query
                  name: slug
                  required: true
                  schema:
                    description: A short url-friendly label that uniquely identifies a resource.
                    maxLength: 40
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetUserSessionIssuerRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Toolset'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: setUserSessionIssuer toolsets
            tags:
                - toolsets
            x-speakeasy-name-override: setUserSessionIssuer
            x-speakeasy-react-hook:
                name: SetToolsetUserSessionIssuer
    /rpc/toolsets.update:
        post:
            description: Update a toolset's properties including name, description, and HTTP tools
            operationId: updateToolset
            parameters:
                - allowEmptyValue: true
                  description: The slug of the toolset to update
                  in: query
                  name: slug
                  required: true
                  schema:
                    description: A short url-friendly label that uniquely identifies a resource.
                    maxLength: 40
                    pattern: ^[a-z0-9_-]{1,128}$
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateToolsetRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Toolset'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: updateToolset toolsets
            tags:
                - toolsets
            x-speakeasy-name-override: updateBySlug
            x-speakeasy-react-hook:
                name: UpdateToolset
    /rpc/triggers.create:
        post:
            description: Create a trigger instance.
            operationId: createTriggerInstance
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateTriggerInstanceForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/TriggerInstance'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: createTriggerInstance triggers
            tags:
                - triggers
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: CreateTrigger
    /rpc/triggers.delete:
        delete:
            description: Delete a trigger instance.
            operationId: deleteTriggerInstance
            parameters:
                - allowEmptyValue: true
                  description: The trigger instance ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The trigger instance ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: deleteTriggerInstance triggers
            tags:
                - triggers
            x-speakeasy-name-override: delete
            x-speakeasy-react-hook:
                name: DeleteTrigger
    /rpc/triggers.get:
        get:
            description: Get a trigger instance by ID.
            operationId: getTriggerInstance
            parameters:
                - allowEmptyValue: true
                  description: The trigger instance ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The trigger instance ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/TriggerInstance'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: getTriggerInstance triggers
            tags:
                - triggers
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: Trigger
    /rpc/triggers.list:
        get:
            description: List trigger instances for the current project.
            operationId: listTriggerInstances
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListTriggerInstancesResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listTriggerInstances triggers
            tags:
                - triggers
            x-speakeasy-name-override: list
            x-speakeasy-react-hook:
                name: Triggers
    /rpc/triggers.listDefinitions:
        get:
            description: List static trigger definitions available to a project.
            operationId: listTriggerDefinitions
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListTriggerDefinitionsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listTriggerDefinitions triggers
            tags:
                - triggers
            x-speakeasy-name-override: listDefinitions
            x-speakeasy-react-hook:
                name: TriggerDefinitions
    /rpc/triggers.listEvents:
        get:
            description: List recent dispatch events for a trigger instance.
            operationId: listTriggerEvents
            parameters:
                - allowEmptyValue: true
                  description: The trigger instance ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The trigger instance ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Maximum number of events to return.
                  in: query
                  name: limit
                  schema:
                    default: 50
                    description: Maximum number of events to return.
                    format: int64
                    maximum: 200
                    minimum: 1
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListTriggerEventsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: listTriggerEvents triggers
            tags:
                - triggers
            x-speakeasy-name-override: listEvents
            x-speakeasy-react-hook:
                name: TriggerEvents
    /rpc/triggers.pause:
        post:
            description: Pause a trigger instance.
            operationId: pauseTriggerInstance
            parameters:
                - allowEmptyValue: true
                  description: The trigger instance ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The trigger instance ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/TriggerInstance'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: pauseTriggerInstance triggers
            tags:
                - triggers
            x-speakeasy-name-override: pause
            x-speakeasy-react-hook:
                name: PauseTrigger
    /rpc/triggers.resume:
        post:
            description: Resume a trigger instance.
            operationId: resumeTriggerInstance
            parameters:
                - allowEmptyValue: true
                  description: The trigger instance ID.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The trigger instance ID.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/TriggerInstance'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: resumeTriggerInstance triggers
            tags:
                - triggers
            x-speakeasy-name-override: resume
            x-speakeasy-react-hook:
                name: ResumeTrigger
    /rpc/triggers.update:
        post:
            description: Update a trigger instance.
            operationId: updateTriggerInstance
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateTriggerInstanceForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/TriggerInstance'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: updateTriggerInstance triggers
            tags:
                - triggers
            x-speakeasy-name-override: update
            x-speakeasy-react-hook:
                name: UpdateTrigger
    /rpc/tunneledMcp.createServer:
        post:
            description: Create a new tunneled MCP server source. Returns the tunnel key once.
            operationId: createTunneledMcpServer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateTunneledMcpServerForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateTunneledMcpServerResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: createServer tunneledMcp
            tags:
                - tunneledMcp
            x-speakeasy-name-override: createServer
            x-speakeasy-react-hook:
                name: CreateTunneledMcpServer
    /rpc/tunneledMcp.deleteServer:
        delete:
            description: Delete a tunneled MCP server source
            operationId: deleteTunneledMcpServer
            parameters:
                - allowEmptyValue: true
                  description: The ID of the tunneled MCP server to delete
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the tunneled MCP server to delete
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: deleteServer tunneledMcp
            tags:
                - tunneledMcp
            x-speakeasy-name-override: deleteServer
            x-speakeasy-react-hook:
                name: DeleteTunneledMcpServer
    /rpc/tunneledMcp.getServer:
        get:
            description: Get a tunneled MCP server by ID
            operationId: getTunneledMcpServer
            parameters:
                - allowEmptyValue: true
                  description: The ID of the tunneled MCP server
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the tunneled MCP server
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/TunneledMcpServer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: getServer tunneledMcp
            tags:
                - tunneledMcp
            x-speakeasy-name-override: getServer
            x-speakeasy-react-hook:
                name: GetTunneledMcpServer
    /rpc/tunneledMcp.listServerConnections:
        get:
            description: List live tunnel connections for a tunneled MCP server
            operationId: listTunneledMcpServerConnections
            parameters:
                - allowEmptyValue: true
                  description: The ID of the tunneled MCP server
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the tunneled MCP server
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/TunneledMcpServerConnections'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listServerConnections tunneledMcp
            tags:
                - tunneledMcp
            x-speakeasy-name-override: listServerConnections
            x-speakeasy-react-hook:
                name: ListTunneledMcpServerConnections
    /rpc/tunneledMcp.listServers:
        get:
            description: List all tunneled MCP server sources for a project
            operationId: listTunneledMcpServers
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListTunneledMcpServersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listServers tunneledMcp
            tags:
                - tunneledMcp
            x-speakeasy-name-override: listServers
            x-speakeasy-react-hook:
                name: TunneledMcpServers
    /rpc/tunneledMcp.rotateServerKey:
        post:
            description: Rotate a tunneled MCP server source key. Returns the new tunnel key once.
            operationId: rotateTunneledMcpServerKey
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/RotateTunneledMcpServerKeyForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/RotateTunneledMcpServerKeyResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: rotateServerKey tunneledMcp
            tags:
                - tunneledMcp
            x-speakeasy-name-override: rotateServerKey
            x-speakeasy-react-hook:
                name: RotateTunneledMcpServerKey
    /rpc/tunneledMcp.updateServer:
        post:
            description: Update a tunneled MCP server source
            operationId: updateTunneledMcpServer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateTunneledMcpServerForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/TunneledMcpServer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: updateServer tunneledMcp
            tags:
                - tunneledMcp
            x-speakeasy-name-override: updateServer
            x-speakeasy-react-hook:
                name: UpdateTunneledMcpServer
    /rpc/unproxiedMcp.createServer:
        post:
            description: Create a new unproxied MCP server. Restricted to callers whose email is on the speakeasy.com or speakeasyapi.dev domain.
            operationId: createUnproxiedMcpServer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateUnproxiedMcpServerForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UnproxiedMcpServer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: createServer unproxiedMcp
            tags:
                - unproxiedMcp
            x-speakeasy-name-override: createServer
            x-speakeasy-react-hook:
                name: CreateUnproxiedMcpServer
    /rpc/unproxiedMcp.deleteServer:
        delete:
            description: Delete an unproxied MCP server
            operationId: deleteUnproxiedMcpServer
            parameters:
                - allowEmptyValue: true
                  description: The ID of the unproxied MCP server to delete
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the unproxied MCP server to delete
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: deleteServer unproxiedMcp
            tags:
                - unproxiedMcp
            x-speakeasy-name-override: deleteServer
            x-speakeasy-react-hook:
                name: DeleteUnproxiedMcpServer
    /rpc/unproxiedMcp.getServer:
        get:
            description: Get an unproxied MCP server by ID or slug. Exactly one of id or slug must be provided.
            operationId: getUnproxiedMcpServer
            parameters:
                - allowEmptyValue: true
                  description: The ID of the unproxied MCP server. Mutually exclusive with slug.
                  in: query
                  name: id
                  schema:
                    description: The ID of the unproxied MCP server. Mutually exclusive with slug.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: The slug of the unproxied MCP server. Mutually exclusive with id.
                  in: query
                  name: slug
                  schema:
                    description: The slug of the unproxied MCP server. Mutually exclusive with id.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UnproxiedMcpServer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: getServer unproxiedMcp
            tags:
                - unproxiedMcp
            x-speakeasy-name-override: getServer
            x-speakeasy-react-hook:
                name: GetUnproxiedMcpServer
    /rpc/unproxiedMcp.listServers:
        get:
            description: List all unproxied MCP servers for a project
            operationId: listUnproxiedMcpServers
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListUnproxiedMcpServersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listServers unproxiedMcp
            tags:
                - unproxiedMcp
            x-speakeasy-name-override: listServers
            x-speakeasy-react-hook:
                name: UnproxiedMcpServers
    /rpc/unproxiedMcp.listTools:
        get:
            description: Best-effort discovery of the tools available on the vendor's MCP server. Connects live to the server's URL and issues an MCP tools/list call; the result is never cached and the connection is never reused for actual tool execution.
            operationId: listUnproxiedMcpServerTools
            parameters:
                - allowEmptyValue: true
                  description: The ID of the unproxied MCP server
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The ID of the unproxied MCP server
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListUnproxiedMcpServerToolsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listTools unproxiedMcp
            tags:
                - unproxiedMcp
            x-speakeasy-name-override: listTools
            x-speakeasy-react-hook:
                name: UnproxiedMcpServerTools
    /rpc/usage.cancelStripeSubscription:
        post:
            description: Schedule the organization's Stripe PAYG subscription to cancel at the end of its current period
            operationId: cancelStripeSubscription
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/StripeSubscription'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: cancelStripeSubscription usage
            tags:
                - usage
            x-speakeasy-name-override: cancelStripeSubscription
            x-speakeasy-react-hook:
                name: cancelStripeSubscription
    /rpc/usage.createCheckout:
        post:
            description: Create a checkout link for upgrading to the business plan
            operationId: createCheckout
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                type: string
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: createCheckout usage
            tags:
                - usage
            x-speakeasy-name-override: createCheckout
            x-speakeasy-react-hook:
                name: createCheckout
    /rpc/usage.createCustomerSession:
        post:
            description: Create a customer session for the user
            operationId: createCustomerSession
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                type: string
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: createCustomerSession usage
            tags:
                - usage
            x-speakeasy-name-override: createCustomerSession
            x-speakeasy-react-hook:
                name: createCustomerSession
    /rpc/usage.createStripeCheckout:
        post:
            description: Create a Stripe Checkout link for starting PAYG billing
            operationId: createStripeCheckout
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                type: string
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: createStripeCheckout usage
            tags:
                - usage
            x-speakeasy-name-override: createStripeCheckout
            x-speakeasy-react-hook:
                name: createStripeCheckout
    /rpc/usage.createStripePortalSession:
        post:
            description: Create a Stripe customer portal session for the organization's PAYG subscription
            operationId: createStripePortalSession
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                type: string
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: createStripePortalSession usage
            tags:
                - usage
            x-speakeasy-name-override: createStripePortalSession
            x-speakeasy-react-hook:
                name: createStripePortalSession
    /rpc/usage.createTopUpCheckout:
        post:
            description: Create a checkout link for a one-time credit top-up purchase
            operationId: createTopUpCheckout
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                type: string
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: createTopUpCheckout usage
            tags:
                - usage
            x-speakeasy-name-override: createTopUpCheckout
            x-speakeasy-react-hook:
                name: createTopUpCheckout
    /rpc/usage.getBillingEmail:
        get:
            description: Get the billing notification email for a PAYG organization
            operationId: getBillingEmail
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/BillingEmail'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getBillingEmail usage
            tags:
                - usage
            x-speakeasy-name-override: getBillingEmail
            x-speakeasy-react-hook:
                name: getBillingEmail
    /rpc/usage.getInferenceSpendCaps:
        get:
            description: List current usage and caps for the organization's materialized platform-managed inference keys
            operationId: getInferenceSpendCaps
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                items:
                                    $ref: '#/components/schemas/InferenceSpendCap'
                                type: array
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getInferenceSpendCaps usage
            tags:
                - usage
            x-speakeasy-name-override: getInferenceSpendCaps
            x-speakeasy-react-hook:
                name: getInferenceSpendCaps
    /rpc/usage.getPaygBillingSummary:
        get:
            description: Get exact billable usage and estimated cost for the organization's live paid Stripe service period
            operationId: getPaygBillingSummary
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PaygBillingSummary'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getPaygBillingSummary usage
            tags:
                - usage
            x-speakeasy-name-override: getPaygBillingSummary
            x-speakeasy-react-hook:
                name: getPaygBillingSummary
    /rpc/usage.getPeriodUsage:
        get:
            description: Get the usage for an organization for a given period
            operationId: getPeriodUsage
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/PeriodUsage'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getPeriodUsage usage
            tags:
                - usage
            x-speakeasy-name-override: getPeriodUsage
            x-speakeasy-react-hook:
                name: getPeriodUsage
    /rpc/usage.getStripeSubscription:
        get:
            description: Get the live lifecycle state of the organization's Stripe PAYG subscription
            operationId: getStripeSubscription
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/StripeSubscription'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getStripeSubscription usage
            tags:
                - usage
            x-speakeasy-name-override: getStripeSubscription
            x-speakeasy-react-hook:
                name: getStripeSubscription
    /rpc/usage.getTokensUnderManagement:
        get:
            description: Get tokens under management for the active billing cycle alongside the contracted terms
            operationId: getTokensUnderManagement
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/TokensUnderManagement'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: getTokensUnderManagement usage
            tags:
                - usage
            x-speakeasy-name-override: getTokensUnderManagement
            x-speakeasy-react-hook:
                name: getTokensUnderManagement
    /rpc/usage.getUsageTiers:
        get:
            description: Get the usage tiers
            operationId: getUsageTiers
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UsageTiers'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            summary: getUsageTiers usage
            tags:
                - usage
            x-speakeasy-name-override: getUsageTiers
            x-speakeasy-react-hook:
                name: getUsageTiers
    /rpc/usage.resumeStripeSubscription:
        post:
            description: Remove a scheduled end-of-period cancellation from the organization's Stripe PAYG subscription
            operationId: resumeStripeSubscription
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/StripeSubscription'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: resumeStripeSubscription usage
            tags:
                - usage
            x-speakeasy-name-override: resumeStripeSubscription
            x-speakeasy-react-hook:
                name: resumeStripeSubscription
    /rpc/usage.setBillingEmail:
        post:
            description: Set or clear the billing notification email for a PAYG organization
            operationId: setBillingEmail
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/BillingEmail'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/BillingEmail'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: setBillingEmail usage
            tags:
                - usage
            x-speakeasy-name-override: setBillingEmail
            x-speakeasy-react-hook:
                name: setBillingEmail
    /rpc/usage.setBillingMetadata:
        post:
            description: Set an organization's billing contract terms. Restricted to platform admins.
            operationId: setBillingMetadata
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetBillingMetadataRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/TokensUnderManagement'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: setBillingMetadata usage
            tags:
                - usage
            x-speakeasy-name-override: setBillingMetadata
            x-speakeasy-react-hook:
                name: setBillingMetadata
    /rpc/usage.setSpendCap:
        post:
            description: Set the monthly spend cap for one of a PAYG organization's platform-managed inference keys
            operationId: setSpendCap
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/SetSpendCapRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/SpendCap'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - session_header_Gram-Session: []
            summary: setSpendCap usage
            tags:
                - usage
            x-speakeasy-name-override: setSpendCap
            x-speakeasy-react-hook:
                name: setSpendCap
    /rpc/userSessionClients.get:
        get:
            description: Get a user_session_client by id.
            operationId: getUserSessionClient
            parameters:
                - allowEmptyValue: true
                  description: The user_session_client id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The user_session_client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UserSessionClient'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: getUserSessionClient userSessionClients
            tags:
                - userSessionClients
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: UserSessionClient
    /rpc/userSessionClients.list:
        get:
            description: List user_session_clients in the caller's project.
            operationId: listUserSessionClients
            parameters:
                - allowEmptyValue: true
                  description: Filter to clients registered with this issuer.
                  in: query
                  name: user_session_issuer_id
                  schema:
                    description: Filter to clients registered with this issuer.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: 'Pagination cursor: id of the last item from the previous page.'
                  in: query
                  name: cursor
                  schema:
                    description: 'Pagination cursor: id of the last item from the previous page.'
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Page size (default 50, max 100).
                  in: query
                  name: limit
                  schema:
                    description: Page size (default 50, max 100).
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListUserSessionClientsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listUserSessionClients userSessionClients
            tags:
                - userSessionClients
            x-speakeasy-name-override: list
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: UserSessionClients
    /rpc/userSessionClients.refreshCIMD:
        post:
            description: 'Force a CIMD client''s metadata document to be re-read. Purges the stored cache state (expiry + ETag) before re-fetching, so the read is unconditional: a host answering 304 Not Modified cannot re-confirm the copy the operator is discarding. Rejected for DCR clients. Deliberately bypasses the document cache, so it carries a per-client cooldown: a refresh shortly after the last successful read returns rate_limit_exceeded.'
            operationId: refreshUserSessionClientCIMD
            parameters:
                - allowEmptyValue: true
                  description: The user_session_client id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The user_session_client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UserSessionClient'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: refreshUserSessionClientCIMD userSessionClients
            tags:
                - userSessionClients
            x-speakeasy-name-override: refreshCIMD
            x-speakeasy-react-hook:
                name: RefreshUserSessionClientCIMD
    /rpc/userSessionClients.revoke:
        post:
            description: 'Soft-delete a user_session_client and cascade to the user_sessions it issued. A DCR client stays revoked. A CIMD client does not: its identity is the metadata document URL, so the next /authorize re-resolves that document and registers a fresh row. Durably blocking a CIMD client is admission control''s job, not revocation''s.'
            operationId: revokeUserSessionClient
            parameters:
                - allowEmptyValue: true
                  description: The user_session_client id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The user_session_client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: revokeUserSessionClient userSessionClients
            tags:
                - userSessionClients
            x-speakeasy-name-override: revoke
            x-speakeasy-react-hook:
                name: RevokeUserSessionClient
    /rpc/userSessionConsents.list:
        get:
            description: List consent records for the caller's project.
            operationId: listUserSessionConsents
            parameters:
                - allowEmptyValue: true
                  description: Filter by subject URN.
                  in: query
                  name: subject_urn
                  schema:
                    description: Filter by subject URN.
                    type: string
                - allowEmptyValue: true
                  description: Filter by user_session_client id.
                  in: query
                  name: user_session_client_id
                  schema:
                    description: Filter by user_session_client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Filter by user_session_issuer id (joins through user_session_clients).
                  in: query
                  name: user_session_issuer_id
                  schema:
                    description: Filter by user_session_issuer id (joins through user_session_clients).
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: 'Pagination cursor: id of the last item from the previous page.'
                  in: query
                  name: cursor
                  schema:
                    description: 'Pagination cursor: id of the last item from the previous page.'
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Page size (default 50, max 100).
                  in: query
                  name: limit
                  schema:
                    description: Page size (default 50, max 100).
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListUserSessionConsentsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listUserSessionConsents userSessionConsents
            tags:
                - userSessionConsents
            x-speakeasy-name-override: list
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: UserSessionConsents
    /rpc/userSessionConsents.revoke:
        post:
            description: Withdraw consent. Subsequent authorization requests for matching (subject, user_session_client) pairs re-prompt.
            operationId: revokeUserSessionConsent
            parameters:
                - allowEmptyValue: true
                  description: The user_session_consent id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The user_session_consent id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: revokeUserSessionConsent userSessionConsents
            tags:
                - userSessionConsents
            x-speakeasy-name-override: revoke
            x-speakeasy-react-hook:
                name: RevokeUserSessionConsent
    /rpc/userSessionIssuers.create:
        post:
            description: Create a new user_session_issuer.
            operationId: createUserSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateUserSessionIssuerForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UserSessionIssuer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: createUserSessionIssuer userSessionIssuers
            tags:
                - userSessionIssuers
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: CreateUserSessionIssuer
    /rpc/userSessionIssuers.delete:
        delete:
            description: Soft-delete a user_session_issuer. Cascades to dependent user_sessions, user_session_consents, and remote_session_clients.
            operationId: deleteUserSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: The user_session_issuer id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The user_session_issuer id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: deleteUserSessionIssuer userSessionIssuers
            tags:
                - userSessionIssuers
            x-speakeasy-name-override: delete
            x-speakeasy-react-hook:
                name: DeleteUserSessionIssuer
    /rpc/userSessionIssuers.get:
        get:
            description: Get a user_session_issuer by id or by slug. Provide exactly one.
            operationId: getUserSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: The user_session_issuer id.
                  in: query
                  name: id
                  schema:
                    description: The user_session_issuer id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: The user_session_issuer slug.
                  in: query
                  name: slug
                  schema:
                    description: The user_session_issuer slug.
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UserSessionIssuer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: getUserSessionIssuer userSessionIssuers
            tags:
                - userSessionIssuers
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: UserSessionIssuer
    /rpc/userSessionIssuers.list:
        get:
            description: List user_session_issuers in the caller's project.
            operationId: listUserSessionIssuers
            parameters:
                - allowEmptyValue: true
                  description: 'Pagination cursor: id of the last item from the previous page.'
                  in: query
                  name: cursor
                  schema:
                    description: 'Pagination cursor: id of the last item from the previous page.'
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Page size (default 50, max 100).
                  in: query
                  name: limit
                  schema:
                    description: Page size (default 50, max 100).
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListUserSessionIssuersResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listUserSessionIssuers userSessionIssuers
            tags:
                - userSessionIssuers
            x-speakeasy-name-override: list
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: UserSessionIssuers
    /rpc/userSessionIssuers.update:
        post:
            description: Update fields on an existing user_session_issuer.
            operationId: updateUserSessionIssuer
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpdateUserSessionIssuerForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UserSessionIssuer'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: updateUserSessionIssuer userSessionIssuers
            tags:
                - userSessionIssuers
            x-speakeasy-name-override: update
            x-speakeasy-react-hook:
                name: UpdateUserSessionIssuer
    /rpc/userSessionIssuersCimdClients.create:
        post:
            description: 'Allow an additional CIMD document URL on a user_session_issuer, beyond the preset catalog. The URL is validated for draft-ietf-oauth-client-id-metadata-document-02 §3 syntax and rejected outright when malformed. The document itself is deliberately NOT fetched here: a vendor''s host being briefly unreachable must not block configuration, and an advisory warning nobody can act on is not worth an outbound request on every write. Call verifyURL first to check that the document is reachable and valid.'
            operationId: createUserSessionIssuerCimdClient
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/CreateUserSessionIssuerCimdClientForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/CreateUserSessionIssuerCimdClientResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: createUserSessionIssuerCimdClient userSessionIssuersCimdClients
            tags:
                - userSessionIssuersCimdClients
            x-speakeasy-name-override: create
            x-speakeasy-react-hook:
                name: CreateUserSessionIssuerCimdClient
    /rpc/userSessionIssuersCimdClients.delete:
        delete:
            description: Remove a custom CIMD document URL from a user_session_issuer. New authorization requests from that client are denied immediately; sessions already issued to it are unaffected and continue until they expire.
            operationId: deleteUserSessionIssuerCimdClient
            parameters:
                - allowEmptyValue: true
                  description: The user_session_issuer_cimd_client id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The user_session_issuer_cimd_client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: deleteUserSessionIssuerCimdClient userSessionIssuersCimdClients
            tags:
                - userSessionIssuersCimdClients
            x-speakeasy-name-override: delete
            x-speakeasy-react-hook:
                name: DeleteUserSessionIssuerCimdClient
    /rpc/userSessionIssuersCimdClients.get:
        get:
            description: Get a single custom CIMD document URL entry by id.
            operationId: getUserSessionIssuerCimdClient
            parameters:
                - allowEmptyValue: true
                  description: The user_session_issuer_cimd_client id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The user_session_issuer_cimd_client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UserSessionIssuerCimdClient'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: getUserSessionIssuerCimdClient userSessionIssuersCimdClients
            tags:
                - userSessionIssuersCimdClients
            x-speakeasy-name-override: get
            x-speakeasy-react-hook:
                name: UserSessionIssuerCimdClient
    /rpc/userSessionIssuersCimdClients.list:
        get:
            description: List the custom CIMD document URLs configured on a user_session_issuer. Does not include the preset catalog — call listPresets for that.
            operationId: listUserSessionIssuerCimdClients
            parameters:
                - allowEmptyValue: true
                  description: The user_session_issuer whose custom CIMD clients are listed.
                  in: query
                  name: user_session_issuer_id
                  required: true
                  schema:
                    description: The user_session_issuer whose custom CIMD clients are listed.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: 'Pagination cursor: id of the last item from the previous page.'
                  in: query
                  name: cursor
                  schema:
                    description: 'Pagination cursor: id of the last item from the previous page.'
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Page size (default 50, max 100).
                  in: query
                  name: limit
                  schema:
                    description: Page size (default 50, max 100).
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListUserSessionIssuerCimdClientsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listUserSessionIssuerCimdClients userSessionIssuersCimdClients
            tags:
                - userSessionIssuersCimdClients
            x-speakeasy-name-override: list
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: UserSessionIssuerCimdClients
    /rpc/userSessionIssuersCimdClients.listPresets:
        get:
            description: List Gram's curated CIMD preset catalog. Issuers whose admission mode is 'presets' — the default — admit every enabled entry here automatically, with no per-issuer configuration. The catalog is global and contains no tenant data.
            operationId: listCimdClientPresets
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListCimdClientPresetsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listPresets userSessionIssuersCimdClients
            tags:
                - userSessionIssuersCimdClients
            x-speakeasy-name-override: listPresets
            x-speakeasy-react-hook:
                name: CimdClientPresets
    /rpc/userSessionIssuersCimdClients.verifyURL:
        post:
            description: 'Check that a CIMD document URL is reachable and spec-compliant, without saving anything. A pre-flight for create: the same fetch and validation the authorization server performs, reported in full so an operator can fix the URL before adding it. Every probe outcome is a 200 with verified true or false — errors are reserved for a malformed request, missing authorization, or an exceeded rate limit. Rate limited per project, since this is the one endpoint that makes Gram fetch a caller-chosen URL.'
            operationId: verifyUserSessionIssuerCimdClientURL
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/VerifyURLRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/VerifyCimdURLResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: verifyURL userSessionIssuersCimdClients
            tags:
                - userSessionIssuersCimdClients
            x-speakeasy-name-override: verifyURL
            x-speakeasy-react-hook:
                name: VerifyUserSessionIssuerCimdClientURL
    /rpc/userSessions.list:
        get:
            description: List issued user_sessions in the caller's project. refresh_token_hash is never returned.
            operationId: listUserSessions
            parameters:
                - allowEmptyValue: true
                  description: Exact-match filter on subject URN.
                  in: query
                  name: subject_urn
                  schema:
                    description: Exact-match filter on subject URN.
                    type: string
                - allowEmptyValue: true
                  description: Filter by user_session_issuer id.
                  in: query
                  name: user_session_issuer_id
                  schema:
                    description: Filter by user_session_issuer id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Filter by session status.
                  in: query
                  name: status
                  schema:
                    description: Filter by session status.
                    enum:
                        - active
                        - expired
                        - revoked
                        - all
                    type: string
                - allowEmptyValue: true
                  description: Filter by the connecting client id.
                  in: query
                  name: client_id
                  schema:
                    description: Filter by the connecting client id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: 'Pagination cursor: id of the last item from the previous page.'
                  in: query
                  name: cursor
                  schema:
                    description: 'Pagination cursor: id of the last item from the previous page.'
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Page size (default 50, max 100).
                  in: query
                  name: limit
                  schema:
                    description: Page size (default 50, max 100).
                    format: int64
                    type: integer
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListUserSessionsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listUserSessions userSessions
            tags:
                - userSessions
            x-speakeasy-name-override: list
            x-speakeasy-pagination:
                inputs:
                    - in: parameters
                      name: cursor
                      type: cursor
                outputs:
                    nextCursor: $.next_cursor
                type: cursor
            x-speakeasy-react-hook:
                name: UserSessions
    /rpc/userSessions.listFacets:
        get:
            description: List available user session facet values (clients, users, servers) in the caller's project.
            operationId: listUserSessionFacets
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListUserSessionFacetsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listFacets userSessions
            tags:
                - userSessions
            x-speakeasy-name-override: listFacets
            x-speakeasy-react-hook:
                name: UserSessionFacets
    /rpc/userSessions.mint:
        post:
            description: 'Mint a user_session on behalf of the authenticated dashboard user, bound to an issuer-gated audience: either a toolset (/mcp) or a remote MCP server (/x/mcp). Exactly one of toolset_id or mcp_server_id must be provided. The minted JWT matches the shape /token would emit after a successful OAuth dance, so the runtime MCP gateway validates it through the same path as a real MCP client''s bearer.'
            operationId: mintUserSession
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/MintUserSessionRequestBody'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/MintUserSessionResponseBody'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
            summary: mintUserSession userSessions
            tags:
                - userSessions
            x-speakeasy-name-override: mint
            x-speakeasy-react-hook:
                name: MintUserSession
    /rpc/userSessions.revoke:
        post:
            description: Push the session's jti into the revocation cache and soft-delete the row.
            operationId: revokeUserSession
            parameters:
                - allowEmptyValue: true
                  description: The user_session id.
                  in: query
                  name: id
                  required: true
                  schema:
                    description: The user_session id.
                    format: uuid
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: revokeUserSession userSessions
            tags:
                - userSessions
            x-speakeasy-name-override: revoke
            x-speakeasy-react-hook:
                name: RevokeUserSession
    /rpc/variations.createGlobal:
        post:
            description: 'Ensure the project-default (global) tool variation group exists, returning it. Idempotent: returns the existing group unchanged when present, otherwise creates it. Takes no parameters and only manages the single project-default group.'
            operationId: createGlobalToolVariationGroup
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ToolVariationGroupResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: createGlobal variations
            tags:
                - variations
            x-speakeasy-name-override: createGlobal
            x-speakeasy-react-hook:
                name: CreateGlobalToolVariationGroup
    /rpc/variations.deleteGlobal:
        delete:
            description: Create or update a globally defined tool variation.
            operationId: deleteGlobalVariation
            parameters:
                - allowEmptyValue: true
                  description: The ID of the variation to delete
                  in: query
                  name: variation_id
                  required: true
                  schema:
                    description: The ID of the variation to delete
                    type: string
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/DeleteGlobalToolVariationResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: deleteGlobal variations
            tags:
                - variations
            x-speakeasy-name-override: deleteGlobal
            x-speakeasy-react-hook:
                name: deleteGlobalVariation
    /rpc/variations.listGlobal:
        get:
            description: List globally defined tool variations.
            operationId: listGlobalVariations
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListVariationsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listGlobal variations
            tags:
                - variations
            x-speakeasy-name-override: listGlobal
            x-speakeasy-react-hook:
                name: GlobalVariations
    /rpc/variations.listGroups:
        get:
            description: List the tool variation groups visible to the project. In v1 this returns the project-default group when it exists, or an empty list otherwise.
            operationId: listToolVariationGroups
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/ListToolVariationGroupsResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: listGroups variations
            tags:
                - variations
            x-speakeasy-name-override: listGroups
            x-speakeasy-react-hook:
                name: ToolVariationGroups
    /rpc/variations.upsertGlobal:
        post:
            description: Create or update a globally defined tool variation.
            operationId: upsertGlobalVariation
            parameters:
                - allowEmptyValue: true
                  description: Session header
                  in: header
                  name: Gram-Session
                  schema:
                    description: Session header
                    type: string
                - allowEmptyValue: true
                  description: API Key header
                  in: header
                  name: Gram-Key
                  schema:
                    description: API Key header
                    type: string
                - allowEmptyValue: true
                  description: project header
                  in: header
                  name: Gram-Project
                  schema:
                    description: project header
                    type: string
            requestBody:
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/UpsertGlobalToolVariationForm'
                required: true
            responses:
                "200":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/UpsertGlobalToolVariationResult'
                    description: OK response.
                "400":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'bad_request: request is invalid'
                "401":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unauthorized: unauthorized access'
                "403":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'forbidden: permission denied'
                "404":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'not_found: resource not found'
                "409":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'conflict: resource already exists'
                "415":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unsupported_media: unsupported media type'
                "422":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'invalid: request contains one or more invalidation fields'
                "500":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'unexpected: an unexpected error occurred'
                "502":
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/Error'
                    description: 'gateway_error: an unexpected error occurred'
            security:
                - project_slug_header_Gram-Project: []
                  session_header_Gram-Session: []
                - apikey_header_Gram-Key: []
                  project_slug_header_Gram-Project: []
            summary: upsertGlobal variations
            tags:
                - variations
            x-speakeasy-name-override: upsertGlobal
            x-speakeasy-react-hook:
                name: UpsertGlobalVariation
components:
    schemas:
        AIIntegrationConfig:
            type: object
            properties:
                billing_mode:
                    type: string
                    description: 'How the provider org is billed: ''metered'' (pay-per-token; dashboard cost is real spend), ''flat_rate'' (subscription seats; cost is an estimate), or ''unknown''. Empty/omitted when not declared.'
                created_at:
                    type: string
                    description: ISO 8601 timestamp when the config was created. Omitted when no config is set.
                    format: date-time
                enabled:
                    type: boolean
                    description: Whether the provider integration is active.
                external_organization_id:
                    type: string
                    description: Provider scope identifier. Required for anthropic_compliance and codex_compliance (organization id) and chatgpt_compliance (ChatGPT workspace UUID); omitted for providers that do not need one.
                has_api_key:
                    type: boolean
                    description: Whether an API key is currently stored. The key itself is never returned.
                id:
                    type: string
                    description: Config ID. Omitted when no config is set for the provider.
                last_poll_error:
                    type: string
                    description: Stored error from the latest failed usage poll. Omitted unless the latest poll state failed.
                last_poll_failed_at:
                    type: string
                    description: ISO 8601 timestamp for the latest failed usage poll. Omitted unless a poll has failed.
                    format: date-time
                last_poll_status:
                    type: string
                    description: Derived status for the latest usage poll state. Omitted when no config is set for the provider.
                    enum:
                        - pending
                        - success
                        - failed
                last_polled_at:
                    type: string
                    description: ISO 8601 timestamp for the last successful usage poll. Omitted until a poll succeeds.
                    format: date-time
                next_poll_after:
                    type: string
                    description: ISO 8601 timestamp for the next scheduled usage poll. Omitted when no config is set.
                    format: date-time
                organization_id:
                    type: string
                    description: Organization the config belongs to.
                project_id:
                    type: string
                    description: Project used as the telemetry write target. Omitted when no config is set.
                provider:
                    type: string
                    description: AI provider identifier. Supported values include cursor, anthropic_compliance, codex_compliance, and chatgpt_compliance.
                updated_at:
                    type: string
                    description: ISO 8601 timestamp of the most recent change. Omitted when no config is set.
                    format: date-time
            description: Per-organization AI provider integration config. The provider API key is write-only; reads only expose whether a key is configured.
            required:
                - organization_id
                - provider
                - enabled
                - has_api_key
        AIIntegrationScheduleState:
            type: object
            properties:
                auto_paused_at:
                    type: string
                    description: ISO 8601 timestamp when the scheduler auto-paused the schedule after repeated provider rejections. Omitted unless auto-paused.
                    format: date-time
                consecutive_failures:
                    type: integer
                    description: Number of consecutive failed polls. Resets to zero on success or retry.
                    format: int64
                enabled:
                    type: boolean
                    description: Whether the user has this schedule enabled. Disabled schedules are skipped by the poller until re-enabled.
                last_poll_error:
                    type: string
                    description: Stored error from the schedule's latest failed poll. Omitted unless the latest poll failed.
                last_poll_failed_at:
                    type: string
                    description: ISO 8601 timestamp for the schedule's latest failed poll. Omitted unless a poll has failed.
                    format: date-time
                last_poll_success_at:
                    type: string
                    description: ISO 8601 timestamp for the schedule's last successful poll. Omitted until a poll succeeds.
                    format: date-time
                next_poll_after:
                    type: string
                    description: ISO 8601 timestamp for the schedule's next scheduled poll.
                    format: date-time
                schedule:
                    type: string
                    description: Schedule identifier (e.g. cursor, anthropic_compliance, anthropic_analytics_usage).
                status:
                    type: string
                    description: Derived status for the schedule's latest poll state.
                    enum:
                        - pending
                        - success
                        - failed
                        - auto_paused
                        - disabled
                stream:
                    type: string
                    description: Product-level identifier for the stream this schedule writes (e.g. cursor.usage, claude.chat.message). Omitted for legacy schedules with no registered stream.
                stream_kind:
                    type: string
                    description: Whether the stream carries discrete events or aggregated metrics. Omitted for legacy schedules with no registered stream.
                    enum:
                        - events
                        - metrics
            description: Scheduler state for one sync schedule (stream) of a provider integration.
            required:
                - schedule
                - enabled
                - status
                - consecutive_failures
        AccessMember:
            type: object
            properties:
                email:
                    type: string
                    description: Email address.
                id:
                    type: string
                    description: User ID.
                joined_at:
                    type: string
                    description: When the member joined the organization.
                    format: date-time
                name:
                    type: string
                    description: Display name.
                photo_url:
                    type: string
                    description: Avatar URL.
                principal_urn:
                    type: string
                    description: Canonical principal URN for this member.
                role_ids:
                    type: array
                    items:
                        type: string
                    description: All role IDs assigned to this member.
            required:
                - id
                - principal_urn
                - name
                - email
                - role_ids
                - joined_at
        AcknowledgeRiskPolicyChallengeRequestBody:
            type: object
            properties:
                ack_token:
                    type: string
                    description: Acknowledgement token generated when a warn policy challenged the action.
            required:
                - ack_token
        AcknowledgeRiskPolicyChallengeResponseBody:
            type: object
            properties:
                acknowledged:
                    type: boolean
                    description: Whether the challenge is now acknowledged.
                expires_at:
                    type: string
                    description: RFC3339 time until which the acknowledgement suppresses re-challenge.
                    format: date-time
                policy_name:
                    type: string
                    description: The policy that issued the warning.
            required:
                - acknowledged
        ActorAttribute:
            type: object
            properties:
                description:
                    type: string
                    description: Human-readable description of the attribute.
                name:
                    type: string
                    description: Attribute name as used in target conditions, e.g. department_name.
                type:
                    type: string
                    description: 'Value kind: a scalar string or a list of strings.'
                    enum:
                        - string
                        - list
            required:
                - name
                - type
                - description
        AddDeploymentPackageForm:
            type: object
            properties:
                name:
                    type: string
                    description: The name of the package.
                version:
                    type: string
                    description: The version of the package.
            required:
                - name
        AddExternalMCPForm:
            type: object
            properties:
                name:
                    type: string
                    description: The display name for the external MCP server.
                    example: My Slack Integration
                organization_mcp_collection_registry_id:
                    type: string
                    description: The ID of the internal collection registry the server is from.
                    format: uuid
                registry_id:
                    type: string
                    description: The ID of the external MCP registry the server is from.
                    format: uuid
                registry_server_specifier:
                    type: string
                    description: The canonical server name used to look up the server in the registry (e.g., 'slack', 'ai.exa/exa').
                    example: slack
                selected_remotes:
                    type: array
                    items:
                        type: string
                    description: URLs of the remotes to use for this MCP server. If not provided, the backend will auto-select based on transport type preference.
                    example:
                        - https://mcp.example.com/sse
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            required:
                - name
                - slug
                - registry_server_specifier
        AddExternalOAuthServerForm:
            type: object
            properties:
                external_oauth_server:
                    $ref: '#/components/schemas/ExternalOAuthServerForm'
                project_slug_input:
                    type: string
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            required:
                - slug
                - external_oauth_server
        AddExternalOAuthServerRequestBody:
            type: object
            properties:
                external_oauth_server:
                    $ref: '#/components/schemas/ExternalOAuthServerForm'
            required:
                - external_oauth_server
        AddFunctionsForm:
            type: object
            properties:
                asset_id:
                    type: string
                    description: The ID of the functions file from the assets service.
                memory_mib:
                    type: integer
                    description: The amount of memory in MiB to allocate for the function (1 MiB = 1024 * 1024 bytes).
                    format: int64
                    minimum: 0
                    maximum: 4096
                name:
                    type: string
                    description: The functions file display name.
                runtime:
                    type: string
                    description: 'The runtime to use when executing functions. Allowed values are: nodejs:22, nodejs:24, python:3.12.'
                scale:
                    type: integer
                    description: The number of instances to scale the function to.
                    format: int64
                    minimum: 0
                    maximum: 5
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            required:
                - asset_id
                - name
                - slug
                - runtime
        AddOpenAPIv3DeploymentAssetForm:
            type: object
            properties:
                asset_id:
                    type: string
                    description: The ID of the uploaded asset.
                name:
                    type: string
                    description: The name to give the document as it will be displayed in UIs.
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            required:
                - asset_id
                - name
                - slug
        AddOpenAPIv3SourceForm:
            type: object
            properties:
                asset_id:
                    type: string
                    description: The ID of the uploaded asset.
                name:
                    type: string
                    description: The name to give the document as it will be displayed in UIs.
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            required:
                - asset_id
                - name
                - slug
        AddOpenAPIv3SourceResult:
            type: object
            properties:
                deployment:
                    $ref: '#/components/schemas/Deployment'
        AddPackageForm:
            type: object
            properties:
                name:
                    type: string
                    description: The name of the package to add.
                version:
                    type: string
                    description: The version of the package to add. If omitted, the latest version will be used.
            required:
                - name
        AddPluginServerForm:
            type: object
            properties:
                display_name:
                    type: string
                    description: Display name for the server. Defaults to the backing toolset or mcp_server name when omitted.
                mcp_server_id:
                    type: string
                    description: Gram MCP server ID for a Remote MCP-backed server. Provide exactly one of toolset_id or mcp_server_id.
                    format: uuid
                plugin_id:
                    type: string
                    format: uuid
                policy:
                    type: string
                    default: required
                    enum:
                        - required
                        - optional
                sort_order:
                    type: integer
                    default: 0
                    format: int32
                toolset_id:
                    type: string
                    description: Gram toolset ID for a toolset-backed MCP server. Provide exactly one of toolset_id or mcp_server_id.
                    format: uuid
            required:
                - plugin_id
        AddSkillVersionRequestBody:
            type: object
            properties:
                content:
                    type: string
                    description: The complete uploaded SKILL.md content. Handlers enforce a maximum size of 65,536 UTF-8 bytes.
                derived_from_version_id:
                    type: string
                    description: The optional source version this new version was derived from.
                    format: uuid
                id:
                    type: string
                    description: The skill ID.
                    format: uuid
            required:
                - id
                - content
        AddToolMetadataBatchResult:
            type: object
            properties:
                tools:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolMetadata'
                    description: The tool metadata entries created by this call
            description: Result of a strictly additive tool metadata batch insert.
            required:
                - tools
        AdminBulkUpdateAccountTypeResult:
            type: object
            properties:
                missing_ids:
                    type: array
                    items:
                        type: string
                    description: IDs from the request that matched no organization, deduplicated and in request order. Nothing was written for these.
                updated_ids:
                    type: array
                    items:
                        type: string
                    description: 'IDs of the organizations whose account type was set. Order is unspecified: do not rely on it.'
            description: Outcome of a bulk account type change.
            required:
                - updated_ids
                - missing_ids
        AdminListOrganizationMembersResult:
            type: object
            properties:
                members:
                    type: array
                    items:
                        $ref: '#/components/schemas/AdminOrganizationMember'
                    description: The members of the organization.
            required:
                - members
        AdminListOrganizationProjectsResult:
            type: object
            properties:
                projects:
                    type: array
                    items:
                        $ref: '#/components/schemas/AdminProject'
                    description: The projects belonging to the organization.
            required:
                - projects
        AdminListOrganizationsResult:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: Cursor for the next page; empty when exhausted. Omitted in offset mode.
                organizations:
                    type: array
                    items:
                        $ref: '#/components/schemas/AdminOrganization'
                    description: The page of organizations.
                total:
                    type: integer
                    description: Number of organizations matching the filters, before paging.
                    format: int64
            required:
                - organizations
                - total
        AdminOpenRouterKey:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the key row was created.
                    format: date-time
                disabled:
                    type: boolean
                    description: Whether the key is locked down (refused locally and disabled upstream).
                gram_account_type:
                    type: string
                    description: The organization's Gram account type (e.g. free, pro, enterprise).
                key_type:
                    type: string
                    description: 'Which upstream key this row provisions: ''chat'' pays for customer-facing completions, ''internal'' pays for platform-initiated LLM usage.'
                monthly_credits:
                    type: integer
                    description: Monthly credit ceiling last mirrored from OpenRouter.
                    format: int64
                organization_id:
                    type: string
                    description: Organization that owns the key.
                organization_name:
                    type: string
                    description: Display name of the owning organization.
                organization_slug:
                    type: string
                    description: Slug of the owning organization.
                updated_at:
                    type: string
                    description: When the key row was last updated.
                    format: date-time
            description: One organization's platform OpenRouter key of a given type, without its key material.
            required:
                - organization_id
                - organization_name
                - organization_slug
                - gram_account_type
                - key_type
                - monthly_credits
                - disabled
                - created_at
                - updated_at
        AdminOrganization:
            type: object
            properties:
                account_type:
                    type: string
                    description: Gram account type (e.g. free, pro, payg, enterprise).
                created_at:
                    type: string
                    description: The creation date of the organization.
                    format: date-time
                disabled_at:
                    type: string
                    description: The time at which the organization was disabled, if any.
                    format: date-time
                free_trial_ends_at:
                    type: string
                    description: The time at which the free trial ends.
                    format: date-time
                free_trial_started_at:
                    type: string
                    description: The time at which the free trial started.
                    format: date-time
                id:
                    type: string
                    description: The ID of the organization
                member_count:
                    type: integer
                    description: Number of active members in the organization.
                    format: int64
                name:
                    type: string
                    description: The name of the organization
                slug:
                    type: string
                    description: The slug of the organization
                trial_ends_at:
                    type: string
                    description: The time at which the enterprise trial ends. Absent when the organization never trialled.
                    format: date-time
                trial_state:
                    type: string
                    description: Lifecycle state of the organization's enterprise trial.
                    enum:
                        - none
                        - running
                        - ending_soon
                        - expired
                        - demoted
                        - converted
                updated_at:
                    type: string
                    description: The last update date of the organization.
                    format: date-time
                whitelisted:
                    type: boolean
                    description: Whether the organization is whitelisted for full access.
                workos_id:
                    type: string
                    description: WorkOS organization ID, if linked.
            description: Organization details surfaced to admin operators.
            required:
                - id
                - name
                - slug
                - account_type
                - whitelisted
                - member_count
                - created_at
                - updated_at
        AdminOrganizationMember:
            type: object
            properties:
                created_at:
                    type: string
                    format: date-time
                display_name:
                    type: string
                    description: User display name.
                email:
                    type: string
                    description: User email address.
                id:
                    type: string
                    description: User ID.
                last_login:
                    type: string
                    description: The time the user last logged in, if any.
                    format: date-time
                updated_at:
                    type: string
                    format: date-time
            description: Organization member surfaced to admin operators.
            required:
                - id
                - email
                - display_name
                - created_at
                - updated_at
        AdminOrganizationStats:
            type: object
            properties:
                created_last_7_days:
                    type: integer
                    description: Organizations created in the last 7 days, whatever their current status.
                    format: int64
                disabled:
                    type: integer
                    description: Organizations with disabled_at set.
                    format: int64
                disabled_last_7_days:
                    type: integer
                    description: Organizations disabled in the last 7 days.
                    format: int64
                total:
                    type: integer
                    description: Every organization on the platform, disabled ones included.
                    format: int64
                trials_ending_soon:
                    type: integer
                    description: Organizations whose trial_state is ending_soon.
                    format: int64
            description: Platform-wide organization counts surfaced above the admin organizations list.
            required:
                - total
                - created_last_7_days
                - trials_ending_soon
                - disabled
                - disabled_last_7_days
        AdminProject:
            type: object
            properties:
                created_at:
                    type: string
                    description: The creation date of the project.
                    format: date-time
                id:
                    type: string
                    description: The ID of the project
                mcp_server_count:
                    type: integer
                    description: Number of MCP servers in the project, counting both toolset-backed servers and mcp_servers rows.
                    format: int64
                name:
                    type: string
                    description: The name of the project
                slug:
                    type: string
                    description: The slug of the project
                updated_at:
                    type: string
                    description: The last update date of the project.
                    format: date-time
            description: Project summary surfaced to admin operators.
            required:
                - id
                - name
                - slug
                - mcp_server_count
                - created_at
                - updated_at
        AdminProjectDetail:
            type: object
            properties:
                api_key_count:
                    type: integer
                    description: Number of active API keys in the project.
                    format: int64
                assistant_count:
                    type: integer
                    description: Number of active assistants in the project.
                    format: int64
                created_at:
                    type: string
                    format: date-time
                deployment_count:
                    type: integer
                    description: Total number of deployments in the project.
                    format: int64
                environment_count:
                    type: integer
                    description: Number of active environments in the project.
                    format: int64
                functions_runner_version:
                    type: string
                    description: Functions runner version pin, if set.
                http_tool_count:
                    type: integer
                    description: Number of active HTTP tool definitions in the project.
                    format: int64
                id:
                    type: string
                    description: Project ID.
                logo_asset_id:
                    type: string
                    description: Project logo asset ID, if set.
                name:
                    type: string
                    description: Project name.
                organization_id:
                    type: string
                    description: Owning organization ID.
                slug:
                    type: string
                    description: Project slug.
                toolset_count:
                    type: integer
                    description: Number of active toolsets in the project.
                    format: int64
                updated_at:
                    type: string
                    format: date-time
            description: Full project detail surfaced to admin operators, including aggregated counts of child resources.
            required:
                - id
                - name
                - slug
                - organization_id
                - toolset_count
                - deployment_count
                - http_tool_count
                - environment_count
                - api_key_count
                - assistant_count
                - created_at
                - updated_at
        AgentMarketplace:
            type: object
            properties:
                name:
                    type: string
                    description: Stable identifier for the marketplace, used as its key when the agent registers it with a managed tool. Matches the name written into the published marketplace.json, derived from the organization name (for example, `<org-slug>-gram`), so plugin references resolve deterministically across polls.
                url:
                    type: string
                    description: Git URL for the marketplace, served by the marketplace proxy.
            required:
                - name
                - url
        AgentPlugin:
            type: object
            properties:
                marketplace_name:
                    type: string
                    description: Name of the marketplace this plugin lives in. Always equals the `name` of one of the marketplaces in the same response.
                slug:
                    type: string
                    description: Plugin slug. Combined with marketplace_name, this identifies the plugin the agent enables in the managed tool.
            required:
                - slug
                - marketplace_name
        AgentSessionMeta:
            type: object
            properties:
                chat_id:
                    type: string
                    description: Gram chat id for the captured session.
                    format: uuid
                session_id:
                    type: string
                    description: The native harness session identifier this entry resolves, echoed from the request.
                title:
                    type: string
                    description: Generated (or manually set) chat title. Absent when no title has been generated yet.
                updated_at:
                    type: string
                    description: Last activity recorded for the captured session.
                    format: date-time
            required:
                - session_id
                - chat_id
                - updated_at
        AgentUsage:
            type: object
            properties:
                claude:
                    $ref: '#/components/schemas/ClaudeAgentUsage'
                type:
                    type: string
                    description: The agent usage payload discriminator.
                    enum:
                        - claude
            required:
                - type
        AllowedOrigin:
            type: object
            properties:
                created_at:
                    type: string
                    description: The creation date of the allowed origin.
                    format: date-time
                id:
                    type: string
                    description: The ID of the allowed origin
                origin:
                    type: string
                    description: The origin URL
                project_id:
                    type: string
                    description: The ID of the project
                status:
                    type: string
                    default: pending
                    enum:
                        - pending
                        - approved
                        - rejected
                updated_at:
                    type: string
                    description: The last update date of the allowed origin.
                    format: date-time
            required:
                - id
                - project_id
                - origin
                - status
                - created_at
                - updated_at
        ApprovalDecision:
            type: object
            properties:
                decided_at:
                    type: string
                    description: When the decision was made.
                    format: date-time
                decided_by:
                    type: string
                    description: Who decided.
                decision:
                    type: string
                    description: Either approved or denied.
                evidence:
                    description: 'The evidence as it stood when this decision was made. Frozen at decision time: a later re-gather updates the request''s evidence but never this snapshot, so what the reviewer actually saw stays inspectable.'
                evidence_version:
                    type: integer
                    description: Shape version of the frozen evidence payload, copied from the request at decision time.
                    format: int64
                granted_principal_urns:
                    type: array
                    items:
                        type: string
                    description: Principals the approval covers. Empty for a denial.
                id:
                    type: string
                    description: The decision ID.
                rationale:
                    type: string
                    description: Why. Written to be cited when explaining the decision to the requester.
                research_report_id:
                    type: string
                    description: The research report this decision cited, when one informed it.
            description: A recorded approve or deny, with the evidence it rested on.
            required:
                - id
                - decision
                - decided_by
                - granted_principal_urns
                - evidence_version
                - decided_at
        ApprovalRequestDetail:
            type: object
            properties:
                decisions:
                    type: array
                    items:
                        $ref: '#/components/schemas/ApprovalDecision'
                    description: Every decision made on this server, newest first. A repeat request starts from the last rationale rather than from zero.
                evidence:
                    description: The deterministic signals gathered for this server, as they stood when last collected. Every item is a declaration by the server or its registry, never an observation of behaviour.
                evidence_collected_at:
                    type: string
                    description: When the evidence was last gathered.
                    format: date-time
                evidence_version:
                    type: integer
                    description: Shape version of the evidence payload, so an older snapshot stays interpretable.
                    format: int64
                request:
                    $ref: '#/components/schemas/ApprovalRequestSummary'
                requesters:
                    type: array
                    items:
                        $ref: '#/components/schemas/ApprovalRequester'
                    description: Everyone who asked.
                research_reports:
                    type: array
                    items:
                        $ref: '#/components/schemas/ResearchReport'
                    description: Every research-agent run for this request, newest first.
            description: An approval request with everything needed to decide it.
            required:
                - request
                - requesters
                - decisions
                - research_reports
        ApprovalRequestSummary:
            type: object
            properties:
                artifact_ref:
                    type: string
                    description: The resolved artifact identity. Absent when the server could not be identified, which must surface as unknown rather than as an absence of findings.
                created_at:
                    type: string
                    description: When the request was first raised.
                    format: date-time
                id:
                    type: string
                    description: The approval request ID.
                requester_count:
                    type: integer
                    description: How many people have asked for this server.
                    format: int64
                server_slug:
                    type: string
                    description: The Shadow MCP inventory page slug for a server_url target — the same identifier the inventory derives from the canonical URL, so a request links to the server page it describes. Absent for stdio targets.
                status:
                    type: string
                    description: The request's current status.
                target_kind:
                    type: string
                    description: The namespace of the requested reference, such as server_url or stdio_command.
                target_raw:
                    type: string
                    description: The stored display form of the requested reference, with credential-shaped material (URL query strings and userinfo, secret-named flag and environment values in commands) redacted at intake.
                updated_at:
                    type: string
                    description: When the request last changed.
                    format: date-time
                version_pinned:
                    type: boolean
                    description: Whether the reference names an exact version.
            description: One MCP server awaiting a decision.
            required:
                - id
                - target_kind
                - target_raw
                - version_pinned
                - status
                - requester_count
                - created_at
                - updated_at
        ApprovalRequester:
            type: object
            properties:
                note:
                    type: string
                    description: The requester's justification. The one input no automated evidence supplies.
                requested_at:
                    type: string
                    description: When they asked.
                    format: date-time
                user_email:
                    type: string
                    description: The requester's email, when known.
                user_id:
                    type: string
                    description: The requester.
            description: Someone who asked for a server, and why.
            required:
                - user_id
                - requested_at
        ApproveAllSkillSuggestionsRequestBody:
            type: object
            properties:
                suggestion_ids:
                    type: array
                    items:
                        type: string
                        format: uuid
                    description: Optional suggestion IDs to approve. Omitted or empty approves every currently open suggestion.
        ApproveAllSkillSuggestionsResult:
            type: object
            properties:
                items:
                    type: array
                    items:
                        $ref: '#/components/schemas/SkillSuggestionApprovalItem'
                    description: The outcomes in snapshot order.
            description: Per-item outcomes for the snapshotted open suggestions.
            required:
                - items
        ApproveSkillSuggestionRequestBody:
            type: object
            properties:
                change_ids:
                    type: array
                    items:
                        type: string
                        format: uuid
                    description: Optional IDs of the proposed changes to take together as one new version. The suggestion stays open carrying whatever is left. Cannot be combined with edited content.
                content:
                    type: string
                    description: Optional edited complete SKILL.md content. Handlers enforce a maximum size of 65,536 UTF-8 bytes.
                id:
                    type: string
                    description: The suggestion ID.
                    format: uuid
            required:
                - id
        ApproveSkillSuggestionResult:
            type: object
            properties:
                outcome:
                    type: string
                    description: Whether the suggestion created a version, created one and stayed open carrying its remaining changes, or was stale.
                    enum:
                        - applied
                        - partially_applied
                        - superseded
                suggestion:
                    $ref: '#/components/schemas/SkillEditSuggestion'
                version:
                    $ref: '#/components/schemas/SkillVersion'
            description: The result of approving one suggestion.
            required:
                - suggestion
                - outcome
        ArchiveSkillRequestBody:
            type: object
            properties:
                id:
                    type: string
                    description: The skill ID.
                    format: uuid
            required:
                - id
        Asset:
            type: object
            properties:
                content_length:
                    type: integer
                    description: The content length of the asset
                    format: int64
                content_type:
                    type: string
                    description: The content type of the asset
                created_at:
                    type: string
                    description: The creation date of the asset.
                    format: date-time
                id:
                    type: string
                    description: The ID of the asset
                kind:
                    type: string
                    enum:
                        - openapiv3
                        - image
                        - functions
                        - chat_attachment
                        - unknown
                sha256:
                    type: string
                    description: The SHA256 hash of the asset
                updated_at:
                    type: string
                    description: The last update date of the asset.
                    format: date-time
            required:
                - id
                - kind
                - sha256
                - content_type
                - content_length
                - created_at
                - updated_at
        Assistant:
            type: object
            properties:
                created_at:
                    type: string
                    description: Creation timestamp.
                    format: date-time
                created_by_user_id:
                    type: string
                    description: The ID of the user who created the assistant, if known.
                id:
                    type: string
                    description: The assistant ID.
                    format: uuid
                instructions:
                    type: string
                    description: The system instructions for the assistant.
                max_concurrency:
                    type: integer
                    description: Maximum active warm runtimes for the assistant.
                    format: int64
                mcp_servers:
                    type: array
                    items:
                        $ref: '#/components/schemas/AssistantMCPServerRef'
                    description: MCP servers attached directly to the assistant (remote- or tunnelled-backed).
                model:
                    type: string
                    description: The model identifier used by the assistant.
                name:
                    type: string
                    description: The assistant name.
                project_id:
                    type: string
                    description: The project ID owning the assistant.
                    format: uuid
                skills:
                    type: array
                    items:
                        $ref: '#/components/schemas/AssistantSkillRef'
                    description: Skills attached to the assistant.
                status:
                    type: string
                    description: The assistant status.
                    enum:
                        - active
                        - paused
                toolsets:
                    type: array
                    items:
                        $ref: '#/components/schemas/AssistantToolsetRef'
                    description: Toolsets available to the assistant.
                updated_at:
                    type: string
                    description: Last update timestamp.
                    format: date-time
                warm_ttl_seconds:
                    type: integer
                    description: Warm runtime TTL in seconds.
                    format: int64
            required:
                - id
                - project_id
                - name
                - model
                - instructions
                - toolsets
                - mcp_servers
                - skills
                - warm_ttl_seconds
                - max_concurrency
                - status
                - created_at
                - updated_at
        AssistantMCPServerRef:
            type: object
            properties:
                endpoint_slug:
                    type: string
                    description: The slug of the server's Gram-hosted MCP endpoint (/mcp/{endpoint_slug}). Populated on reads; ignored on writes. Absent when the server has no Gram-hosted endpoint.
                environment_slug:
                    type: string
                    description: Optional environment slug used when connecting to the MCP server.
                mcp_server_slug:
                    type: string
                    description: The MCP server slug exposed to the assistant. Covers remote- and tunnelled-backed MCP servers, which have no toolset to attach.
            required:
                - mcp_server_slug
        AssistantMemory:
            type: object
            properties:
                assistant_id:
                    type: string
                    description: The assistant ID owning the memory.
                    format: uuid
                content:
                    type: string
                    description: The memory content.
                created_at:
                    type: string
                    description: Creation timestamp.
                    format: date-time
                deleted_at:
                    type: string
                    description: Timestamp at which the memory was soft-deleted.
                    format: date-time
                id:
                    type: string
                    description: The assistant memory ID.
                    format: uuid
                last_access:
                    type: string
                    description: Timestamp of the most recent access.
                    format: date-time
                superseded_at:
                    type: string
                    description: Timestamp at which the memory was superseded by another memory.
                    format: date-time
                supersedes_id:
                    type: string
                    description: The ID of the memory this one supersedes, if any.
                    format: uuid
                tags:
                    type: array
                    items:
                        type: string
                    description: Tags associated with the memory.
                updated_at:
                    type: string
                    description: Last update timestamp.
                    format: date-time
                valid_at:
                    type: string
                    description: Timestamp at which the memory becomes valid.
                    format: date-time
            required:
                - id
                - assistant_id
                - content
                - tags
                - created_at
                - updated_at
                - last_access
                - valid_at
        AssistantSessionSummary:
            type: object
            properties:
                messages:
                    type: integer
                    description: Number of messages created in the range
                    format: int64
                sessions:
                    type: integer
                    description: Number of sessions with activity in the range
                    format: int64
                total_cost:
                    type: number
                    description: Cost in USD incurred in the range
                    format: double
                total_tokens:
                    type: integer
                    description: Tokens consumed in the range
                    format: int64
            required:
                - sessions
                - messages
                - total_tokens
                - total_cost
        AssistantSkillRef:
            type: object
            properties:
                pinned_version_id:
                    type: string
                    description: The pinned version, absent when tracking latest valid.
                    format: uuid
                resolved_version_id:
                    type: string
                    description: The currently resolved valid version.
                    format: uuid
                skill_id:
                    type: string
                    description: The attached skill ID.
                    format: uuid
            required:
                - skill_id
                - resolved_version_id
        AssistantToolsetRef:
            type: object
            properties:
                environment_slug:
                    type: string
                    description: Optional environment slug used when invoking the toolset.
                toolset_slug:
                    type: string
                    description: The toolset slug exposed to the assistant.
            required:
                - toolset_slug
        AttachServerRequestBody:
            type: object
            properties:
                collection_id:
                    type: string
                    description: ID of the collection
                    format: uuid
                mcp_server_id:
                    type: string
                    description: ID of the MCP server to attach (provide exactly one of toolset_id or mcp_server_id)
                    format: uuid
                toolset_id:
                    type: string
                    description: ID of the toolset to attach (provide exactly one of toolset_id or mcp_server_id)
                    format: uuid
            required:
                - collection_id
        AttachUserSessionIssuerForm:
            type: object
            properties:
                id:
                    type: string
                    description: The remote_session_client id.
                    format: uuid
                user_session_issuer_id:
                    type: string
                    description: The user_session_issuer to attach.
                    format: uuid
            description: Form for attaching a user_session_issuer to a remote_session_client via the join table.
            required:
                - id
                - user_session_issuer_id
        AuditLog:
            type: object
            properties:
                acting_client_id:
                    type: string
                    description: The registered OAuth client the call authenticated as, when it had one. Absent for calls that carried no OAuth client.
                acting_surface:
                    type: string
                    description: 'How the change was made: ''dashboard'', ''api_key'', ''platform_mcp'', ''project_assistant'', or ''unknown'' when no surface was identifiable. Always present.'
                action:
                    type: string
                actor_display_name:
                    type: string
                actor_id:
                    type: string
                actor_slug:
                    type: string
                actor_type:
                    type: string
                after_snapshot: {}
                before_snapshot: {}
                created_at:
                    type: string
                    description: The creation date of the audit log.
                    format: date-time
                id:
                    type: string
                metadata:
                    type: object
                    additionalProperties: true
                project_id:
                    type: string
                project_slug:
                    type: string
                subject_display_name:
                    type: string
                subject_id:
                    type: string
                subject_slug:
                    type: string
                subject_type:
                    type: string
            required:
                - id
                - actor_id
                - actor_type
                - action
                - subject_id
                - subject_type
                - acting_surface
                - created_at
        AuditLogFacetOption:
            type: object
            properties:
                count:
                    type: integer
                    description: The number of audit logs for this facet value
                    format: int64
                display_name:
                    type: string
                    description: The display label shown for the facet value
                value:
                    type: string
                    description: The facet value used for filtering
            required:
                - value
                - display_name
                - count
        AuthorizeRequestBody:
            type: object
            properties:
                code_challenge:
                    type: string
                    description: 'PKCE code challenge: base64url(sha256(code_verifier)).'
                    minLength: 43
                    maxLength: 128
                code_challenge_method:
                    type: string
                    description: PKCE challenge method. Only S256 is supported.
                    enum:
                        - S256
                project_slug:
                    type: string
                    description: Optional project slug to scope the minted key to. Defaults to the org's default (first) project when omitted.
            required:
                - code_challenge
                - code_challenge_method
        AuthorizeResponseBody:
            type: object
            properties:
                code:
                    type: string
                    description: The opaque one-time code. Hand this to the device agent, which redeems it with its code_verifier.
                expires_in:
                    type: integer
                    description: Lifetime of the code in seconds.
                    format: int64
            required:
                - code
                - expires_in
        AuthzChallenge:
            type: object
            properties:
                evaluated_grant_count:
                    type: integer
                    description: Total grants evaluated.
                    format: int64
                id:
                    type: string
                    description: Unique challenge identifier.
                matched_grant_count:
                    type: integer
                    description: Number of grants that matched.
                    format: int64
                operation:
                    type: string
                    enum:
                        - require
                        - require_any
                        - filter
                organization_id:
                    type: string
                    description: Organization the principal was acting in.
                outcome:
                    type: string
                    enum:
                        - allow
                        - deny
                        - error
                photo_url:
                    type: string
                    description: User avatar URL when available.
                principal_type:
                    type: string
                    description: Kind of principal.
                    enum:
                        - user
                        - api_key
                        - assistant
                principal_urn:
                    type: string
                    description: Principal URN e.g. user:<uuid> or api_key:<id>.
                project_id:
                    type: string
                    description: Project scope (empty for org-level checks).
                reason:
                    type: string
                    enum:
                        - grant_matched
                        - no_grants
                        - scope_unsatisfied
                        - deny_grant
                        - invalid_check
                        - rbac_skipped_apikey
                        - dev_override
                resolution_role_slug:
                    type: string
                    description: Role slug assigned (when resolution_type=role_assigned).
                resolution_type:
                    type: string
                    description: How the challenge was resolved.
                    enum:
                        - role_assigned
                        - dismissed
                resolved_at:
                    type: string
                    description: When the challenge was resolved by an admin.
                    format: date-time
                resolved_by:
                    type: string
                    description: URN of the admin who resolved.
                resource_id:
                    type: string
                    description: Resource ID of the check.
                resource_kind:
                    type: string
                    description: Resource kind of the check.
                role_slugs:
                    type: array
                    items:
                        type: string
                    description: Roles the principal had loaded.
                scope:
                    type: string
                    description: Scope that was checked.
                timestamp:
                    type: string
                    description: When the authz decision was made.
                    format: date-time
                user_email:
                    type: string
                    description: Email when available.
            required:
                - id
                - timestamp
                - organization_id
                - principal_urn
                - principal_type
                - operation
                - outcome
                - reason
                - scope
                - role_slugs
                - evaluated_grant_count
                - matched_grant_count
        AwsIamCredential:
            type: object
            properties:
                assume_role_arn:
                    type: string
                    description: The customer IAM role ARN Gram assumes.
                created_at:
                    type: string
                    description: When the credential was created.
                    format: date-time
                external_id:
                    type: string
                    description: The Gram-generated ExternalId the customer must require in their role trust policy. Present when Gram assumes the role with an ExternalId.
                id:
                    type: string
                    description: The ID of the external credential.
                    format: uuid
                name:
                    type: string
                    description: A human-readable name for the credential.
                oidc_audience:
                    type: string
                    description: The OIDC audience. Present when Gram assumes the role with a web identity.
                oidc_subject:
                    type: string
                    description: Optional OIDC subject pin (web-identity approach).
                organization_id:
                    type: string
                    description: The organization that owns the credential.
                provider:
                    type: string
                    description: The cloud provider of the credential.
                    enum:
                        - aws_iam
                        - gcp_iam
                sts_region:
                    type: string
                    description: Optional STS region override.
                updated_at:
                    type: string
                    description: When the credential was last updated.
                    format: date-time
            description: An AWS IAM external credential.
            required:
                - id
                - organization_id
                - provider
                - name
                - created_at
                - updated_at
        AwsKmsKey:
            type: object
            properties:
                algorithm:
                    type: string
                    description: The signing algorithm of the key.
                    enum:
                        - RS256
                        - ES256
                created_at:
                    type: string
                    description: When the key was created.
                    format: date-time
                customer_grant_reference:
                    type: string
                    description: The Gram identity (GCP service-account email or AWS principal ARN) the customer granted on the key for the key-policy / IAM-grant model. Not a secret.
                external_credential_id:
                    type: string
                    description: The external credential Gram uses to authenticate to the key.
                    format: uuid
                id:
                    type: string
                    description: The ID of the external key.
                    format: uuid
                key_arn:
                    type: string
                    description: The ARN of the AWS KMS key.
                name:
                    type: string
                    description: A human-readable name for the key.
                organization_id:
                    type: string
                    description: The organization that owns the key.
                provider:
                    type: string
                    description: The cloud KMS provider of the key.
                    enum:
                        - aws_kms
                        - gcp_kms
                updated_at:
                    type: string
                    description: When the key was last updated.
                    format: date-time
            description: An AWS KMS external key.
            required:
                - key_arn
                - id
                - organization_id
                - external_credential_id
                - provider
                - algorithm
                - name
                - created_at
                - updated_at
        BaseResourceAttributes:
            type: object
            properties:
                created_at:
                    type: string
                    description: The creation date of the resource.
                    format: date-time
                description:
                    type: string
                    description: Description of the resource
                id:
                    type: string
                    description: The ID of the resource
                mime_type:
                    type: string
                    description: Optional MIME type of the resource
                name:
                    type: string
                    description: The name of the resource
                project_id:
                    type: string
                    description: The ID of the project
                resource_urn:
                    type: string
                    description: The URN of this resource
                title:
                    type: string
                    description: Optional title for the resource
                updated_at:
                    type: string
                    description: The last update date of the resource.
                    format: date-time
                uri:
                    type: string
                    description: The URI of the resource
            description: Common attributes shared by all resource types
            required:
                - id
                - project_id
                - name
                - description
                - uri
                - resource_urn
                - created_at
                - updated_at
        BaseToolAttributes:
            type: object
            properties:
                annotations:
                    $ref: '#/components/schemas/ToolAnnotations'
                canonical:
                    $ref: '#/components/schemas/CanonicalToolAttributes'
                canonical_name:
                    type: string
                    description: The canonical name of the tool. Will be the same as the name if there is no variation.
                confirm:
                    type: string
                    description: Confirmation mode for the tool
                confirm_prompt:
                    type: string
                    description: Prompt for the confirmation
                created_at:
                    type: string
                    description: The creation date of the tool.
                    format: date-time
                description:
                    type: string
                    description: Description of the tool
                id:
                    type: string
                    description: The ID of the tool
                name:
                    type: string
                    description: The name of the tool
                project_id:
                    type: string
                    description: The ID of the project
                schema:
                    type: string
                    description: JSON schema for the request
                schema_version:
                    type: string
                    description: Version of the schema
                summarizer:
                    type: string
                    description: Summarizer for the tool
                tool_urn:
                    type: string
                    description: The URN of this tool
                updated_at:
                    type: string
                    description: The last update date of the tool.
                    format: date-time
                variation:
                    $ref: '#/components/schemas/ToolVariation'
            description: Common attributes shared by all tool types
            required:
                - id
                - project_id
                - name
                - canonical_name
                - description
                - schema
                - tool_urn
                - created_at
                - updated_at
        BillingEmail:
            type: object
            properties:
                email:
                    type: string
                    description: The configured billing notification email. Omitted when organization administrators receive billing notifications.
                    format: email
        BuiltinExclusionCategory:
            type: object
            properties:
                entries:
                    type: array
                    items:
                        $ref: '#/components/schemas/BuiltinExclusionEntry'
                    description: The rules in this category.
                label:
                    type: string
                    description: Human category label, e.g. "Test credit cards".
            description: A named group of built-in exclusion rules.
            required:
                - label
                - entries
        BuiltinExclusionEntry:
            type: object
            properties:
                description:
                    type: string
                    description: Human rationale for why these values are known-safe.
                id:
                    type: string
                    description: Stable rule id.
                reason:
                    type: string
                    description: Label surfaced when this rule suppresses a finding.
                samples:
                    type: array
                    items:
                        type: string
                    description: Example values — published test/documentation data, never real secrets.
            description: One rule in the built-in exclusion library. Deliberately omits internal detection-engine identifiers (sources, rule ids) so they are not exposed to end users.
            required:
                - id
                - reason
                - description
        BulkUpdateAccountTypeRequestBody:
            type: object
            properties:
                account_type:
                    type: string
                    description: New gram_account_type for every listed organization.
                    enum:
                        - free
                        - pro
                        - payg
                        - enterprise
                ids:
                    type: array
                    items:
                        type: string
                        minLength: 1
                    description: Organization IDs to update.
                    minItems: 1
                    maxItems: 1000
            required:
                - ids
                - account_type
        BusinessMemory:
            type: object
            properties:
                body:
                    type: string
                    description: Normalized knowledge body.
                content_scope:
                    type: array
                    items:
                        type: string
                    description: Canonical entity and topic labels.
                embedding_model:
                    type: string
                    description: Model used to create the semantic-search vector.
                extracted_at:
                    type: string
                    description: Extraction timestamp.
                    format: date-time
                extraction_model:
                    type: string
                    description: Model used to extract the memory.
                id:
                    type: string
                    description: Memory ID.
                    format: uuid
                lifecycle_state:
                    type: string
                    description: Current lifecycle state.
                memory_type:
                    type: string
                    description: Knowledge type.
                    enum:
                        - glossary
                        - procedure
                        - result
                similarity:
                    type: number
                    description: Cosine similarity for semantic-search results.
                    format: double
                source_author_id:
                    type: string
                    description: Author associated with the source session.
                source_chat_id:
                    type: string
                    description: Chat the memory was extracted from, or unavailable if the source chat was deleted.
                source_turn:
                    type: integer
                    description: One-based transcript turn cited by the extractor.
                    format: int64
                structural_scope:
                    type: string
                    description: Materialized structural scope path.
            description: Knowledge extracted from a completed business session.
            required:
                - id
                - body
                - memory_type
                - structural_scope
                - content_scope
                - embedding_model
                - extraction_model
                - source_chat_id
                - extracted_at
                - lifecycle_state
        BusinessMemoryContentScopeNode:
            type: object
            properties:
                memory_count:
                    type: integer
                    description: Number of distinct memories assigned to this scope.
                    format: int64
                parent_scope:
                    type: string
                    description: Parent namespace. Omitted for namespace nodes.
                scope:
                    type: string
                    description: Namespace or exact content-scope tag.
            description: A content-scope namespace or exact tag and its distinct-memory count.
            required:
                - scope
                - memory_count
        CanonicalToolAttributes:
            type: object
            properties:
                confirm:
                    type: string
                    description: Confirmation mode for the tool
                confirm_prompt:
                    type: string
                    description: Prompt for the confirmation
                description:
                    type: string
                    description: Description of the tool
                name:
                    type: string
                    description: The name of the tool
                summarizer:
                    type: string
                    description: Summarizer for the tool
                variation_id:
                    type: string
                    description: The ID of the variation that was applied to the tool
            description: The original details of a tool
            required:
                - variation_id
                - name
                - description
        CaptureEventPayload:
            type: object
            properties:
                distinct_id:
                    type: string
                    description: Distinct ID for the user or entity (defaults to organization ID if not provided)
                event:
                    type: string
                    description: Event name
                    example: button_clicked
                    minLength: 1
                    maxLength: 255
                properties:
                    type: object
                    description: Event properties as key-value pairs
                    example:
                        button_name: submit
                        page: checkout
                        value: 100
                    additionalProperties: true
            description: Payload for capturing a telemetry event
            required:
                - event
        CaptureEventResult:
            type: object
            properties:
                success:
                    type: boolean
                    description: Whether the event was successfully captured
            description: Result of capturing a telemetry event
            required:
                - success
        ChallengeBucket:
            type: object
            properties:
                challenge_count:
                    type: integer
                    description: Number of individual challenges in this bucket.
                    format: int64
                challenge_ids:
                    type: array
                    items:
                        type: string
                    description: IDs of all challenges in this bucket.
                evaluated_grant_count:
                    type: integer
                    description: Total grants evaluated.
                    format: int64
                first_seen:
                    type: string
                    description: Timestamp of the earliest challenge in the bucket.
                    format: date-time
                id:
                    type: string
                    description: ID of the most recent challenge in the bucket.
                last_seen:
                    type: string
                    description: Timestamp of the most recent challenge in the bucket.
                    format: date-time
                matched_grant_count:
                    type: integer
                    description: Number of grants that matched.
                    format: int64
                operation:
                    type: string
                    enum:
                        - require
                        - require_any
                        - filter
                organization_id:
                    type: string
                    description: Organization the principal was acting in.
                outcome:
                    type: string
                    enum:
                        - allow
                        - deny
                        - error
                photo_url:
                    type: string
                    description: User avatar URL when available.
                principal_type:
                    type: string
                    description: Kind of principal.
                    enum:
                        - user
                        - api_key
                        - assistant
                principal_urn:
                    type: string
                    description: Principal URN e.g. user:<uuid> or api_key:<id>.
                project_id:
                    type: string
                    description: Project scope (empty for org-level checks).
                reason:
                    type: string
                    enum:
                        - grant_matched
                        - no_grants
                        - scope_unsatisfied
                        - deny_grant
                        - invalid_check
                        - rbac_skipped_apikey
                        - dev_override
                resolution_role_slug:
                    type: string
                    description: Role slug assigned (when resolution_type=role_assigned).
                resolution_type:
                    type: string
                    description: How the bucket was resolved.
                    enum:
                        - role_assigned
                        - dismissed
                resolved_at:
                    type: string
                    description: When the bucket was resolved by an admin.
                    format: date-time
                resolved_by:
                    type: string
                    description: URN of the admin who resolved.
                resource_id:
                    type: string
                    description: Resource ID of the check.
                resource_kind:
                    type: string
                    description: Resource kind of the check.
                role_slugs:
                    type: array
                    items:
                        type: string
                    description: Roles the principal had loaded.
                scope:
                    type: string
                    description: Scope that was checked.
                user_email:
                    type: string
                    description: Email when available.
            description: A group of consecutive challenges with the same dimensions that occurred within a 10-minute window.
            required:
                - id
                - last_seen
                - first_seen
                - organization_id
                - principal_urn
                - principal_type
                - operation
                - outcome
                - reason
                - scope
                - role_slugs
                - evaluated_grant_count
                - matched_grant_count
                - challenge_count
                - challenge_ids
        ChallengeResolution:
            type: object
            properties:
                challenge_id:
                    type: string
                    description: ClickHouse challenge ID.
                created_at:
                    type: string
                    format: date-time
                id:
                    type: string
                    description: Resolution record ID.
                organization_id:
                    type: string
                    description: Organization ID.
                principal_urn:
                    type: string
                    description: Denied principal.
                resolution_type:
                    type: string
                    enum:
                        - role_assigned
                        - dismissed
                resolved_by:
                    type: string
                    description: Admin who resolved.
                resource_id:
                    type: string
                    description: Resource ID.
                resource_kind:
                    type: string
                    description: Resource kind.
                role_slug:
                    type: string
                    description: Assigned role slug.
                scope:
                    type: string
                    description: Denied scope.
            required:
                - id
                - organization_id
                - challenge_id
                - principal_urn
                - scope
                - resolution_type
                - resolved_by
                - created_at
        Chat:
            type: object
            properties:
                account_email:
                    type: string
                    description: Email of the AI account that produced the chat, resolved from the linked AI account. May differ from the employee's work email (e.g. a personal account).
                account_type:
                    type: string
                    description: Account type that produced the chat ('team', 'personal', or empty), resolved from the linked AI account.
                agent_usage:
                    $ref: '#/components/schemas/AgentUsage'
                assistant_id:
                    type: string
                    description: The ID of the assistant that produced this chat, if any
                assistant_name:
                    type: string
                    description: The name of the assistant that produced this chat, if any
                content_parts:
                    type: array
                    items:
                        $ref: '#/components/schemas/ChatContentPart'
                    description: Non-turn content attached to this chat, such as prompt attachments.
                created_at:
                    type: string
                    description: When the chat was created.
                    format: date-time
                external_user_id:
                    type: string
                    description: The ID of the external user who created the chat
                generation:
                    type: integer
                    description: The generation that this response's messages belong to. A generation is an immutable snapshot of the transcript; a new one is opened on compaction or message edits, while normal turns append to the current one.
                    format: int64
                has_more_after:
                    type: boolean
                    description: Whether newer messages exist after the last message in this page (within the returned generation). Load them with an `after_seq` cursor.
                has_more_before:
                    type: boolean
                    description: Whether older messages exist before the first message in this page (within the returned generation). Load them with a `before_seq` cursor.
                id:
                    type: string
                    description: The ID of the chat
                last_message_timestamp:
                    type: string
                    description: When the last message in the chat was created.
                    format: date-time
                litellm_proxied:
                    type: boolean
                    description: True when the session's traffic was observed by the LiteLLM proxy, including sessions whose transcript is owned by the agent's own hook stream
                match_segments:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskSegment'
                    description: 'Present only when `query` was requested: contiguous runs of returned messages, each spanning one or more query matches and their surrounding context. Use each segment''s cursors to expand it.'
                max_generation:
                    type: integer
                    description: The highest generation number present for this chat. To load the full history, walk from `max_generation` down to 0, requesting each generation in turn.
                    format: int64
                messages:
                    type: array
                    items:
                        $ref: '#/components/schemas/ChatMessage'
                    description: The list of messages in the chat for the returned generation, ordered oldest to newest by `seq`.
                num_messages:
                    type: integer
                    description: The number of messages in the chat
                    format: int64
                originating_client:
                    type: string
                    description: The supported client that originated a chat routed through the source, when known
                pinned:
                    type: boolean
                    description: True when the chat is pinned
                risk_findings_count:
                    type: integer
                    description: Number of risk findings recorded against messages in this chat (project-scoped, found=true). Only populated by endpoints that join risk data; absent elsewhere.
                    format: int64
                risk_segments:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskSegment'
                    description: 'Present only when `risk_only` was requested: contiguous runs of returned messages, each spanning a risk finding and its surrounding context. Use each segment''s cursors to expand it.'
                source:
                    type: string
                    description: 'The source of the chat: Elements, Playground, ClaudeCode (inferred from messages)'
                summary:
                    type: string
                    description: Persisted LLM summary of the session transcript, if one has been generated
                summary_generated_at:
                    type: string
                    description: When the session summary was last generated.
                    format: date-time
                title:
                    type: string
                    description: The title of the chat
                total_cost:
                    type: number
                    description: Total cost in USD for this chat
                    format: double
                total_input_tokens:
                    type: integer
                    description: Total input tokens used in this chat
                    format: int64
                total_output_tokens:
                    type: integer
                    description: Total output tokens used in this chat
                    format: int64
                total_tokens:
                    type: integer
                    description: Total tokens (input + output) used in this chat
                    format: int64
                totals:
                    $ref: '#/components/schemas/ChatTotals'
                updated_at:
                    type: string
                    description: When the chat was last updated.
                    format: date-time
                user_id:
                    type: string
                    description: The ID of the user who created the chat
                work_units:
                    type: number
                    description: Work units of value delivered in this chat as judged by the work-units analysis. Absent unless the organization has work-units analysis enabled and this chat has been scored.
                    format: double
                work_units_report:
                    type: string
                    description: Full work-units analysis verdict as JSON (per-task breakdown, rationales, and flags). Present only when `work_units` is present.
            required:
                - messages
                - content_parts
                - generation
                - max_generation
                - has_more_before
                - has_more_after
                - id
                - title
                - num_messages
                - created_at
                - updated_at
                - last_message_timestamp
        ChatAnalysisSettings:
            type: object
            properties:
                business_memory_daily_cap:
                    type: integer
                    description: Maximum business-memory extraction evaluations reserved across the organization each UTC day. 0 disables extraction.
                    format: int64
                    minimum: 0
                    maximum: 10000
                business_memory_enabled:
                    type: boolean
                    description: Whether completed sessions are mined for business memories.
                is_default:
                    type: boolean
                    description: Whether these values are platform defaults rather than stored organization settings.
                organization_id:
                    type: string
                    description: Organization these settings apply to.
                work_units_daily_cap:
                    type: integer
                    description: Maximum work-units evaluations reserved across the organization each UTC day. 0 disables scoring as surely as the switch.
                    format: int64
                    minimum: 0
                    maximum: 10000
                work_units_enabled:
                    type: boolean
                    description: Whether work-units chat analysis is enabled.
            description: Per-organization switches and budgets for chat session analysis judges.
            required:
                - organization_id
                - work_units_enabled
                - work_units_daily_cap
                - business_memory_enabled
                - business_memory_daily_cap
                - is_default
        ChatContentPart:
            type: object
            properties:
                content:
                    type: string
                    description: The text content.
                created_at:
                    type: string
                    description: When the content part was created.
                    format: date-time
                id:
                    type: string
                    description: The ID of the content part.
                is_risk:
                    type: boolean
                    description: Whether this content part has an active risk finding.
                kind:
                    type: string
                    description: The content kind, such as prompt_attachment.
                metadata:
                    description: Sparse metadata for the content kind.
                parent_chat_message_id:
                    type: string
                    description: The chat message this content hangs off, when resolved.
            required:
                - id
                - kind
                - content
                - is_risk
                - created_at
        ChatMessage:
            type: object
            properties:
                content:
                    description: The content of the message — string for plain text, array for multimodal/tool-call content parts, null for assistant messages that only carry tool_calls
                created_at:
                    type: string
                    description: When the message was created.
                    format: date-time
                external_user_id:
                    type: string
                    description: The ID of the external user who created the message
                finish_reason:
                    type: string
                    description: The finish reason of the message
                generation:
                    type: integer
                    description: Conversation generation — bumps on compaction or edit divergence
                    format: int64
                id:
                    type: string
                    description: The ID of the message
                is_risk:
                    type: boolean
                    description: 'Present only in `risk_only` mode: true when this message has an active risk finding, false for the surrounding-context messages padded around it.'
                model:
                    type: string
                    description: The model that generated the message
                prompt_id:
                    type: string
                    description: The agent prompt/turn ID associated with this message, when available.
                role:
                    type: string
                    description: The role of the message
                seq:
                    type: integer
                    description: Monotonic sequence number of the message. Strictly increasing within a chat; use it as the keyset cursor for `before_seq`/`after_seq` pagination. Not contiguous (the sequence is shared across chats), so do not infer gaps from arithmetic differences.
                    format: int64
                tool_call_id:
                    type: string
                    description: The tool call ID of the message
                tool_calls:
                    type: string
                    description: The tool calls in the message as a JSON blob
                user_id:
                    type: string
                    description: The ID of the user who created the message
            required:
                - id
                - seq
                - role
                - model
                - created_at
                - generation
        ChatOverview:
            type: object
            properties:
                account_email:
                    type: string
                    description: Email of the AI account that produced the chat, resolved from the linked AI account. May differ from the employee's work email (e.g. a personal account).
                account_type:
                    type: string
                    description: Account type that produced the chat ('team', 'personal', or empty), resolved from the linked AI account.
                assistant_id:
                    type: string
                    description: The ID of the assistant that produced this chat, if any
                assistant_name:
                    type: string
                    description: The name of the assistant that produced this chat, if any
                created_at:
                    type: string
                    description: When the chat was created.
                    format: date-time
                external_user_id:
                    type: string
                    description: The ID of the external user who created the chat
                id:
                    type: string
                    description: The ID of the chat
                last_message_timestamp:
                    type: string
                    description: When the last message in the chat was created.
                    format: date-time
                litellm_proxied:
                    type: boolean
                    description: True when the session's traffic was observed by the LiteLLM proxy, including sessions whose transcript is owned by the agent's own hook stream
                num_messages:
                    type: integer
                    description: The number of messages in the chat
                    format: int64
                originating_client:
                    type: string
                    description: The supported client that originated a chat routed through the source, when known
                pinned:
                    type: boolean
                    description: True when the chat is pinned
                risk_findings_count:
                    type: integer
                    description: Number of risk findings recorded against messages in this chat (project-scoped, found=true). Only populated by endpoints that join risk data; absent elsewhere.
                    format: int64
                source:
                    type: string
                    description: 'The source of the chat: Elements, Playground, ClaudeCode (inferred from messages)'
                summary:
                    type: string
                    description: Persisted LLM summary of the session transcript, if one has been generated
                summary_generated_at:
                    type: string
                    description: When the session summary was last generated.
                    format: date-time
                title:
                    type: string
                    description: The title of the chat
                total_cost:
                    type: number
                    description: Total cost in USD for this chat
                    format: double
                total_input_tokens:
                    type: integer
                    description: Total input tokens used in this chat
                    format: int64
                total_output_tokens:
                    type: integer
                    description: Total output tokens used in this chat
                    format: int64
                total_tokens:
                    type: integer
                    description: Total tokens (input + output) used in this chat
                    format: int64
                updated_at:
                    type: string
                    description: When the chat was last updated.
                    format: date-time
                user_id:
                    type: string
                    description: The ID of the user who created the chat
                work_units:
                    type: number
                    description: Work units of value delivered in this chat as judged by the work-units analysis. Absent unless the organization has work-units analysis enabled and this chat has been scored.
                    format: double
            required:
                - id
                - title
                - num_messages
                - created_at
                - updated_at
                - last_message_timestamp
        ChatSummary:
            type: object
            properties:
                duration_seconds:
                    type: number
                    description: Chat session duration in seconds
                    format: double
                end_time_unix_nano:
                    type: string
                    description: Latest log timestamp in Unix nanoseconds (string for JS int64 precision)
                gram_chat_id:
                    type: string
                    description: Chat session ID
                log_count:
                    type: integer
                    description: Total number of logs in this chat session
                    format: int64
                message_count:
                    type: integer
                    description: Number of LLM completion messages in this chat session
                    format: int64
                model:
                    type: string
                    description: LLM model used in this chat session
                start_time_unix_nano:
                    type: string
                    description: Earliest log timestamp in Unix nanoseconds (string for JS int64 precision)
                status:
                    type: string
                    description: Chat session status
                    enum:
                        - success
                        - error
                tool_call_count:
                    type: integer
                    description: Number of tool calls in this chat session
                    format: int64
                total_input_tokens:
                    type: integer
                    description: Total input tokens used
                    format: int64
                total_output_tokens:
                    type: integer
                    description: Total output tokens used
                    format: int64
                total_tokens:
                    type: integer
                    description: Total tokens used (input + output)
                    format: int64
                user_id:
                    type: string
                    description: User ID associated with this chat session
            description: Summary information for a chat session
            required:
                - gram_chat_id
                - start_time_unix_nano
                - end_time_unix_nano
                - log_count
                - tool_call_count
                - message_count
                - duration_seconds
                - status
                - total_input_tokens
                - total_output_tokens
                - total_tokens
        ChatTotals:
            type: object
            properties:
                assistant_messages:
                    type: integer
                    description: Number of assistant messages (without tool calls) in the generation.
                    format: int64
                risk_only:
                    type: integer
                    description: Number of messages with an active (found, non-suppressed) risk finding in the generation.
                    format: int64
                tool_calls:
                    type: integer
                    description: Number of messages carrying tool calls in the generation.
                    format: int64
                tool_results:
                    type: integer
                    description: Number of tool-result messages in the generation.
                    format: int64
                total:
                    type: integer
                    description: Total trace entries in the generation (sum of the four entry-type counts; the `of N entries` denominator).
                    format: int64
                user_messages:
                    type: integer
                    description: Number of user messages in the generation.
                    format: int64
            description: 'Trace-entry counts across the entire returned generation, independent of pagination. Each message maps to exactly one entry: a message carrying tool calls counts as a tool call regardless of role, otherwise the role decides.'
            required:
                - total
                - user_messages
                - assistant_messages
                - tool_calls
                - tool_results
                - risk_only
        CimdClientPreset:
            type: object
            properties:
                client_id_metadata_uri:
                    type: string
                    description: The https URL this client presents as its client_id. Usually exact; when is_pattern is true this is a wildcard pattern rather than a literal URL.
                display_name:
                    type: string
                    description: Human-readable client name.
                enabled:
                    type: boolean
                    description: Whether presets-mode issuers currently admit this entry. Disabled entries are listed so operators can see that Gram knows about the vendor.
                is_pattern:
                    type: boolean
                    description: True when client_id_metadata_uri contains a `*` wildcard, matching a whole namespace of client_ids rather than one URL. Used for vendors that mint a separate metadata document per connector or install, so their client_ids cannot be enumerated. A `*` stands for exactly one path segment and never widens the host.
                vendor_key:
                    type: string
                    description: Stable identifier for the publishing vendor. Not unique — a vendor may publish several client documents.
            description: An entry in Gram's curated CIMD preset catalog.
            required:
                - vendor_key
                - display_name
                - client_id_metadata_uri
                - is_pattern
                - enabled
        ClaudeAgentUsage:
            type: object
            properties:
                tools:
                    type: array
                    items:
                        $ref: '#/components/schemas/ClaudeToolUsage'
                    description: Per-tool Claude usage keyed by tool_use_id.
                turns:
                    type: array
                    items:
                        $ref: '#/components/schemas/ClaudeTurnUsage'
                    description: Per-prompt Claude usage turns ordered by start time.
            required:
                - turns
                - tools
        ClaudeHookPayload:
            type: object
            properties:
                additional_data:
                    type: object
                    description: Additional hook-specific data
                    additionalProperties: true
                cwd:
                    type: string
                    description: The working directory when the event fired
                error:
                    description: The error from the tool (PostToolUseFailure only)
                hook_event_name:
                    type: string
                    description: The type of hook event
                    enum:
                        - SessionStart
                        - ConfigChange
                        - PreToolUse
                        - PostToolUse
                        - PostToolUseFailure
                        - UserPromptSubmit
                        - Stop
                        - SessionEnd
                        - Notification
                is_interrupt:
                    type: boolean
                    description: Whether the failure was caused by user interruption (PostToolUseFailure only)
                last_assistant_message:
                    type: string
                    description: Claude's final response text (Stop only)
                message:
                    type: string
                    description: Notification message text (Notification only)
                model:
                    type: string
                    description: The model identifier (SessionStart, Stop)
                notification_type:
                    type: string
                    description: 'Type of notification: permission_prompt, idle_prompt, auth_success, elicitation_dialog (Notification only)'
                prompt:
                    type: string
                    description: The user's prompt text (UserPromptSubmit only)
                reason:
                    type: string
                    description: Why the session ended (SessionEnd only)
                session_id:
                    type: string
                    description: The Claude Code session ID
                source:
                    type: string
                    description: 'How the session started: startup, resume, clear, compact (SessionStart only)'
                stop_hook_active:
                    type: boolean
                    description: Whether a stop hook continuation is active (Stop only)
                title:
                    type: string
                    description: Notification title (Notification only)
                tool_input:
                    description: The input to the tool
                tool_name:
                    type: string
                    description: The name of the tool (for tool-related events)
                tool_response:
                    description: The response from the tool (PostToolUse only)
                tool_use_id:
                    type: string
                    description: The unique ID for this tool use
                transcript_path:
                    type: string
                    description: Path to the conversation transcript file
                user_email:
                    type: string
                    description: Email of the authenticated user from the Speakeasy device agent, if available
            description: Unified payload for all Claude Code hook events
            required:
                - hook_event_name
        ClaudeHookResult:
            type: object
            properties:
                continue:
                    type: boolean
                    description: Whether to continue (SessionStart only)
                decision:
                    type: string
                    description: Top-level block decision for UserPromptSubmit / PostToolUse / Stop / SubagentStop. Use 'block' to halt processing.
                hookSpecificOutput:
                    description: Hook-specific output as JSON object
                reason:
                    type: string
                    description: Reason accompanying decision; shown to the user (UserPromptSubmit) or Claude (PostToolUse/Stop).
                stopReason:
                    type: string
                    description: Reason if blocked (SessionStart only)
                suppressOutput:
                    type: boolean
                    description: Whether to suppress the hook's output
                systemMessage:
                    type: string
                    description: Warning message shown to the user in the terminal
            description: Unified result for all Claude Code hook events with proper response structure
        ClaudeToolUsage:
            type: object
            properties:
                input_size_bytes:
                    type: integer
                    description: Serialized tool input size in bytes.
                    format: int64
                prompt_id:
                    type: string
                    description: Claude prompt.id for the turn that used this tool.
                result_size_bytes:
                    type: integer
                    description: Serialized tool result size in bytes.
                    format: int64
                tool_name:
                    type: string
                    description: Tool name reported by Claude Code.
                tool_use_id:
                    type: string
                    description: Claude tool_use_id that correlates the tool call and result.
            required:
                - tool_use_id
                - prompt_id
                - tool_name
                - input_size_bytes
                - result_size_bytes
        ClaudeTurnUsage:
            type: object
            properties:
                cache_creation_tokens:
                    type: integer
                    description: Cache creation tokens used by this turn.
                    format: int64
                cache_read_tokens:
                    type: integer
                    description: Cache read tokens used by this turn.
                    format: int64
                cost_micros:
                    type: integer
                    description: Total cost for this turn in micros of a USD.
                    format: int64
                cost_usd:
                    type: number
                    description: Total USD cost for this turn.
                    format: double
                end_time_unix_nano:
                    type: string
                    description: Latest OTEL log timestamp in this turn, as Unix nanoseconds.
                input_tokens:
                    type: integer
                    description: Input tokens used by this turn.
                    format: int64
                models:
                    type: array
                    items:
                        type: string
                    description: Distinct model names used by this turn.
                output_tokens:
                    type: integer
                    description: Output tokens used by this turn.
                    format: int64
                prompt_id:
                    type: string
                    description: Claude prompt.id that correlates events for one user turn.
                query_sources:
                    type: array
                    items:
                        type: string
                    description: Distinct Claude query sources used by this turn.
                request_count:
                    type: integer
                    description: Number of Claude API request events in this turn.
                    format: int64
                start_time_unix_nano:
                    type: string
                    description: Earliest OTEL log timestamp in this turn, as Unix nanoseconds.
                total_tokens:
                    type: integer
                    description: Total tokens used by this turn.
                    format: int64
            required:
                - prompt_id
                - start_time_unix_nano
                - end_time_unix_nano
                - request_count
                - input_tokens
                - output_tokens
                - cache_read_tokens
                - cache_creation_tokens
                - total_tokens
                - cost_usd
                - cost_micros
                - models
                - query_sources
        CloneEnvironmentForm:
            type: object
            properties:
                copy_values:
                    type: boolean
                    description: If true, copy the encrypted secret values from the source. If false (default), copy only variable names with empty placeholder values.
                new_name:
                    type: string
                    description: The name for the new cloned environment
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            description: Form for cloning an existing environment into a new one
            required:
                - slug
                - new_name
        CloneEnvironmentRequestBody:
            type: object
            properties:
                copy_values:
                    type: boolean
                    description: If true, copy the encrypted secret values from the source. If false (default), copy only variable names with empty placeholder values.
                new_name:
                    type: string
                    description: The name for the new cloned environment
            required:
                - new_name
        CodexHookPayload:
            type: object
            properties:
                additional_data:
                    type: object
                    description: Additional hook-specific data
                    additionalProperties: true
                cwd:
                    type: string
                    description: The working directory when the event fired
                hook_event_name:
                    type: string
                    description: The type of hook event
                    enum:
                        - SessionStart
                        - PreToolUse
                        - PermissionRequest
                        - PostToolUse
                        - UserPromptSubmit
                        - Stop
                last_assistant_message:
                    type: string
                    description: The final assistant message text for the turn (Stop only)
                model:
                    type: string
                    description: The model identifier
                permission_type:
                    type: string
                    description: The type of permission being requested (PermissionRequest only)
                prompt:
                    type: string
                    description: The user's prompt text (UserPromptSubmit only)
                session_id:
                    type: string
                    description: The Codex session ID
                tool_input:
                    description: The input to the tool (PreToolUse only)
                tool_name:
                    type: string
                    description: The name of the tool
                tool_output:
                    description: The output from the tool (PostToolUse only)
                transcript_path:
                    type: string
                    description: Path to the conversation transcript file
                user_email:
                    type: string
                    description: Email of the authenticated Codex user, if available
            description: Payload for Codex hook events
            required:
                - hook_event_name
        CodexHookResult:
            type: object
            properties:
                decision:
                    type: string
                    description: 'Permission decision for blocking events: allow or deny'
                reason:
                    type: string
                    description: Reason for the decision, shown to the user
            description: Result for Codex hook events
        CreateAssistantForm:
            type: object
            properties:
                instructions:
                    type: string
                    description: The system instructions for the assistant.
                max_concurrency:
                    type: integer
                    description: Optional maximum active warm runtimes.
                    format: int64
                mcp_servers:
                    type: array
                    items:
                        $ref: '#/components/schemas/AssistantMCPServerRef'
                    description: MCP servers attached directly to the assistant (remote- or tunnelled-backed).
                model:
                    type: string
                    description: The model identifier used by the assistant.
                name:
                    type: string
                    description: The assistant name.
                status:
                    type: string
                    description: Optional initial status.
                    enum:
                        - active
                        - paused
                toolsets:
                    type: array
                    items:
                        $ref: '#/components/schemas/AssistantToolsetRef'
                    description: Toolsets available to the assistant.
                warm_ttl_seconds:
                    type: integer
                    description: Optional warm runtime TTL in seconds.
                    format: int64
            required:
                - name
                - model
                - instructions
                - toolsets
        CreateAwsIamCredentialForm:
            type: object
            properties:
                assume_role_arn:
                    type: string
                    description: The customer IAM role ARN Gram assumes. Omit for a KMS key-policy grant.
                name:
                    type: string
                    description: A human-readable name for the credential.
                oidc_audience:
                    type: string
                    description: The OIDC audience. Provide (with assume_role_arn) to assume the role with a web identity.
                oidc_subject:
                    type: string
                    description: Optional OIDC subject pin; only valid alongside oidc_audience.
                sts_region:
                    type: string
                    description: Optional STS region override.
            required:
                - name
        CreateAwsKmsKeyForm:
            type: object
            properties:
                algorithm:
                    type: string
                    description: The signing algorithm of the key.
                    enum:
                        - RS256
                        - ES256
                customer_grant_reference:
                    type: string
                    description: Optional. The Gram identity (GCP service-account email or AWS principal ARN) the customer granted on the key for the key-policy / IAM-grant model. Not a secret.
                external_credential_id:
                    type: string
                    description: The external credential Gram uses to authenticate to the key. Must belong to the same organization and matching cloud family (an aws_kms key requires an aws_iam credential; a gcp_kms key requires a gcp_iam credential).
                    format: uuid
                key_arn:
                    type: string
                    description: The ARN of the AWS KMS key.
                name:
                    type: string
                    description: A human-readable name for the key.
            required:
                - key_arn
                - external_credential_id
                - algorithm
                - name
        CreateCimdForm:
            type: object
            properties:
                audience:
                    type: string
                    description: Optional upstream OAuth audience to send on the authorize redirect and token exchange.
                    pattern: ^[!-~]+$
                    maxLength: 512
                remote_session_issuer_id:
                    type: string
                    description: The owning remote_session_issuer id. Must advertise client_id_metadata_document_supported.
                    format: uuid
                scope:
                    type: array
                    items:
                        type: string
                        pattern: ^[!#-[\]-~]+$
                        maxLength: 128
                    description: Explicit upstream OAuth scopes the dance should request for this client. Omit to fall back to the issuer's scopes_supported.
                user_session_issuer_ids:
                    type: array
                    items:
                        type: string
                        format: uuid
                    description: The user_session_issuers to attach this client to via the join table. Omit or pass an empty array to create a standalone client with no attachments.
            description: Form for creating a remote_session_client in Client ID Metadata Document (CIMD) mode. Gram generates the client_id (the URL of a hosted client metadata document) and serves the document publicly; the row carries no secret and authenticates with token_endpoint_auth_method=none. The caller supplies no client_id or credentials.
            required:
                - remote_session_issuer_id
        CreateCimdOrganizationRemoteSessionClientForm:
            type: object
            properties:
                audience:
                    type: string
                    description: Optional upstream OAuth audience to send on the authorize redirect and token exchange.
                    pattern: ^[!-~]+$
                    maxLength: 512
                project_id:
                    type: string
                    description: Owning project id for the new client; the project must belong to the caller's organization. Omit to inherit a project-specific issuer's project, or to create an organization-level client (no project, attachable by every project) under an organization-level issuer.
                    format: uuid
                remote_session_issuer_id:
                    type: string
                    description: The owning remote_session_issuer id; must belong to the caller's organization and advertise client_id_metadata_document_supported.
                    format: uuid
                scope:
                    type: array
                    items:
                        type: string
                        pattern: ^[!#-[\]-~]+$
                        maxLength: 128
                    description: Explicit upstream OAuth scopes the dance should request for this client. Omit to fall back to the issuer's scopes_supported.
            description: Form for an org admin to register a standalone remote_session_client in Client ID Metadata Document (CIMD) mode under an existing issuer, with no user_session_issuer attachments. Gram generates the client_id and hosts the metadata document; the issuer must advertise client_id_metadata_document_supported.
            required:
                - remote_session_issuer_id
        CreateCustomDetectionRuleRequestBody:
            type: object
            properties:
                description:
                    type: string
                    description: Description of what the rule detects.
                detection_expr:
                    type: string
                    description: 'CEL detection predicate: a boolean expression over message fields whose true verdict produces a finding.'
                regex:
                    type: string
                    description: Deprecated legacy RE2 regex pattern; superseded by detection_expr. Accepted for backward compatibility.
                rule_id:
                    type: string
                    description: Stable rule identifier, prefixed with `custom.`.
                severity:
                    type: string
                    description: Severity level for findings produced by this rule.
                    default: medium
                    enum:
                        - info
                        - low
                        - medium
                        - high
                        - critical
                title:
                    type: string
                    description: Human-readable title for the rule.
            required:
                - rule_id
                - title
        CreateDeploymentForm:
            type: object
            properties:
                external_id:
                    type: string
                    description: The external ID to refer to the deployment. This can be a git commit hash for example.
                    example: bc5f4a555e933e6861d12edba4c2d87ef6caf8e6
                external_mcps:
                    type: array
                    items:
                        $ref: '#/components/schemas/AddExternalMCPForm'
                external_url:
                    type: string
                    description: The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request.
                functions:
                    type: array
                    items:
                        $ref: '#/components/schemas/AddFunctionsForm'
                github_pr:
                    type: string
                    description: The github pull request that resulted in the deployment.
                    example: "1234"
                github_repo:
                    type: string
                    description: The github repository in the form of "owner/repo".
                    example: speakeasyapi/gram
                github_sha:
                    type: string
                    description: The commit hash that triggered the deployment.
                    example: f33e693e9e12552043bc0ec5c37f1b8a9e076161
                idempotency_key:
                    type: string
                    description: A unique identifier that will mitigate against duplicate deployments.
                    example: 01jqq0ajmb4qh9eppz48dejr2m
                non_blocking:
                    type: boolean
                    description: If true, the deployment will be created in non-blocking mode where the request will return immediately and the deployment will proceed asynchronously.
                    example: false
                openapiv3_assets:
                    type: array
                    items:
                        $ref: '#/components/schemas/AddOpenAPIv3DeploymentAssetForm'
                packages:
                    type: array
                    items:
                        $ref: '#/components/schemas/AddDeploymentPackageForm'
            required:
                - idempotency_key
        CreateDeploymentRequestBody:
            type: object
            properties:
                external_id:
                    type: string
                    description: The external ID to refer to the deployment. This can be a git commit hash for example.
                    example: bc5f4a555e933e6861d12edba4c2d87ef6caf8e6
                external_mcps:
                    type: array
                    items:
                        $ref: '#/components/schemas/AddExternalMCPForm'
                external_url:
                    type: string
                    description: The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request.
                functions:
                    type: array
                    items:
                        $ref: '#/components/schemas/AddFunctionsForm'
                github_pr:
                    type: string
                    description: The github pull request that resulted in the deployment.
                    example: "1234"
                github_repo:
                    type: string
                    description: The github repository in the form of "owner/repo".
                    example: speakeasyapi/gram
                github_sha:
                    type: string
                    description: The commit hash that triggered the deployment.
                    example: f33e693e9e12552043bc0ec5c37f1b8a9e076161
                non_blocking:
                    type: boolean
                    description: If true, the deployment will be created in non-blocking mode where the request will return immediately and the deployment will proceed asynchronously.
                    example: false
                openapiv3_assets:
                    type: array
                    items:
                        $ref: '#/components/schemas/AddOpenAPIv3DeploymentAssetForm'
                packages:
                    type: array
                    items:
                        $ref: '#/components/schemas/AddDeploymentPackageForm'
        CreateDeploymentResult:
            type: object
            properties:
                deployment:
                    $ref: '#/components/schemas/Deployment'
        CreateDomainRequestBody:
            type: object
            properties:
                domain:
                    type: string
                    description: The custom domain
                ip_allowlist:
                    type: array
                    items:
                        type: string
                    description: IP addresses or CIDR ranges to allow. Leave empty for unrestricted access.
            required:
                - domain
        CreateEnvironmentForm:
            type: object
            properties:
                description:
                    type: string
                    description: Optional description of the environment
                entries:
                    type: array
                    items:
                        $ref: '#/components/schemas/EnvironmentEntryInput'
                    description: List of environment variable entries
                name:
                    type: string
                    description: The name of the environment
                organization_id:
                    type: string
                    description: The organization ID this environment belongs to
            description: Form for creating a new environment
            required:
                - organization_id
                - name
                - entries
        CreateExternalKeyFields:
            type: object
            properties:
                algorithm:
                    type: string
                    description: The signing algorithm of the key.
                    enum:
                        - RS256
                        - ES256
                customer_grant_reference:
                    type: string
                    description: Optional. The Gram identity (GCP service-account email or AWS principal ARN) the customer granted on the key for the key-policy / IAM-grant model. Not a secret.
                external_credential_id:
                    type: string
                    description: The external credential Gram uses to authenticate to the key. Must belong to the same organization and matching cloud family (an aws_kms key requires an aws_iam credential; a gcp_kms key requires a gcp_iam credential).
                    format: uuid
                name:
                    type: string
                    description: A human-readable name for the key.
            required:
                - external_credential_id
                - algorithm
                - name
        CreateGcpIamCredentialForm:
            type: object
            properties:
                impersonate_service_account:
                    type: string
                    description: The service account in your project that Gram impersonates. Grant Gram's own service account roles/iam.serviceAccountTokenCreator on it — see externalCredentials.getGcpSetupInfo.
                name:
                    type: string
                    description: A human-readable name for the credential.
            required:
                - name
                - impersonate_service_account
        CreateGcpKmsKeyForm:
            type: object
            properties:
                algorithm:
                    type: string
                    description: The signing algorithm of the key.
                    enum:
                        - RS256
                        - ES256
                customer_grant_reference:
                    type: string
                    description: Optional. The Gram identity (GCP service-account email or AWS principal ARN) the customer granted on the key for the key-policy / IAM-grant model. Not a secret.
                external_credential_id:
                    type: string
                    description: The external credential Gram uses to authenticate to the key. Must belong to the same organization and matching cloud family (an aws_kms key requires an aws_iam credential; a gcp_kms key requires a gcp_iam credential).
                    format: uuid
                name:
                    type: string
                    description: A human-readable name for the key.
                resource_name:
                    type: string
                    description: The resource name of the GCP KMS key (projects/.../cryptoKeyVersions/...).
            required:
                - resource_name
                - external_credential_id
                - algorithm
                - name
        CreateGlobalRemoteSessionClientForm:
            type: object
            properties:
                audience:
                    type: string
                    description: Optional upstream OAuth audience to send on the authorize redirect and token exchange.
                    pattern: ^[!-~]+$
                    maxLength: 512
                client_id:
                    type: string
                    description: client_id supplied by the caller.
                client_secret:
                    type: string
                    description: client_secret supplied by the caller. Gram encrypts before persisting.
                remote_session_issuer_id:
                    type: string
                    description: The owning global remote_session_issuer id.
                    format: uuid
                scope:
                    type: array
                    items:
                        type: string
                        pattern: ^[!#-[\]-~]+$
                        maxLength: 128
                    description: Explicit upstream OAuth scopes the dance should request for this client. Omit to fall back to the issuer's scopes_supported.
                token_endpoint_auth_method:
                    type: string
                    description: How the client authenticates at the issuer's token endpoint. Omit to default to client_secret_basic.
                    enum:
                        - client_secret_basic
                        - client_secret_post
                        - none
            description: Form for creating a global remote_session_client. Caller supplies client_id (and optional client_secret) obtained out-of-band from the upstream issuer.
            required:
                - remote_session_issuer_id
                - client_id
        CreateInstanceRequestBody:
            type: object
            properties:
                failure_posture:
                    type: string
                    enum:
                        - fail_closed
                        - fail_open
                name:
                    type: string
                    maxLength: 255
            required:
                - name
        CreateIssuerRequestBody:
            type: object
            properties:
                authorization_endpoint:
                    type: string
                    description: Upstream authorization endpoint.
                client_id_metadata_document_supported:
                    type: boolean
                    description: When true, the issuer accepts a Client ID Metadata Document URL as client_id (OAuth CIMD draft). Discovered from the issuer metadata document and used to pre-flight outbound CIMD. Default false.
                client_setup_documentation_url:
                    type: string
                    description: URL of OAuth client setup documentation shown when creating clients. Manually set, not RFC 8414; rejected unless an absolute http(s) URL.
                grant_types_supported:
                    type: array
                    items:
                        type: string
                    description: Grant types advertised by the issuer.
                issuer:
                    type: string
                    description: Issuer URL; matches the iss claim.
                jwks_uri:
                    type: string
                    description: Upstream JWKS URI.
                logo_asset_id:
                    type: string
                    description: Optional logo asset id.
                    format: uuid
                name:
                    type: string
                    description: Optional display name. Stored NULL when empty; clients fall back to the issuer URL/slug.
                oidc:
                    type: boolean
                    description: When true, may unlock OIDC-aware behaviour. Default false.
                op_policy_uri:
                    type: string
                    description: RFC 8414 op_policy_uri; the issuer's client data-usage policy. Discovered from the issuer metadata document; rejected unless an absolute http(s) URL.
                op_tos_uri:
                    type: string
                    description: RFC 8414 op_tos_uri; the issuer's terms of service. Discovered from the issuer metadata document; rejected unless an absolute http(s) URL.
                passthrough:
                    type: boolean
                    description: When true, the MCP client registers and transacts directly with this issuer. Default false.
                project_id:
                    type: string
                    description: Owning project id; the project must belong to the caller's organization. Omit to create an organization-level issuer.
                    format: uuid
                registration_endpoint:
                    type: string
                    description: Upstream RFC 7591 registration endpoint; absent for issuers without DCR.
                response_types_supported:
                    type: array
                    items:
                        type: string
                    description: Response types advertised by the issuer.
                revocation_endpoint:
                    type: string
                    description: Upstream RFC 7009 revocation endpoint; absent for issuers that advertise none.
                scopes_supported:
                    type: array
                    items:
                        type: string
                    description: Scopes advertised by the issuer.
                service_documentation:
                    type: string
                    description: RFC 8414 service_documentation; developer documentation for the issuer. Discovered from the issuer metadata document; rejected unless an absolute http(s) URL.
                slug:
                    type: string
                    description: Project-unique slug.
                token_endpoint:
                    type: string
                    description: Upstream token endpoint.
                token_endpoint_auth_methods_supported:
                    type: array
                    items:
                        type: string
                    description: Token endpoint auth methods advertised by the issuer.
            required:
                - slug
                - issuer
        CreateKeyForm:
            type: object
            properties:
                name:
                    type: string
                    description: The name of the key
                scopes:
                    type: array
                    items:
                        type: string
                    description: The scopes of the key that determines its permissions.
                    minItems: 1
            required:
                - name
                - scopes
        CreateMcpEndpointForm:
            type: object
            properties:
                custom_domain_id:
                    type: string
                    description: The ID of the custom domain to register the endpoint slug under. Omit for a platform-domain endpoint.
                    format: uuid
                mcp_server_id:
                    type: string
                    description: The ID of the MCP server this endpoint addresses
                    format: uuid
                slug:
                    type: string
                    description: A url-friendly label (up to 128 characters) that addresses an MCP server through a slug-based URL. Platform-domain slugs (no custom domain) must be prefixed with the organization slug.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 128
            description: Form for creating a new MCP endpoint. Platform-domain endpoint slugs (no custom_domain_id) must be prefixed with the organization slug.
            required:
                - mcp_server_id
                - slug
        CreateMcpServerForm:
            type: object
            properties:
                environment_id:
                    type: string
                    description: The ID of the environment to associate with the server
                    format: uuid
                name:
                    type: string
                    description: A human-readable display name for the server
                remote_mcp_server_id:
                    type: string
                    description: The ID of the remote MCP server to use as the backend
                    format: uuid
                tool_variations_group_id:
                    type: string
                    description: The ID of the tool variations group enabling MCP tool filtering for this server. Omit to leave filtering disabled.
                    format: uuid
                toolset_id:
                    type: string
                    description: The ID of the toolset to use as the backend
                    format: uuid
                tunneled_mcp_server_id:
                    type: string
                    description: The ID of the tunneled MCP server to use as the backend
                    format: uuid
                unproxied_mcp_server_id:
                    type: string
                    description: The ID of the unproxied MCP server to use as the backend
                    format: uuid
                visibility:
                    type: string
                    description: The visibility of an MCP server
                    enum:
                        - disabled
                        - private
                        - public
            description: Form for creating a new MCP server. Exactly one of remote_mcp_server_id, tunneled_mcp_server_id, toolset_id, or unproxied_mcp_server_id must be provided.
            required:
                - name
                - visibility
        CreateOrganizationRemoteSessionClientForm:
            type: object
            properties:
                audience:
                    type: string
                    description: Optional upstream OAuth audience to send on the authorize redirect and token exchange.
                    pattern: ^[!-~]+$
                    maxLength: 512
                client_id:
                    type: string
                    description: client_id supplied by the caller, e.g. from Dynamic Client Registration.
                client_secret:
                    type: string
                    description: Optional client_secret supplied by the caller. Gram encrypts before persisting; the plaintext is never returned.
                project_id:
                    type: string
                    description: Owning project id for the new client; the project must belong to the caller's organization. Omit to inherit a project-specific issuer's project, or to create an organization-level client (no project, attachable by every project) under an organization-level issuer.
                    format: uuid
                remote_session_issuer_id:
                    type: string
                    description: The owning remote_session_issuer id; must belong to the caller's organization.
                    format: uuid
                scope:
                    type: array
                    items:
                        type: string
                        pattern: ^[!#-[\]-~]+$
                        maxLength: 128
                    description: Explicit upstream OAuth scopes the dance should request for this client. Omit to fall back to the issuer's scopes_supported.
                token_endpoint_auth_method:
                    type: string
                    description: How the client authenticates at the issuer's token endpoint. Omit to default to client_secret_basic.
                    enum:
                        - client_secret_basic
                        - client_secret_post
                        - none
            description: Form for an org admin to register a standalone remote_session_client under an existing issuer, with no user_session_issuer attachments.
            required:
                - remote_session_issuer_id
                - client_id
        CreateOrganizationRequestBody:
            type: object
            properties:
                name:
                    type: string
                    description: Display name for the new organization.
                    minLength: 1
            required:
                - name
        CreatePackageForm:
            type: object
            properties:
                description:
                    type: string
                    description: The description of the package. Limited markdown syntax is supported.
                    maxLength: 10000
                image_asset_id:
                    type: string
                    description: The asset ID of the image to show for this package
                    maxLength: 50
                keywords:
                    type: array
                    items:
                        type: string
                    description: The keywords of the package
                    maxItems: 5
                name:
                    type: string
                    description: The name of the package
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 100
                summary:
                    type: string
                    description: The summary of the package
                    maxLength: 80
                title:
                    type: string
                    description: The title of the package
                    maxLength: 100
                url:
                    type: string
                    description: External URL for the package owner
                    maxLength: 100
            required:
                - name
                - title
                - summary
        CreatePackageResult:
            type: object
            properties:
                package:
                    $ref: '#/components/schemas/Package'
            required:
                - package
        CreatePlatformGcpIamCredentialForm:
            type: object
            properties:
                impersonate_service_account:
                    type: string
                    description: The service account Gram impersonates. Set alone for direct impersonation, or as the hop alongside the wif_* fields.
                name:
                    type: string
                    description: A human-readable name for the credential.
                wif_pool_id:
                    type: string
                    description: Workload Identity Federation pool ID. Set together with the other wif_* fields.
                wif_project_number:
                    type: string
                    description: GCP project number backing the WIF pool. Set together with the other wif_* fields.
                wif_provider_id:
                    type: string
                    description: Workload Identity Federation provider ID. Set together with the other wif_* fields.
            required:
                - name
        CreatePluginForm:
            type: object
            properties:
                description:
                    type: string
                    description: Optional description.
                name:
                    type: string
                    description: Display name for the plugin.
                slug:
                    type: string
                    description: Optional URL-safe identifier. Auto-generated from name if omitted.
            required:
                - name
        CreatePortalSessionResult:
            type: object
            properties:
                token:
                    type: string
                    description: Front-end token for the webhook portal session.
                url:
                    type: string
                    description: URL for the webhook portal session.
            required:
                - url
                - token
        CreateProjectForm:
            type: object
            properties:
                apikey_token:
                    type: string
                name:
                    type: string
                    description: The name of the project
                    maxLength: 40
                organization_id:
                    type: string
                    description: The ID of the organization to create the project in
                session_token:
                    type: string
            required:
                - organization_id
                - name
        CreateProjectRequestBody:
            type: object
            properties:
                name:
                    type: string
                    description: The name of the project
                    maxLength: 40
                organization_id:
                    type: string
                    description: The ID of the organization to create the project in
            required:
                - organization_id
                - name
        CreateProjectResult:
            type: object
            properties:
                project:
                    $ref: '#/components/schemas/Project'
            required:
                - project
        CreatePromptTemplateForm:
            type: object
            properties:
                arguments:
                    type: string
                    description: The JSON Schema defining the placeholders found in the prompt template
                    format: json
                description:
                    type: string
                    description: The description of the prompt template
                engine:
                    type: string
                    description: The template engine
                    enum:
                        - mustache
                kind:
                    type: string
                    description: The kind of prompt the template is used for
                    enum:
                        - prompt
                        - higher_order_tool
                name:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                prompt:
                    type: string
                    description: The template content
                tool_urns_hint:
                    type: array
                    items:
                        type: string
                    description: The suggested tool URNS associated with the prompt template
                    maxItems: 20
                tools_hint:
                    type: array
                    items:
                        type: string
                    description: The suggested tool names associated with the prompt template
                    maxItems: 20
            required:
                - name
                - prompt
                - engine
                - kind
        CreatePromptTemplateResult:
            type: object
            properties:
                template:
                    $ref: '#/components/schemas/PromptTemplate'
            required:
                - template
        CreateRemoteSessionClientForm:
            type: object
            properties:
                audience:
                    type: string
                    description: Optional upstream OAuth audience to send on the authorize redirect and token exchange.
                    pattern: ^[!-~]+$
                    maxLength: 512
                client_id:
                    type: string
                    description: client_id supplied by the caller.
                client_secret:
                    type: string
                    description: client_secret supplied by the caller. Gram encrypts before persisting.
                remote_session_issuer_id:
                    type: string
                    description: The owning remote_session_issuer id.
                    format: uuid
                scope:
                    type: array
                    items:
                        type: string
                        pattern: ^[!#-[\]-~]+$
                        maxLength: 128
                    description: Explicit upstream OAuth scopes the dance should request for this client. Omit to fall back to the issuer's scopes_supported.
                token_endpoint_auth_method:
                    type: string
                    description: How the client authenticates at the issuer's token endpoint. Omit to default to client_secret_basic.
                    enum:
                        - client_secret_basic
                        - client_secret_post
                        - none
                user_session_issuer_ids:
                    type: array
                    items:
                        type: string
                        format: uuid
                    description: The user_session_issuers to attach this client to via the join table. Omit or pass an empty array to create a standalone client with no attachments.
            description: Form for creating a remote_session_client. Caller supplies client_id (and optional client_secret) obtained out-of-band from the upstream issuer.
            required:
                - remote_session_issuer_id
                - client_id
        CreateRemoteSessionIssuerForm:
            type: object
            properties:
                authorization_endpoint:
                    type: string
                    description: Upstream authorization endpoint.
                client_id_metadata_document_supported:
                    type: boolean
                    description: When true, the issuer accepts a Client ID Metadata Document URL as client_id (OAuth CIMD draft). Discovered from the issuer metadata document and used to pre-flight outbound CIMD. Default false.
                client_setup_documentation_url:
                    type: string
                    description: URL of OAuth client setup documentation shown when creating clients. Manually set, not RFC 8414; rejected unless an absolute http(s) URL.
                grant_types_supported:
                    type: array
                    items:
                        type: string
                    description: Grant types advertised by the issuer.
                issuer:
                    type: string
                    description: Issuer URL; matches the iss claim.
                jwks_uri:
                    type: string
                    description: Upstream JWKS URI.
                logo_asset_id:
                    type: string
                    description: Optional logo asset id.
                    format: uuid
                name:
                    type: string
                    description: Optional display name. Stored NULL when empty; clients fall back to the issuer URL/slug.
                oidc:
                    type: boolean
                    description: When true, may unlock OIDC-aware behaviour. Default false.
                op_policy_uri:
                    type: string
                    description: RFC 8414 op_policy_uri; the issuer's client data-usage policy. Discovered from the issuer metadata document; rejected unless an absolute http(s) URL.
                op_tos_uri:
                    type: string
                    description: RFC 8414 op_tos_uri; the issuer's terms of service. Discovered from the issuer metadata document; rejected unless an absolute http(s) URL.
                passthrough:
                    type: boolean
                    description: When true, the MCP client registers and transacts directly with this issuer. Default false.
                registration_endpoint:
                    type: string
                    description: Upstream RFC 7591 registration endpoint; absent for issuers without DCR.
                response_types_supported:
                    type: array
                    items:
                        type: string
                    description: Response types advertised by the issuer.
                revocation_endpoint:
                    type: string
                    description: Upstream RFC 7009 revocation endpoint; absent for issuers that advertise none.
                scopes_supported:
                    type: array
                    items:
                        type: string
                    description: Scopes advertised by the issuer.
                service_documentation:
                    type: string
                    description: RFC 8414 service_documentation; developer documentation for the issuer. Discovered from the issuer metadata document; rejected unless an absolute http(s) URL.
                slug:
                    type: string
                    description: Project-unique slug.
                token_endpoint:
                    type: string
                    description: Upstream token endpoint.
                token_endpoint_auth_methods_supported:
                    type: array
                    items:
                        type: string
                    description: Token endpoint auth methods advertised by the issuer.
            description: Form for creating a remote_session_issuer.
            required:
                - slug
                - issuer
        CreateRequestBody:
            type: object
            properties:
                embed_origin:
                    type: string
                    description: The origin from which the token will be used
                expires_after:
                    type: integer
                    description: Token expiration in seconds (max / default 3600)
                    default: 3600
                    format: int64
                    minimum: 1
                    maximum: 3600
                user_identifier:
                    type: string
                    description: Optional free-form user identifier
            required:
                - embed_origin
        CreateRequestBody2:
            type: object
            properties:
                description:
                    type: string
                    description: Description of the collection
                    maxLength: 500
                mcp_registry_namespace:
                    type: string
                    description: Registry namespace (e.g., 'com.speakeasy.acme.my-tools')
                    minLength: 1
                    maxLength: 200
                mcp_server_ids:
                    type: array
                    items:
                        type: string
                    description: MCP server IDs to attach to the collection
                name:
                    type: string
                    description: Display name for the collection
                    minLength: 1
                    maxLength: 100
                slug:
                    type: string
                    description: URL-friendly identifier for the collection
                    minLength: 1
                    maxLength: 60
                toolset_ids:
                    type: array
                    items:
                        type: string
                    description: Toolset IDs to attach to the collection
                visibility:
                    type: string
                    description: Visibility of the collection
                    default: private
                    enum:
                        - public
                        - private
            required:
                - name
                - slug
                - mcp_registry_namespace
        CreateRequestRequestBody:
            type: object
            properties:
                note:
                    type: string
                    description: The requester's justification for wanting access to this server. Must not be blank.
                    maxLength: 4000
                target:
                    type: string
                    description: 'The server reference: a URL, or the stdio command that launches it.'
                    maxLength: 2048
                target_kind:
                    type: string
                    description: The namespace of the reference.
                    enum:
                        - server_url
                        - stdio_command
            required:
                - target_kind
                - target
                - note
        CreateResponseBody:
            type: object
            properties:
                client_token:
                    type: string
                    description: JWT token for chat session
                embed_origin:
                    type: string
                    description: The origin from which the token will be used
                expires_after:
                    type: integer
                    description: Token expiration in seconds
                    format: int64
                status:
                    type: string
                    description: Session status
                user_identifier:
                    type: string
                    description: User identifier if provided
            required:
                - embed_origin
                - client_token
                - expires_after
                - status
        CreateRiskExclusionRequestBody:
            type: object
            properties:
                enabled:
                    type: boolean
                    description: Whether the exclusion is active.
                    default: true
                match_type:
                    type: string
                    description: How match_value is interpreted.
                    enum:
                        - exact
                        - regex
                        - rule_id
                        - source
                        - entity_type
                match_value:
                    type: string
                    description: The value matched against findings, interpreted per match_type.
                risk_policy_id:
                    type: string
                    description: Bind the exclusion to a single policy. Omit for a global (project-wide) exclusion.
                    format: uuid
                rule_id_filter:
                    type: string
                    description: 'Optional: only apply within this rule_id. Empty means any.'
                    default: ""
                source_filter:
                    type: string
                    description: 'Optional: only apply within this source. Empty means any.'
                    default: ""
            required:
                - match_type
                - match_value
        CreateRiskPolicyBypassRequestRequestBody:
            type: object
            properties:
                request_token:
                    type: string
                    description: Signed request token generated when a risk policy blocks an action.
            required:
                - request_token
        CreateRiskPolicyRequestBody:
            type: object
            properties:
                action:
                    type: string
                    description: 'Policy action: flag, warn (challenge), or block.'
                    default: flag
                    enum:
                        - flag
                        - warn
                        - block
                approved_email_domains:
                    type: array
                    items:
                        type: string
                    description: 'For the account_identity source: corporate email domains considered approved. Sessions whose AI-account email domain is not listed are flagged. Empty/omitted leaves the domain rule inert.'
                audience_principal_urns:
                    type: array
                    items:
                        type: string
                    description: Principal URNs this policy applies to. For audience_type=everyone, the server stores user:all.
                audience_type:
                    type: string
                    description: 'Policy audience type: everyone or targeted.'
                    default: everyone
                    enum:
                        - everyone
                        - targeted
                auto_name:
                    type: boolean
                    description: Whether the policy name should be auto-generated.
                custom_rule_ids:
                    type: array
                    items:
                        type: string
                    description: 'Custom detection rule ids to attach as detectors: a match produces a finding.'
                detection_scopes:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskDetectionScope'
                    description: Per-category detection scopes. Each specified category replaces its centrally recommended scope; a scope with both predicates empty scans every message surface. Empty/omitted = all recommendations apply unchanged.
                disabled_rules:
                    type: array
                    items:
                        type: string
                    description: Canonical rule_ids the user has unchecked within otherwise-enabled categories. Matching findings are dropped at scan time.
                enabled:
                    type: boolean
                    description: Whether the policy is active.
                message_types:
                    type: array
                    items:
                        type: string
                    description: Message types this policy applies to. When empty or omitted, the policy scans all supported types.
                model_config:
                    $ref: '#/components/schemas/RiskPolicyModelConfig'
                name:
                    type: string
                    description: The policy name. If omitted, a name will be auto-generated.
                policy_type:
                    type: string
                    description: 'Policy type: standard (regex/presidio/custom detection) or prompt_based (LLM-judge). Defaults to standard.'
                    default: standard
                    enum:
                        - standard
                        - prompt_based
                presidio_entities:
                    type: array
                    items:
                        type: string
                    description: Presidio entity types to detect.
                presidio_score_threshold:
                    type: number
                    description: Minimum Presidio confidence (0.0-1.0) a PII match must clear to surface. Omit/null applies the default (0.5).
                    example: 0.75
                    format: double
                    minimum: 0
                    maximum: 1
                prompt:
                    type: string
                    description: 'For prompt_based policies: the guardrail prompt the LLM judge evaluates each in-scope message against. Required when policy_type is prompt_based.'
                prompt_injection_rules:
                    type: array
                    items:
                        type: string
                    description: Prompt-injection detection rule ids to enable in addition to the heuristic baseline.
                scope_exempt:
                    type: string
                    description: 'CEL exemption predicate: the policy is skipped for a message when this boolean expression is true. Omit/empty means no inline exemption.'
                scope_include:
                    type: string
                    description: 'CEL scope predicate: the policy evaluates a message only when this boolean expression is true (in addition to message_types). Omit/empty means all messages are in scope.'
                score:
                    type: number
                    description: CVSS-style severity (0.1-10) assigned to findings this policy produces. Omit to apply the default (5).
                    default: 5
                    example: 5
                    format: double
                    minimum: 0.1
                    maximum: 10
                shadow_mcp_allowed_urls:
                    type: array
                    items:
                        type: string
                    description: Complete desired canonical URL allow set for this policy. Omit or send empty to create no URL-specific allow decisions.
                shadow_mcp_blocked_urls:
                    type: array
                    items:
                        type: string
                    description: 'For allow_all policies: complete desired canonical URL block set. Omit or send empty to block nothing. Only valid when shadow_mcp_disposition is allow_all.'
                shadow_mcp_disposition:
                    type: string
                    description: 'Default disposition for shadow MCP blocking policies: block_all (default) blocks every non-Gram-hosted server unless allowed, allow_all permits every server unless blocked. Only valid with the shadow_mcp source and block action. Immutable after create — switching requires delete + recreate.'
                    enum:
                        - block_all
                        - allow_all
                sources:
                    type: array
                    items:
                        type: string
                    description: Detection sources to enable.
                user_message:
                    type: string
                    description: Optional message shown to end users when this policy blocks an action or surfaces a flagged finding.
        CreateRoleForm:
            type: object
            properties:
                description:
                    type: string
                    description: Description of what this role can do.
                grants:
                    type: array
                    items:
                        $ref: '#/components/schemas/RoleGrant'
                    description: Scope grants to assign.
                member_ids:
                    type: array
                    items:
                        type: string
                    description: Optional member IDs to additionally assign to this role on creation.
                name:
                    type: string
                    description: Display name for the role.
            required:
                - name
                - description
                - grants
        CreateServerForm:
            type: object
            properties:
                name:
                    type: string
                    description: Optional human-readable name for the remote MCP server. Empty values are stored as null.
                transport_type:
                    type: string
                    description: The transport type for the remote MCP server (e.g. streamable-http)
                url:
                    type: string
                    description: The URL of the remote MCP server
                    format: uri
            description: Form for creating a new remote MCP server
            required:
                - url
                - transport_type
        CreateServerHeaderForm:
            type: object
            properties:
                description:
                    type: string
                    description: Description of the header
                is_required:
                    type: boolean
                    description: Whether the header is required. Defaults to false.
                is_secret:
                    type: boolean
                    description: Whether the header value is a secret. Defaults to false. Incompatible with value_from_request_header.
                name:
                    type: string
                    description: The header name
                remote_mcp_server_id:
                    type: string
                    description: The ID of the remote MCP server to add the header to
                    format: uuid
                value:
                    type: string
                    description: Static header value (mutually exclusive with value_from_request_header)
                value_from_request_header:
                    type: string
                    description: Name of the inbound request header to pass through (mutually exclusive with value)
            description: Form for creating a header on a remote MCP server. Exactly one of value or value_from_request_header must be provided.
            required:
                - remote_mcp_server_id
                - name
        CreateSessionHandoffRequestBody:
            type: object
            properties:
                content:
                    type: string
                    description: The rendered handoff document (markdown). Size-capped; the daemon renders deterministically from the local transcript.
                    maxLength: 262144
                session_id:
                    type: string
                    description: Native harness session identifier the handoff was rendered from. Gram derives its chat id from this the same way hook ingest does; a not-yet-captured session can still mint a link.
                    maxLength: 256
                source_surface:
                    type: string
                    description: Harness the session originated in, as detected by the agent (e.g. claude-code, codex).
                    maxLength: 64
                ttl_seconds:
                    type: integer
                    description: Requested link lifetime in seconds. Clamped to [60, 3600]; defaults to 900 when omitted.
                    example: 900
                    format: int64
            required:
                - session_id
                - content
        CreateSessionHandoffResult:
            type: object
            properties:
                expires_at:
                    type: string
                    description: When the link stops being served regardless of reads.
                    format: date-time
                url:
                    type: string
                    description: Capability URL serving the uploaded handoff markdown. Unauthenticated by design — the unguessable token is the credential — and dead after the first read or expiry.
            required:
                - url
                - expires_at
        CreateSignedChatAttachmentURLForm:
            type: object
            properties:
                apikey_token:
                    type: string
                chat_sessions_token:
                    type: string
                id:
                    type: string
                    description: The ID of the chat attachment
                project_id:
                    type: string
                    description: The project ID that the attachment belongs to
                project_slug_input:
                    type: string
                session_token:
                    type: string
                ttl_seconds:
                    type: integer
                    description: 'Time-to-live in seconds (default: 600, max: 3600)'
                    format: int64
            required:
                - id
                - project_id
        CreateSignedChatAttachmentURLForm2:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the chat attachment
                project_id:
                    type: string
                    description: The project ID that the attachment belongs to
                ttl_seconds:
                    type: integer
                    description: 'Time-to-live in seconds (default: 600, max: 3600)'
                    format: int64
            required:
                - id
                - project_id
        CreateSignedChatAttachmentURLResult:
            type: object
            properties:
                expires_at:
                    type: string
                    description: When the signed URL expires
                    format: date-time
                url:
                    type: string
                    description: The signed URL to access the chat attachment
            required:
                - url
                - expires_at
        CreateSkillRequestBody:
            type: object
            properties:
                content:
                    type: string
                    description: The complete uploaded SKILL.md content. Handlers enforce a maximum size of 65,536 UTF-8 bytes.
            required:
                - content
        CreateSpendRuleRequestBody:
            type: object
            properties:
                action:
                    type: string
                    description: 'Rule action: flag or block.'
                    default: flag
                    enum:
                        - flag
                        - block
                description:
                    type: string
                    description: Optional description of what the rule covers.
                    default: ""
                enabled:
                    type: boolean
                    description: Whether the rule is active.
                    default: true
                limit_usd:
                    type: number
                    description: Per-person budget in USD for one window.
                    format: double
                    minimum: 0
                name:
                    type: string
                    description: The rule name.
                target:
                    $ref: '#/components/schemas/SpendRuleTargetCondition'
                warn_at_pct:
                    type: integer
                    description: Percentage of the limit at which a warning event is emitted.
                    default: 80
                    format: int64
                    minimum: 1
                    maximum: 100
                window_kind:
                    type: string
                    description: UTC calendar window the budget covers.
                    enum:
                        - daily
                        - weekly
                        - monthly
            required:
                - name
                - target
                - limit_usd
                - window_kind
        CreateToolsetForm:
            type: object
            properties:
                default_environment_slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                description:
                    type: string
                    description: Description of the toolset
                name:
                    type: string
                    description: The name of the toolset
                origin:
                    $ref: '#/components/schemas/ToolsetOrigin'
                project_slug_input:
                    type: string
                resource_urns:
                    type: array
                    items:
                        type: string
                    description: List of resource URNs to include in the toolset
                tool_urns:
                    type: array
                    items:
                        type: string
                    description: List of tool URNs to include in the toolset
            required:
                - name
        CreateToolsetRequestBody:
            type: object
            properties:
                default_environment_slug:
                    type: string
                    description: The slug of the environment to use as the default for the toolset
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                description:
                    type: string
                    description: Description of the toolset
                name:
                    type: string
                    description: The name of the toolset
                origin:
                    $ref: '#/components/schemas/ToolsetOrigin'
                resource_urns:
                    type: array
                    items:
                        type: string
                    description: List of resource URNs to include in the toolset
                tool_urns:
                    type: array
                    items:
                        type: string
                    description: List of tool URNs to include in the toolset
            required:
                - name
        CreateTriggerInstanceForm:
            type: object
            properties:
                config:
                    type: object
                    description: The trigger config payload.
                    additionalProperties: true
                definition_slug:
                    type: string
                    description: The trigger definition slug.
                environment_id:
                    type: string
                    description: The linked environment ID.
                    format: uuid
                name:
                    type: string
                    description: The trigger instance name.
                status:
                    type: string
                    description: Optional initial status.
                    enum:
                        - active
                        - paused
                target_display:
                    type: string
                    description: The user-facing target display value.
                target_kind:
                    type: string
                    description: The trigger target kind.
                    enum:
                        - assistant
                        - noop
                target_ref:
                    type: string
                    description: The opaque target reference.
            required:
                - definition_slug
                - name
                - target_kind
                - target_ref
                - target_display
                - config
        CreateTunneledMcpServerForm:
            type: object
            properties:
                name:
                    type: string
                    description: Human-readable display name for the tunneled MCP server
            description: Form for creating a new tunneled MCP server source
            required:
                - name
        CreateTunneledMcpServerResult:
            type: object
            properties:
                server:
                    $ref: '#/components/schemas/TunneledMcpServer'
                tunnel_key:
                    type: string
                    description: Plaintext tunnel key. Only returned at creation time.
            description: Created tunneled MCP server plus the one-time tunnel key
            required:
                - server
                - tunnel_key
        CreateUnproxiedMcpServerForm:
            type: object
            properties:
                description:
                    type: string
                    description: Optional description shown alongside the server.
                name:
                    type: string
                    description: Optional human-readable name for the unproxied MCP server. Empty values are stored as null.
                url:
                    type: string
                    description: The URL of the vendor's MCP server. Speakeasy never proxies tool calls through it; the only outbound requests Speakeasy ever makes to it are fetching a favicon and, on request, a live tool listing.
                    format: uri
            description: Form for creating a new unproxied MCP server
            required:
                - url
        CreateUserSessionIssuerCimdClientForm:
            type: object
            properties:
                client_id_metadata_uri:
                    type: string
                    description: The exact https URL the client presents as its client_id. Matched byte for byte at authorization time — the spec forbids normalization, so this must be the vendor's published URL exactly.
                user_session_issuer_id:
                    type: string
                    description: The user_session_issuer the URL is allowed on.
                    format: uuid
            description: Form for allowing an additional CIMD document URL on a user_session_issuer.
            required:
                - user_session_issuer_id
                - client_id_metadata_uri
        CreateUserSessionIssuerCimdClientResult:
            type: object
            properties:
                client:
                    $ref: '#/components/schemas/UserSessionIssuerCimdClient'
            description: Result of allowing a CIMD document URL. Reachability is not reported here — call verifyURL for that.
            required:
                - client
        CreateUserSessionIssuerForm:
            type: object
            properties:
                authn_challenge_mode:
                    type: string
                    description: 'How multi-remote authn challenges are presented: chain | interactive.'
                    enum:
                        - chain
                        - interactive
                session_duration_hours:
                    type: integer
                    description: Maximum issued user session lifetime, in hours.
                    format: int64
                slug:
                    type: string
                    description: Project-unique slug.
            description: Form for creating a user_session_issuer.
            required:
                - slug
                - authn_challenge_mode
                - session_duration_hours
        CreditUsageResponseBody:
            type: object
            properties:
                credits_used:
                    type: number
                    description: The number of credits remaining
                    format: double
                monthly_credits:
                    type: integer
                    description: The number of monthly credits
                    format: int64
            required:
                - credits_used
                - monthly_credits
        CursorHookPayload:
            type: object
            properties:
                additional_data:
                    type: object
                    description: Additional hook-specific data
                    additionalProperties: true
                cache_read_tokens:
                    type: integer
                    description: Tokens read from cache (stop, afterAgentResponse)
                    format: int64
                cache_write_tokens:
                    type: integer
                    description: Tokens written to cache (stop, afterAgentResponse)
                    format: int64
                command:
                    type: string
                    description: Command string for command-based MCP servers (beforeMCPExecution / afterMCPExecution only)
                composer_mode:
                    type: string
                    description: The composer mode, e.g. agent (beforeSubmitPrompt only)
                conversation_id:
                    type: string
                    description: The Cursor conversation ID
                cursor_version:
                    type: string
                    description: The Cursor IDE version
                duration:
                    type: number
                    description: Execution duration in milliseconds, excluding approval wait time (afterMCPExecution only)
                    format: double
                duration_ms:
                    type: integer
                    description: Duration in milliseconds for the thinking block (afterAgentThought only)
                    format: int64
                error:
                    description: The error from the tool (postToolUseFailure only)
                generation_id:
                    type: string
                    description: The Cursor generation ID
                hook_event_name:
                    type: string
                    description: The type of hook event (e.g. beforeSubmitPrompt, stop, afterAgentResponse, afterAgentThought, preToolUse, postToolUse, postToolUseFailure, beforeMCPExecution, afterMCPExecution)
                input_tokens:
                    type: integer
                    description: Total input tokens used (stop, afterAgentResponse)
                    format: int64
                is_interrupt:
                    type: boolean
                    description: Whether the failure was caused by user interruption
                loop_count:
                    type: integer
                    description: Number of agentic loops executed (stop only)
                    format: int64
                model:
                    type: string
                    description: The model being used
                output_tokens:
                    type: integer
                    description: Total output tokens used (stop, afterAgentResponse)
                    format: int64
                prompt:
                    type: string
                    description: The user's prompt text (beforeSubmitPrompt only)
                result_json:
                    type: string
                    description: JSON-encoded string of the MCP tool response (afterMCPExecution only)
                session_id:
                    type: string
                    description: The session ID from Cursor
                status:
                    type: string
                    description: Completion status, e.g. completed (stop only)
                text:
                    type: string
                    description: The assistant's response text (afterAgentResponse) or thinking text (afterAgentThought)
                tool_input:
                    description: The input to the tool
                tool_name:
                    type: string
                    description: The name of the tool
                tool_response:
                    description: The response from the tool (postToolUse only)
                tool_use_id:
                    type: string
                    description: The unique ID for this tool use
                transcript_path:
                    type: string
                    description: Path to the conversation transcript JSONL file
                url:
                    type: string
                    description: URL of the MCP server (beforeMCPExecution / afterMCPExecution, URL-based servers only)
                user_email:
                    type: string
                    description: Email of the authenticated Cursor user, if available
            description: Payload for Cursor hook events
            required:
                - hook_event_name
        CursorHookResult:
            type: object
            properties:
                additional_context:
                    type: string
                    description: Additional context to inject into the conversation
                agent_message:
                    type: string
                    description: Message sent back to the agent (beforeMCPExecution only)
                permission:
                    type: string
                    description: 'Permission decision for preToolUse / beforeMCPExecution: allow, deny, or ask'
                user_message:
                    type: string
                    description: Message to display to the user
            description: Result for Cursor hook events
        CustomDomain:
            type: object
            properties:
                activated:
                    type: boolean
                    description: Whether the domain is activated in ingress
                certificate_expires_at:
                    type: string
                    description: When the currently observed TLS certificate expires.
                    format: date-time
                consecutive_failures:
                    type: integer
                    description: The number of consecutive failed health checks
                    format: int32
                created_at:
                    type: string
                    description: When the custom domain was created.
                    format: date-time
                domain:
                    type: string
                    description: The custom domain name
                health_checked_at:
                    type: string
                    description: When the domain health was last checked.
                    format: date-time
                health_issue:
                    type: string
                    description: 'The reason the domain was last observed as unhealthy. One of: dns_not_found, dns_target_mismatch, resource_missing, certificate_missing, certificate_not_ready, certificate_expired, certificate_invalid, check_failed.'
                health_status:
                    type: string
                    description: 'The latest observed domain health status. One of: unknown, healthy, unhealthy.'
                id:
                    type: string
                    description: The ID of the custom domain
                ip_allowlist:
                    type: array
                    items:
                        type: string
                    description: IP addresses or CIDR ranges allowed to access this domain. Empty list means unrestricted.
                is_updating:
                    type: boolean
                    description: The custom domain is actively being registered
                openai_apps_challenge_token:
                    type: string
                    description: The token served for OpenAI app-submission domain verification, if configured
                organization_id:
                    type: string
                    description: The ID of the organization this domain belongs to
                root_mcp_endpoint_id:
                    type: string
                    description: The MCP endpoint currently mapped to the domain root, if any
                    format: uuid
                unhealthy_since:
                    type: string
                    description: When the current unhealthy period began.
                    format: date-time
                updated_at:
                    type: string
                    description: When the custom domain was last updated.
                    format: date-time
                verified:
                    type: boolean
                    description: Whether the domain is verified
            required:
                - id
                - organization_id
                - domain
                - verified
                - activated
                - created_at
                - updated_at
                - is_updating
                - ip_allowlist
        CustomDomainMcpEndpoint:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the MCP endpoint
                    format: uuid
                is_domain_root:
                    type: boolean
                    description: Whether this endpoint is mapped to the custom-domain root
                mcp_server_id:
                    type: string
                    description: The ID of the parent MCP server
                    format: uuid
                mcp_server_name:
                    type: string
                    description: The display name of the parent MCP server. May be empty if the parent has no configured name.
                mcp_server_slug:
                    type: string
                    description: The url-friendly slug of the parent MCP server. May be empty if the parent has no configured slug.
                project_id:
                    type: string
                    description: The ID of the project the endpoint belongs to
                    format: uuid
                project_name:
                    type: string
                    description: The display name of the project the endpoint belongs to
                project_slug:
                    type: string
                    description: The url-friendly slug of the project the endpoint belongs to
                slug:
                    type: string
                    description: The endpoint slug
            description: An MCP endpoint registered under a custom domain, with its parent MCP server and project denormalised for display in the dashboard's delete-impact preview.
            required:
                - id
                - slug
                - project_id
                - project_name
                - project_slug
                - mcp_server_id
                - is_domain_root
        DeclineRiskPolicyChallengeResponseBody:
            type: object
            properties:
                declined:
                    type: boolean
                    description: Whether the challenge is now declined.
            required:
                - declined
        DeleteConfigRequestBody:
            type: object
            properties:
                provider:
                    type: string
                    description: AI provider identifier. Supported values include cursor, anthropic_compliance, codex_compliance, and chatgpt_compliance.
            required:
                - provider
        DeleteGlobalToolVariationForm:
            type: object
            properties:
                variation_id:
                    type: string
                    description: The ID of the variation to delete
            required:
                - variation_id
        DeleteGlobalToolVariationResult:
            type: object
            properties:
                variation_id:
                    type: string
                    description: The ID of the variation that was deleted
            required:
                - variation_id
        DeleteRequestBody:
            type: object
            properties:
                override_id:
                    type: string
                    description: Override ID to delete
            required:
                - override_id
        Deployment:
            type: object
            properties:
                cloned_from:
                    type: string
                    description: The ID of the deployment that this deployment was cloned from.
                    example: bc5f4a555e933e6861d12edba4c2d87ef6caf8e6
                created_at:
                    type: string
                    description: The creation date of the deployment.
                    format: date-time
                external_id:
                    type: string
                    description: The external ID to refer to the deployment. This can be a git commit hash for example.
                    example: bc5f4a555e933e6861d12edba4c2d87ef6caf8e6
                external_mcp_tool_count:
                    type: integer
                    description: The number of tools in the deployment generated from external MCP servers.
                    format: int64
                external_mcps:
                    type: array
                    items:
                        $ref: '#/components/schemas/DeploymentExternalMCP'
                    description: The external MCP servers that were deployed.
                external_url:
                    type: string
                    description: The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request.
                functions_assets:
                    type: array
                    items:
                        $ref: '#/components/schemas/DeploymentFunctions'
                    description: The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions.
                functions_tool_count:
                    type: integer
                    description: The number of tools in the deployment generated from Functions.
                    format: int64
                github_pr:
                    type: string
                    description: The github pull request that resulted in the deployment.
                    example: "1234"
                github_repo:
                    type: string
                    description: The github repository in the form of "owner/repo".
                    example: speakeasyapi/gram
                github_sha:
                    type: string
                    description: The commit hash that triggered the deployment.
                    example: f33e693e9e12552043bc0ec5c37f1b8a9e076161
                id:
                    type: string
                    description: The ID to of the deployment.
                    example: bc5f4a555e933e6861d12edba4c2d87ef6caf8e6
                idempotency_key:
                    type: string
                    description: A unique identifier that will mitigate against duplicate deployments.
                    example: 01jqq0ajmb4qh9eppz48dejr2m
                openapiv3_assets:
                    type: array
                    items:
                        $ref: '#/components/schemas/OpenAPIv3DeploymentAsset'
                    description: The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions.
                openapiv3_tool_count:
                    type: integer
                    description: The number of tools in the deployment generated from OpenAPI documents.
                    format: int64
                organization_id:
                    type: string
                    description: The ID of the organization that the deployment belongs to.
                packages:
                    type: array
                    items:
                        $ref: '#/components/schemas/DeploymentPackage'
                    description: The packages that were deployed.
                project_id:
                    type: string
                    description: The ID of the project that the deployment belongs to.
                status:
                    type: string
                    description: The status of the deployment.
                user_id:
                    type: string
                    description: The ID of the user that created the deployment.
            required:
                - id
                - created_at
                - organization_id
                - project_id
                - user_id
                - openapiv3_assets
                - status
                - packages
                - openapiv3_tool_count
                - functions_tool_count
                - external_mcp_tool_count
        DeploymentExternalMCP:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the deployment external MCP record.
                name:
                    type: string
                    description: The display name for the external MCP server.
                organization_mcp_collection_registry_id:
                    type: string
                    description: The ID of the internal collection registry the server is from.
                registry_id:
                    type: string
                    description: The ID of the external MCP registry the server is from.
                registry_server_specifier:
                    type: string
                    description: The canonical server name used to look up the server in the registry.
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            required:
                - id
                - name
                - slug
                - registry_server_specifier
        DeploymentFunctions:
            type: object
            properties:
                asset_id:
                    type: string
                    description: The ID of the uploaded asset.
                id:
                    type: string
                    description: The ID of the deployment asset.
                memory_mib:
                    type: integer
                    description: The memory limit in MiB of function runner machines.
                    format: int32
                name:
                    type: string
                    description: The name to give the document as it will be displayed in UIs.
                runtime:
                    type: string
                    description: The runtime to use when executing functions.
                scale:
                    type: integer
                    description: The number of instances to run for the function.
                    format: int32
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            required:
                - id
                - asset_id
                - name
                - slug
                - runtime
        DeploymentLogEvent:
            type: object
            properties:
                attachment_id:
                    type: string
                    description: The ID of the asset tied to the log event
                attachment_type:
                    type: string
                    description: The type of the asset tied to the log event
                created_at:
                    type: string
                    description: The creation date of the log event
                event:
                    type: string
                    description: The type of event that occurred
                id:
                    type: string
                    description: The ID of the log event
                message:
                    type: string
                    description: The message of the log event
            required:
                - id
                - created_at
                - event
                - message
        DeploymentPackage:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the deployment package.
                name:
                    type: string
                    description: The name of the package.
                version:
                    type: string
                    description: The version of the package.
            required:
                - id
                - name
                - version
        DeploymentSummary:
            type: object
            properties:
                created_at:
                    type: string
                    description: The creation date of the deployment.
                    format: date-time
                external_mcp_asset_count:
                    type: integer
                    description: The number of external MCP server assets.
                    format: int64
                external_mcp_tool_count:
                    type: integer
                    description: The number of tools in the deployment generated from external MCP servers.
                    format: int64
                functions_asset_count:
                    type: integer
                    description: The number of Functions assets.
                    format: int64
                functions_tool_count:
                    type: integer
                    description: The number of tools in the deployment generated from Functions.
                    format: int64
                id:
                    type: string
                    description: The ID to of the deployment.
                    example: bc5f4a555e933e6861d12edba4c2d87ef6caf8e6
                openapiv3_asset_count:
                    type: integer
                    description: The number of upstream OpenAPI assets.
                    format: int64
                openapiv3_tool_count:
                    type: integer
                    description: The number of tools in the deployment generated from OpenAPI documents.
                    format: int64
                status:
                    type: string
                    description: The status of the deployment.
                user_id:
                    type: string
                    description: The ID of the user that created the deployment.
            required:
                - id
                - created_at
                - user_id
                - status
                - openapiv3_asset_count
                - openapiv3_tool_count
                - functions_asset_count
                - functions_tool_count
                - external_mcp_asset_count
                - external_mcp_tool_count
        DetachUserSessionIssuerForm:
            type: object
            properties:
                id:
                    type: string
                    description: The remote_session_client id.
                    format: uuid
                user_session_issuer_id:
                    type: string
                    description: The user_session_issuer to detach.
                    format: uuid
            description: Form for detaching a user_session_issuer from a remote_session_client via the join table.
            required:
                - id
                - user_session_issuer_id
        DeviceAgentConfiguration:
            type: object
            properties:
                config:
                    type: object
                    description: Forward-compatible non-secret settings document. Platform values use false, user, or managed enforcement layers.
                    additionalProperties: true
                etag:
                    type: string
                    description: Opaque revision identifier for this configuration.
                is_configured:
                    type: boolean
                    description: Whether an administrator has saved a remote configuration. False means agents should not add a remote resolver layer.
                schema_version:
                    type: integer
                    description: Schema version for this remote configuration envelope.
                    format: int64
                    minimum: 1
                updated_at:
                    type: string
                    description: When this remote configuration was last saved. Absent when is_configured is false.
                    format: date-time
            description: Versioned organization-wide settings delivered to enrolled device agents. Agents must ignore unknown config keys. Remote settings override the shareable local/MDM settings after a successful fetch; per-device identity and secrets always remain local.
            required:
                - schema_version
                - config
                - is_configured
                - etag
        DeviceIntegrationConfig:
            type: object
            properties:
                created_at:
                    type: string
                    description: ISO 8601 timestamp when the config was created. Omitted when no config is set.
                    format: date-time
                enabled:
                    type: boolean
                    description: Whether the provider integration is active.
                has_credentials:
                    type: boolean
                    description: Whether secret credentials are currently stored. The values themselves are never returned.
                id:
                    type: string
                    description: Config ID. Omitted when no config is set for the provider.
                organization_id:
                    type: string
                    description: Organization the config belongs to.
                provider:
                    type: string
                    description: Provider identifier (e.g. jamf, kandji, drata, vanta).
                settings:
                    type: object
                    description: Non-secret provider settings (e.g. instance URL), keyed by field key.
                    additionalProperties:
                        type: string
                updated_at:
                    type: string
                    description: ISO 8601 timestamp of the most recent change. Omitted when no config is set.
                    format: date-time
            description: Per-organization device integration config for one provider. Secret credentials are write-only; reads only expose whether credentials are configured.
            required:
                - organization_id
                - provider
                - enabled
                - has_credentials
                - settings
        DeviceIntegrationCoverage:
            type: object
            properties:
                active_window_minutes:
                    type: integer
                    description: 'Freshness window: an agent counts as active when its heartbeat is within this many minutes.'
                    format: int64
                agent_active:
                    type: integer
                    description: Devices with an agent heartbeat within the window. What that attests depends on the matching mode and, per device, on whether the match was by serial or by email — compare against agent_active_device_attested.
                    format: int64
                agent_active_device_attested:
                    type: integer
                    description: How many of agent_active are backed by that machine's OWN heartbeat (serial match). Under user-level matching this is 0; under device-level matching a value below agent_active means some devices fell back to the assigned-user email, which is the weaker claim.
                    format: int64
                agent_other_device:
                    type: integer
                    description: 'Device-level matching only: devices whose assigned user runs the agent, but not on this machine. Always 0 under user-level matching, which cannot distinguish this from agent_active.'
                    format: int64
                agent_stale:
                    type: integer
                    description: Devices with a known agent that went quiet — the drift/disable case.
                    format: int64
                attestation:
                    type: string
                    description: 'The strongest claim that holds for EVERY active device in this response — not merely the org''s matching mode. "device": every active device was matched on its own hardware serial, so each one ran the agent. "user": at least one active device was matched only on its assigned-user email, so the set as a whole supports only the weaker claim that assigned users ran the agent somewhere.'
                    enum:
                        - device
                        - user
                missing:
                    type: integer
                    description: Devices absent from the latest completed MDM snapshot.
                    format: int64
                no_agent:
                    type: integer
                    description: Devices whose assigned email resolves to an org member with no agent at all.
                    format: int64
                no_email:
                    type: integer
                    description: Devices the MDM reports with no assigned-user email.
                    format: int64
                organization_id:
                    type: string
                    description: Organization the coverage describes.
                total_devices:
                    type: integer
                    description: All synced devices, including missing ones.
                    format: int64
                unmanaged_agent_users:
                    type: integer
                    description: Agent users with no matching device in any connected MDM inventory — shadow devices or fleets outside MDM.
                    format: int64
                unresolved_email:
                    type: integer
                    description: Devices whose assigned email matches neither an agent user nor an org member.
                    format: int64
            description: 'Agent-coverage summary across the org''s connected MDM inventories. What a bucket attests depends on the org''s matching mode: under device-level matching (hardware serial) agent_active means THIS machine reported in, while under user-level matching it means only that the device''s assigned user has a fresh heartbeat somewhere.'
            required:
                - organization_id
                - active_window_minutes
                - attestation
                - agent_active
                - agent_active_device_attested
                - agent_stale
                - agent_other_device
                - no_agent
                - no_email
                - unresolved_email
                - missing
                - total_devices
                - unmanaged_agent_users
        DeviceIntegrationProvider:
            type: object
            properties:
                capabilities:
                    type: array
                    items:
                        type: string
                    description: 'Integration directions the provider supports: inventory_source (pull the managed-device fleet) and/or evidence_sink (push agent-coverage evidence).'
                display_name:
                    type: string
                    description: Human-readable vendor name.
                fields:
                    type: array
                    items:
                        $ref: '#/components/schemas/DeviceIntegrationProviderField'
                    description: Credential and settings inputs the provider needs, in render order.
                id:
                    type: string
                    description: Provider identifier (e.g. jamf, kandji, drata, vanta).
                schedules:
                    type: array
                    items:
                        $ref: '#/components/schemas/DeviceIntegrationProviderSchedule'
                    description: Sync pipelines the provider runs.
            description: A vendor the device integrations framework can connect to.
            required:
                - id
                - display_name
                - capabilities
                - fields
                - schedules
        DeviceIntegrationProviderField:
            type: object
            properties:
                key:
                    type: string
                    description: Field identifier in the credentials or settings document.
                kind:
                    type: string
                    description: Input kind hint.
                    enum:
                        - text
                        - url
                label:
                    type: string
                    description: Human-readable name to render for the field.
                required:
                    type: boolean
                    description: Whether the field must be supplied to connect the provider.
                secret:
                    type: boolean
                    description: 'Whether the value is secret: stored encrypted, write-only, and masked in the UI.'
            description: One credential or settings input a provider needs to connect. Secret fields are stored encrypted and are write-only; non-secret fields are readable settings.
            required:
                - key
                - label
                - kind
                - secret
                - required
        DeviceIntegrationProviderSchedule:
            type: object
            properties:
                interval_minutes:
                    type: integer
                    description: Target minutes between successful runs. Declared in code by the provider, not configurable per org.
                    format: int64
                schedule:
                    type: string
                    description: Schedule identifier (e.g. jamf_inventory).
            description: One sync pipeline a provider runs on a cadence.
            required:
                - schedule
                - interval_minutes
        DeviceIntegrationScheduleState:
            type: object
            properties:
                auto_paused_at:
                    type: string
                    description: ISO 8601 timestamp when the scheduler auto-paused the schedule after repeated provider rejections. Omitted unless auto-paused.
                    format: date-time
                consecutive_failures:
                    type: integer
                    description: Number of consecutive failed syncs. Resets to zero on success or retry.
                    format: int64
                enabled:
                    type: boolean
                    description: Whether the user has this schedule enabled. Disabled schedules are skipped by the scheduler until re-enabled.
                last_sync_error:
                    type: string
                    description: Stored error from the schedule's latest failed sync. Omitted unless the latest sync failed.
                last_sync_failed_at:
                    type: string
                    description: ISO 8601 timestamp for the schedule's latest failed sync. Omitted unless a sync has failed.
                    format: date-time
                last_sync_success_at:
                    type: string
                    description: ISO 8601 timestamp for the schedule's last successful sync. Omitted until a sync succeeds.
                    format: date-time
                next_sync_after:
                    type: string
                    description: ISO 8601 timestamp for the schedule's next scheduled sync.
                    format: date-time
                schedule:
                    type: string
                    description: Schedule identifier (e.g. jamf_inventory).
                status:
                    type: string
                    description: Derived status for the schedule's latest sync state.
                    enum:
                        - pending
                        - success
                        - failed
                        - auto_paused
                        - disabled
            description: 'State of one sync schedule of a provider integration: the user''s intent (enabled) plus the scheduler''s execution state.'
            required:
                - schedule
                - enabled
                - status
                - consecutive_failures
        DeviceIntegrationTestConnectionResult:
            type: object
            properties:
                message:
                    type: string
                    description: Human-readable failure detail. Omitted on success.
                ok:
                    type: boolean
                    description: Whether the provider accepted the stored credentials.
            description: Outcome of probing the provider with the stored credentials.
            required:
                - ok
        DisableOpenRouterKeyRequestBody:
            type: object
            properties:
                key_type:
                    type: string
                    description: Key type to disable.
                    enum:
                        - chat
                        - internal
                organization_id:
                    type: string
                    description: Organization that owns the key.
            required:
                - organization_id
                - key_type
        DisableOrganizationRequestBody:
            type: object
            properties:
                id:
                    type: string
                    description: Organization ID.
                    minLength: 1
            required:
                - id
        DiscoverProtectedResourceMetadataRequestBody:
            type: object
            properties:
                remote_mcp_server_id:
                    type: string
                    description: The ID of the remote MCP server to probe.
                    format: uuid
            required:
                - remote_mcp_server_id
        DismissSkillSuggestionRequestBody:
            type: object
            properties:
                id:
                    type: string
                    description: The suggestion ID.
                    format: uuid
            required:
                - id
        DistributeOnboardingCandidateRequestBody:
            type: object
            properties:
                expected_version:
                    type: string
                    description: Opaque current distribution version token from getOnboarding.
                project_slug:
                    type: string
                    description: Exact workflow-selected project slug.
            required:
                - project_slug
                - expected_version
        DistributeSkillRequestBody:
            type: object
            properties:
                assistant_id:
                    type: string
                    description: The assistant that carries the skill.
                    format: uuid
                id:
                    type: string
                    description: The skill ID.
                    format: uuid
                pinned_version_id:
                    type: string
                    description: An optional valid version to pin instead of tracking the latest valid version.
                    format: uuid
                plugin_id:
                    type: string
                    description: The plugin that carries the skill.
                    format: uuid
            example:
                id: 550e8400-e29b-41d4-a716-446655440000
                plugin_id: 550e8400-e29b-41d4-a716-446655440001
            required:
                - id
        EmployeeDataFlowEdge:
            type: object
            properties:
                call_count:
                    type: integer
                    description: Total calls represented by this edge
                    format: int64
                failure_count:
                    type: integer
                    description: Failed or blocked calls represented by this edge
                    format: int64
                id:
                    type: string
                    description: Stable edge ID
                source:
                    type: string
                    description: Source node ID
                success_count:
                    type: integer
                    description: Successful calls represented by this edge
                    format: int64
                target:
                    type: string
                    description: Target node ID
            description: A weighted edge in the employee data flow graph
            required:
                - id
                - source
                - target
                - call_count
                - success_count
                - failure_count
        EmployeeDataFlowNode:
            type: object
            properties:
                id:
                    type: string
                    description: Stable node ID
                label:
                    type: string
                    description: Display label
                server_class:
                    type: string
                    description: Server classification, present for MCP server nodes
                    enum:
                        - gram
                        - external
                        - local
                tier:
                    type: string
                    description: Graph tier. Origin nodes identify the hostname or client context that started the call, not the MCP server URL.
                    enum:
                        - origin
                        - client
                        - server
                        - tool
                total_calls:
                    type: integer
                    description: Total calls involving this node
                    format: int64
            description: A node in the employee data flow graph
            required:
                - id
                - tier
                - label
                - total_calls
        EnableOpenRouterKeyRequestBody:
            type: object
            properties:
                key_type:
                    type: string
                    description: Key type to enable.
                    enum:
                        - chat
                        - internal
                organization_id:
                    type: string
                    description: Organization that owns the key.
            required:
                - organization_id
                - key_type
        EnableOrganizationRequestBody:
            type: object
            properties:
                id:
                    type: string
                    description: Organization ID.
                    minLength: 1
            required:
                - id
        EnsureServerReviewRequestBody:
            type: object
            properties:
                target:
                    type: string
                    description: The server URL the dossier describes.
                    maxLength: 2048
            required:
                - target
        Environment:
            type: object
            properties:
                created_at:
                    type: string
                    description: The creation date of the environment
                    format: date-time
                description:
                    type: string
                    description: The description of the environment
                entries:
                    type: array
                    items:
                        $ref: '#/components/schemas/EnvironmentEntry'
                    description: List of environment entries
                id:
                    type: string
                    description: The ID of the environment
                name:
                    type: string
                    description: The name of the environment
                organization_id:
                    type: string
                    description: The organization ID this environment belongs to
                project_id:
                    type: string
                    description: The project ID this environment belongs to
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                updated_at:
                    type: string
                    description: When the environment was last updated
                    format: date-time
            description: Model representing an environment
            required:
                - id
                - organization_id
                - project_id
                - name
                - slug
                - entries
                - created_at
                - updated_at
        EnvironmentEntry:
            type: object
            properties:
                created_at:
                    type: string
                    description: The creation date of the environment entry
                    format: date-time
                is_secret:
                    type: boolean
                    description: Whether the value is a secret. Secret values are redacted in reads; non-secret values are returned in cleartext.
                name:
                    type: string
                    description: The name of the environment variable
                updated_at:
                    type: string
                    description: When the environment entry was last updated
                    format: date-time
                value:
                    type: string
                    description: The value of the environment variable. Cleartext when is_secret is false, redacted otherwise.
            description: A single environment entry
            required:
                - name
                - value
                - is_secret
                - created_at
                - updated_at
        EnvironmentEntryInput:
            type: object
            properties:
                is_secret:
                    type: boolean
                    description: Whether the value is a secret. Secret values are encrypted at rest and redacted in reads; non-secret values are readable after save. When omitted, new entries default to secret and existing entries keep their current secrecy.
                name:
                    type: string
                    description: The name of the environment variable
                value:
                    type: string
                    description: The value of the environment variable. Omit on an existing secret entry to preserve its stored value. Required when creating an entry or when changing is_secret from true to false.
            description: A single environment entry
            required:
                - name
        Error:
            type: object
            properties:
                fault:
                    type: boolean
                    description: Is the error a server-side fault?
                id:
                    type: string
                    description: ID is a unique identifier for this particular occurrence of the problem.
                    example: 123abc
                message:
                    type: string
                    description: Message is a human-readable explanation specific to this occurrence of the problem.
                    example: parameter 'p' must be an integer
                name:
                    type: string
                    description: Name is the name of this class of errors.
                    example: bad_request
                temporary:
                    type: boolean
                    description: Is the error temporary?
                timeout:
                    type: boolean
                    description: Is the error a timeout?
            description: unauthorized access
            required:
                - name
                - id
                - message
                - temporary
                - timeout
                - fault
        EvaluatePromptGuardrailRequestBody:
            type: object
            properties:
                chat_id:
                    type: string
                    description: The chat session to replay the guardrail against.
                    format: uuid
                message_types:
                    type: array
                    items:
                        type: string
                    description: Message types to judge (user_message, assistant_message, tool_request, tool_response, prompt_attachment), matching a policy's message_types. When empty or omitted, judges all supported types.
                model_config:
                    $ref: '#/components/schemas/RiskPolicyModelConfig'
                prompt:
                    type: string
                    description: The guardrail prompt the LLM judge evaluates each in-scope message against.
                    minLength: 1
                    maxLength: 10000
                scope_exempt:
                    type: string
                    description: 'CEL exemption predicate: the replay skips a message when this boolean expression is true. Omit/empty means no inline exemption.'
                scope_include:
                    type: string
                    description: 'CEL scope predicate: the replay judges a message only when this boolean expression is true (in addition to message_types). Omit/empty means all messages are in scope.'
            required:
                - chat_id
                - prompt
        EvolveForm:
            type: object
            properties:
                deployment_id:
                    type: string
                    description: The ID of the deployment to evolve. If omitted, the latest deployment will be used.
                exclude_external_mcps:
                    type: array
                    items:
                        type: string
                    description: The external MCP servers, identified by slug, to exclude from the new deployment when cloning a previous deployment.
                exclude_functions:
                    type: array
                    items:
                        type: string
                    description: The functions, identified by slug, to exclude from the new deployment when cloning a previous deployment.
                exclude_openapiv3_assets:
                    type: array
                    items:
                        type: string
                    description: The OpenAPI 3.x documents, identified by slug, to exclude from the new deployment when cloning a previous deployment.
                exclude_packages:
                    type: array
                    items:
                        type: string
                    description: The packages to exclude from the new deployment when cloning a previous deployment.
                non_blocking:
                    type: boolean
                    description: If true, the deployment will be created in non-blocking mode where the request will return immediately and the deployment will proceed asynchronously.
                    example: false
                upsert_external_mcps:
                    type: array
                    items:
                        $ref: '#/components/schemas/AddExternalMCPForm'
                    description: The external MCP servers to upsert in the new deployment.
                upsert_functions:
                    type: array
                    items:
                        $ref: '#/components/schemas/AddFunctionsForm'
                    description: The tool functions to upsert in the new deployment.
                upsert_openapiv3_assets:
                    type: array
                    items:
                        $ref: '#/components/schemas/AddOpenAPIv3DeploymentAssetForm'
                    description: The OpenAPI 3.x documents to upsert in the new deployment.
                upsert_packages:
                    type: array
                    items:
                        $ref: '#/components/schemas/AddPackageForm'
                    description: The packages to upsert in the new deployment.
        EvolveResult:
            type: object
            properties:
                deployment:
                    $ref: '#/components/schemas/Deployment'
        ExchangeRequestBody:
            type: object
            properties:
                email:
                    type: string
                    description: Email address of the enrolled user to mint a per-user key for. Resolved to a user within the authenticated org.
                    example: dev@acme.corp
            required:
                - email
        ExportMcpMetadataRequestBody:
            type: object
            properties:
                mcp_slug:
                    type: string
                    description: The MCP server slug (from the install URL)
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            required:
                - mcp_slug
        ExprCompileResult:
            type: object
            properties:
                error:
                    type: string
                    description: Compiler error message when ok is false; empty otherwise.
                ok:
                    type: boolean
                    description: True when the expression compiled successfully.
            description: The result of compiling a single CEL expression for the editor.
            required:
                - ok
                - error
        ExtendTrialRequestBody:
            type: object
            properties:
                days:
                    type: integer
                    description: Number of days to add to the trial's current end date.
                    format: int64
                    minimum: 1
                    maximum: 365
                id:
                    type: string
                    description: Organization ID.
                    minLength: 1
            required:
                - id
                - days
        ExternalCredentialSummary:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the credential was created.
                    format: date-time
                id:
                    type: string
                    description: The ID of the external credential.
                    format: uuid
                name:
                    type: string
                    description: A human-readable name for the credential.
                organization_id:
                    type: string
                    description: The organization that owns the credential.
                provider:
                    type: string
                    description: The cloud provider of the credential.
                    enum:
                        - aws_iam
                        - gcp_iam
                updated_at:
                    type: string
                    description: When the credential was last updated.
                    format: date-time
            description: Provider-independent summary of an external credential.
            required:
                - id
                - organization_id
                - provider
                - name
                - created_at
                - updated_at
        ExternalKeySummary:
            type: object
            properties:
                algorithm:
                    type: string
                    description: The signing algorithm of the key.
                    enum:
                        - RS256
                        - ES256
                created_at:
                    type: string
                    description: When the key was created.
                    format: date-time
                customer_grant_reference:
                    type: string
                    description: The Gram identity (GCP service-account email or AWS principal ARN) the customer granted on the key for the key-policy / IAM-grant model. Not a secret.
                external_credential_id:
                    type: string
                    description: The external credential Gram uses to authenticate to the key.
                    format: uuid
                id:
                    type: string
                    description: The ID of the external key.
                    format: uuid
                name:
                    type: string
                    description: A human-readable name for the key.
                organization_id:
                    type: string
                    description: The organization that owns the key.
                provider:
                    type: string
                    description: The cloud KMS provider of the key.
                    enum:
                        - aws_kms
                        - gcp_kms
                updated_at:
                    type: string
                    description: When the key was last updated.
                    format: date-time
            description: Provider-independent summary of an external key.
            required:
                - id
                - organization_id
                - external_credential_id
                - provider
                - algorithm
                - name
                - created_at
                - updated_at
        ExternalMCPHeaderDefinition:
            type: object
            properties:
                description:
                    type: string
                    description: Description of the header
                header_name:
                    type: string
                    description: The actual HTTP header name to send (e.g., X-Api-Key)
                name:
                    type: string
                    description: The prefixed environment variable name (e.g., SLACK_X_API_KEY)
                placeholder:
                    type: string
                    description: Placeholder value for the header
                required:
                    type: boolean
                    description: Whether the header is required
                secret:
                    type: boolean
                    description: Whether the header value is secret
            required:
                - name
                - header_name
                - required
                - secret
        ExternalMCPPackage:
            type: object
            properties:
                environment_variables:
                    type: array
                    items:
                        $ref: '#/components/schemas/ExternalMCPPackageEnvironmentVariable'
                    description: Environment variables the package asks an install to supply. What a server demands — a required secret named here is an approval signal in its own right.
                file_sha256:
                    type: string
                    description: SHA-256 of the packaged artifact, when the registry publishes one
                identifier:
                    type: string
                    description: Package identifier, scope included
                registry_base_url:
                    type: string
                    description: Registry base URL when the package lives outside the default public registry
                    format: uri
                registry_type:
                    type: string
                    description: Package registry the artifact is published to, such as npm or pypi
                runtime_hint:
                    type: string
                    description: Launcher the publisher suggests, such as npx or uvx
                transport_type:
                    type: string
                    description: Execution transport the package declares, such as stdio
                version:
                    type: string
                    description: Published version
            description: A published package that runs this server, as declared by the registry
            required:
                - registry_type
                - identifier
                - version
        ExternalMCPPackageEnvironmentVariable:
            type: object
            properties:
                description:
                    type: string
                    description: The publisher's explanation of the variable. Untrusted text.
                is_required:
                    type: boolean
                    description: Whether an install cannot proceed without it
                is_secret:
                    type: boolean
                    description: Whether the publisher marked the value sensitive
                name:
                    type: string
                    description: Variable name the install must populate
            description: An environment variable a package declares its install requires
            required:
                - name
                - is_secret
                - is_required
        ExternalMCPRemote:
            type: object
            properties:
                headers:
                    type: array
                    items:
                        $ref: '#/components/schemas/ExternalMCPRemoteHeader'
                    description: HTTP headers the MCP client should collect and send when connecting to this remote
                transport_type:
                    type: string
                    description: Transport type (sse or streamable-http)
                    enum:
                        - sse
                        - streamable-http
                url:
                    type: string
                    description: URL of the remote endpoint
                    format: uri
                variables:
                    type: object
                    description: URL template variables for this remote endpoint
                    additionalProperties:
                        $ref: '#/components/schemas/ExternalMCPRemoteVariable'
            description: A remote endpoint for an MCP server
            required:
                - url
                - transport_type
        ExternalMCPRemoteHeader:
            type: object
            properties:
                description:
                    type: string
                    description: Description of the header
                is_required:
                    type: boolean
                    description: Whether this header is required
                is_secret:
                    type: boolean
                    description: Whether this header value should be treated as secret
                name:
                    type: string
                    description: Header name
                placeholder:
                    type: string
                    description: Placeholder value to show when collecting this header
            description: A header requirement for a remote MCP server
            required:
                - name
        ExternalMCPRemoteVariable:
            type: object
            properties:
                choices:
                    type: array
                    items:
                        type: string
                    description: Allowed values for the variable
                default:
                    type: string
                    description: Default value for the variable
                description:
                    type: string
                    description: Description of the variable
                is_required:
                    type: boolean
                    description: Whether this variable is required
                is_secret:
                    type: boolean
                    description: Whether this variable value should be treated as secret
            description: A URL template variable for a remote MCP server
        ExternalMCPRepository:
            type: object
            properties:
                source:
                    type: string
                    description: Hosting service the repository lives on, such as github
                subfolder:
                    type: string
                    description: Path within the repository holding the server, for monorepos
                url:
                    type: string
                    description: Repository URL
                    format: uri
            description: 'The source repository a registry entry links for its server. A registry declaration: nothing verifies the endpoint runs this code.'
            required:
                - url
        ExternalMCPServer:
            type: object
            properties:
                description:
                    type: string
                    description: Description of what the server does
                icon_url:
                    type: string
                    description: URL to the server's icon
                    format: uri
                mcp_server_id:
                    type: string
                    description: ID of the attached MCP server when this server is listed from a Collection (mcp_server-backed attachment)
                    format: uuid
                meta:
                    description: Opaque metadata from the registry
                organization_mcp_collection_registry_id:
                    type: string
                    description: ID of the internal collection registry this server came from
                    format: uuid
                registry_id:
                    type: string
                    description: ID of the external MCP registry this server came from
                    format: uuid
                registry_specifier:
                    type: string
                    description: Server specifier used to look up in the registry (e.g., 'io.github.user/server')
                    example: io.modelcontextprotocol.anonymous/exa
                remotes:
                    type: array
                    items:
                        $ref: '#/components/schemas/ExternalMCPRemote'
                    description: Available remote endpoints for the server
                title:
                    type: string
                    description: Display name for the server
                tools:
                    type: array
                    items:
                        $ref: '#/components/schemas/ExternalMCPTool'
                    description: Tools available on the server
                toolset_id:
                    type: string
                    description: ID of the attached toolset when this server is listed from a Collection (toolset-backed attachment)
                    format: uuid
                version:
                    type: string
                    description: Semantic version of the server
                    example: 1.0.0
            description: An MCP server from an external registry
            required:
                - registry_specifier
                - version
                - description
        ExternalMCPServerEntry:
            type: object
            properties:
                description:
                    type: string
                    description: Description of what the server does
                icon_url:
                    type: string
                    description: URL to the server's icon
                    format: uri
                is_read_only:
                    type: boolean
                    description: Whether every tool on the server is read-only
                mcp_server_id:
                    type: string
                    description: ID of the attached MCP server when this server is listed from a Collection (mcp_server-backed attachment)
                    format: uuid
                meta:
                    description: Opaque metadata from the registry
                organization_mcp_collection_registry_id:
                    type: string
                    description: ID of the internal collection registry this server came from
                    format: uuid
                packages:
                    type: array
                    items:
                        $ref: '#/components/schemas/ExternalMCPPackage'
                    description: Published packages that run this server, when the registry declares any
                registry_id:
                    type: string
                    description: ID of the external MCP registry this server came from
                    format: uuid
                registry_specifier:
                    type: string
                    description: Server specifier used to look up in the registry (e.g., 'io.github.user/server')
                    example: io.modelcontextprotocol.anonymous/exa
                remotes:
                    type: array
                    items:
                        $ref: '#/components/schemas/ExternalMCPRemote'
                    description: Available remote endpoints for the server
                repository:
                    $ref: '#/components/schemas/ExternalMCPRepository'
                supports_dcr:
                    type: boolean
                    description: Whether the server's OAuth authorization server advertises a dynamic client registration endpoint (RFC 7591). When false, connecting requires manual setup (static OAuth client credentials or API keys).
                title:
                    type: string
                    description: Display name for the server
                tool_count:
                    type: integer
                    description: Number of tools the server exposes
                    format: int64
                toolset_id:
                    type: string
                    description: ID of the attached toolset when this server is listed from a Collection (toolset-backed attachment)
                    format: uuid
                version:
                    type: string
                    description: Semantic version of the server
                    example: 1.0.0
            description: A summary of an MCP server from an external registry, returned by catalog listings
            required:
                - registry_specifier
                - version
                - description
                - tool_count
                - is_read_only
                - supports_dcr
        ExternalMCPTool:
            type: object
            properties:
                annotations:
                    description: Annotations for the tool
                description:
                    type: string
                    description: Description of the tool
                input_schema:
                    description: Input schema for the tool
                name:
                    type: string
                    description: Name of the tool
        ExternalMCPToolDefinition:
            type: object
            properties:
                annotations:
                    $ref: '#/components/schemas/ToolAnnotations'
                canonical:
                    $ref: '#/components/schemas/CanonicalToolAttributes'
                canonical_name:
                    type: string
                    description: The canonical name of the tool. Will be the same as the name if there is no variation.
                confirm:
                    type: string
                    description: Confirmation mode for the tool
                confirm_prompt:
                    type: string
                    description: Prompt for the confirmation
                created_at:
                    type: string
                    description: The creation date of the tool.
                    format: date-time
                deployment_external_mcp_id:
                    type: string
                    description: The ID of the deployments_external_mcps record
                deployment_id:
                    type: string
                    description: The ID of the deployment
                description:
                    type: string
                    description: Description of the tool
                id:
                    type: string
                    description: The ID of the tool
                name:
                    type: string
                    description: The name of the tool
                oauth_authorization_endpoint:
                    type: string
                    description: The OAuth authorization endpoint URL
                oauth_registration_endpoint:
                    type: string
                    description: The OAuth dynamic client registration endpoint URL
                oauth_scopes_supported:
                    type: array
                    items:
                        type: string
                    description: The OAuth scopes supported by the server
                oauth_token_endpoint:
                    type: string
                    description: The OAuth token endpoint URL
                oauth_version:
                    type: string
                    description: 'OAuth version: ''2.1'' (MCP OAuth), ''2.0'' (legacy), or ''none'''
                project_id:
                    type: string
                    description: The ID of the project
                registry_id:
                    type: string
                    description: The ID of the MCP registry
                registry_server_name:
                    type: string
                    description: The name of the external MCP server (e.g., exa)
                registry_specifier:
                    type: string
                    description: The specifier of the external MCP server (e.g., 'io.modelcontextprotocol.anonymous/exa')
                remote_url:
                    type: string
                    description: The URL to connect to the MCP server
                requires_oauth:
                    type: boolean
                    description: Whether the external MCP server requires OAuth authentication
                schema:
                    type: string
                    description: JSON schema for the request
                schema_version:
                    type: string
                    description: Version of the schema
                slug:
                    type: string
                    description: The slug used for tool prefixing (e.g., github)
                summarizer:
                    type: string
                    description: Summarizer for the tool
                tool_urn:
                    type: string
                    description: The URN of this tool
                transport_type:
                    type: string
                    description: The transport type used to connect to the MCP server
                    enum:
                        - streamable-http
                        - sse
                type:
                    type: string
                    description: Whether or not the tool is a proxy tool
                updated_at:
                    type: string
                    description: The last update date of the tool.
                    format: date-time
                variation:
                    $ref: '#/components/schemas/ToolVariation'
            description: A proxy tool that references an external MCP server
            required:
                - deployment_external_mcp_id
                - deployment_id
                - registry_specifier
                - registry_server_name
                - registry_id
                - slug
                - remote_url
                - transport_type
                - requires_oauth
                - oauth_version
                - created_at
                - updated_at
                - id
                - project_id
                - name
                - canonical_name
                - description
                - schema
                - tool_urn
        ExternalOAuthServer:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the external OAuth server was created.
                    format: date-time
                id:
                    type: string
                    description: The ID of the external OAuth server
                metadata:
                    description: The metadata for the external OAuth server
                project_id:
                    type: string
                    description: The project ID this external OAuth server belongs to
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                updated_at:
                    type: string
                    description: When the external OAuth server was last updated.
                    format: date-time
            required:
                - id
                - project_id
                - slug
                - metadata
                - created_at
                - updated_at
        ExternalOAuthServerForm:
            type: object
            properties:
                metadata:
                    description: The metadata for the external OAuth server
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            required:
                - slug
                - metadata
        FetchImageFromURLForm:
            type: object
            properties:
                apikey_token:
                    type: string
                project_slug_input:
                    type: string
                session_token:
                    type: string
                url:
                    type: string
                    description: The URL to fetch the image from
            required:
                - url
        FetchImageFromURLForm2:
            type: object
            properties:
                url:
                    type: string
                    description: The URL to fetch the image from
            required:
                - url
        FetchIssuerMetadataRequestBody:
            type: object
            properties:
                issuer:
                    type: string
                    description: Issuer URL to fetch metadata for (e.g. https://login.linear.com).
            required:
                - issuer
        FetchOpenAPIv3FromURLForm:
            type: object
            properties:
                apikey_token:
                    type: string
                project_slug_input:
                    type: string
                session_token:
                    type: string
                url:
                    type: string
                    description: The URL to fetch the OpenAPI document from
            required:
                - url
        FetchOpenAPIv3FromURLForm2:
            type: object
            properties:
                url:
                    type: string
                    description: The URL to fetch the OpenAPI document from
            required:
                - url
        FilterOption:
            type: object
            properties:
                count:
                    type: integer
                    description: Number of events for this option
                    format: int64
                id:
                    type: string
                    description: Unique identifier for the option
                label:
                    type: string
                    description: Display label for the option
            description: A single filter option (API key or user)
            required:
                - id
                - label
                - count
        FunctionEnvironmentVariable:
            type: object
            properties:
                auth_input_type:
                    type: string
                    description: Optional value of the function variable comes from a specific auth input
                description:
                    type: string
                    description: Description of the function environment variable
                name:
                    type: string
                    description: The environment variables
            required:
                - name
        FunctionResourceDefinition:
            type: object
            properties:
                created_at:
                    type: string
                    description: The creation date of the resource.
                    format: date-time
                deployment_id:
                    type: string
                    description: The ID of the deployment
                description:
                    type: string
                    description: Description of the resource
                function_id:
                    type: string
                    description: The ID of the function
                id:
                    type: string
                    description: The ID of the resource
                meta:
                    type: object
                    description: Meta tags for the tool
                    additionalProperties: true
                mime_type:
                    type: string
                    description: Optional MIME type of the resource
                name:
                    type: string
                    description: The name of the resource
                project_id:
                    type: string
                    description: The ID of the project
                resource_urn:
                    type: string
                    description: The URN of this resource
                runtime:
                    type: string
                    description: Runtime environment (e.g., nodejs:24, python:3.12)
                title:
                    type: string
                    description: Optional title for the resource
                updated_at:
                    type: string
                    description: The last update date of the resource.
                    format: date-time
                uri:
                    type: string
                    description: The URI of the resource
                variables:
                    description: Variables configuration for the resource
            description: A function resource
            required:
                - deployment_id
                - function_id
                - runtime
                - id
                - project_id
                - name
                - description
                - uri
                - resource_urn
                - created_at
                - updated_at
        FunctionToolDefinition:
            type: object
            properties:
                annotations:
                    $ref: '#/components/schemas/ToolAnnotations'
                asset_id:
                    type: string
                    description: The ID of the asset
                canonical:
                    $ref: '#/components/schemas/CanonicalToolAttributes'
                canonical_name:
                    type: string
                    description: The canonical name of the tool. Will be the same as the name if there is no variation.
                confirm:
                    type: string
                    description: Confirmation mode for the tool
                confirm_prompt:
                    type: string
                    description: Prompt for the confirmation
                created_at:
                    type: string
                    description: The creation date of the tool.
                    format: date-time
                deployment_id:
                    type: string
                    description: The ID of the deployment
                description:
                    type: string
                    description: Description of the tool
                function_id:
                    type: string
                    description: The ID of the function
                id:
                    type: string
                    description: The ID of the tool
                meta:
                    type: object
                    description: Meta tags for the tool
                    additionalProperties: true
                name:
                    type: string
                    description: The name of the tool
                project_id:
                    type: string
                    description: The ID of the project
                runtime:
                    type: string
                    description: Runtime environment (e.g., nodejs:24, python:3.12)
                schema:
                    type: string
                    description: JSON schema for the request
                schema_version:
                    type: string
                    description: Version of the schema
                summarizer:
                    type: string
                    description: Summarizer for the tool
                tags:
                    type: array
                    items:
                        type: string
                    description: The tags list for this function tool
                tool_urn:
                    type: string
                    description: The URN of this tool
                updated_at:
                    type: string
                    description: The last update date of the tool.
                    format: date-time
                variables:
                    description: Variables configuration for the function
                variation:
                    $ref: '#/components/schemas/ToolVariation'
            description: A function tool
            required:
                - deployment_id
                - asset_id
                - function_id
                - runtime
                - tags
                - id
                - project_id
                - name
                - canonical_name
                - description
                - schema
                - tool_urn
                - created_at
                - updated_at
        GcpIamCredential:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the credential was created.
                    format: date-time
                id:
                    type: string
                    description: The ID of the external credential.
                    format: uuid
                impersonate_service_account:
                    type: string
                    description: The service account Gram impersonates (impersonation approach, or the WIF hop).
                name:
                    type: string
                    description: A human-readable name for the credential.
                organization_id:
                    type: string
                    description: The organization that owns the credential.
                provider:
                    type: string
                    description: The cloud provider of the credential.
                    enum:
                        - aws_iam
                        - gcp_iam
                updated_at:
                    type: string
                    description: When the credential was last updated.
                    format: date-time
                wif_pool_id:
                    type: string
                    description: Workload Identity Federation pool ID.
                wif_project_number:
                    type: string
                    description: GCP project number backing the WIF pool.
                wif_provider_id:
                    type: string
                    description: Workload Identity Federation provider ID.
            description: A GCP IAM external credential.
            required:
                - id
                - organization_id
                - provider
                - name
                - created_at
                - updated_at
        GcpKmsKey:
            type: object
            properties:
                algorithm:
                    type: string
                    description: The signing algorithm of the key.
                    enum:
                        - RS256
                        - ES256
                created_at:
                    type: string
                    description: When the key was created.
                    format: date-time
                customer_grant_reference:
                    type: string
                    description: The Gram identity (GCP service-account email or AWS principal ARN) the customer granted on the key for the key-policy / IAM-grant model. Not a secret.
                external_credential_id:
                    type: string
                    description: The external credential Gram uses to authenticate to the key.
                    format: uuid
                id:
                    type: string
                    description: The ID of the external key.
                    format: uuid
                name:
                    type: string
                    description: A human-readable name for the key.
                organization_id:
                    type: string
                    description: The organization that owns the key.
                provider:
                    type: string
                    description: The cloud KMS provider of the key.
                    enum:
                        - aws_kms
                        - gcp_kms
                resource_name:
                    type: string
                    description: The resource name of the GCP KMS key.
                updated_at:
                    type: string
                    description: When the key was last updated.
                    format: date-time
            description: A GCP KMS external key.
            required:
                - resource_name
                - id
                - organization_id
                - external_credential_id
                - provider
                - algorithm
                - name
                - created_at
                - updated_at
        GcpSetupInfo:
            type: object
            properties:
                required_role:
                    type: string
                    description: The IAM role to grant Gram's service account on the target service account.
                service_account_email:
                    type: string
                    description: Gram's own service account. Grant it roles/iam.serviceAccountTokenCreator on the service account you want Gram to impersonate. Empty when the running environment cannot report one (local development backed by a user login rather than a service-account key).
            description: What the customer must grant in their own GCP project before Gram can impersonate a service account there.
            required:
                - required_role
        GenerateTitleRequestBody:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the chat
                title:
                    type: string
                    description: When present, sets the chat's title manually (empty string resets to auto-generated). When omitted, the current title is returned without changes.
                    maxLength: 200
            required:
                - id
        GenerateTitleResponseBody:
            type: object
            properties:
                title:
                    type: string
                    description: The current title after the operation (empty when reset to auto-generated)
            required:
                - title
        GenerateWorkOSAdminPortalLinkRequestBody:
            type: object
            properties:
                intent:
                    type: string
                    description: WorkOS Admin Portal intent.
                    enum:
                        - dsync
                        - sso
                        - audit_logs
                        - domain_verification
                        - log_streams
                intent_options:
                    $ref: '#/components/schemas/WorkOSIntentOptions'
                it_contact_emails:
                    type: array
                    items:
                        type: string
                    description: IT contact email addresses displayed in the Admin Portal for end-user support.
                return_url:
                    type: string
                    description: URL to redirect the user to after the Admin Portal session ends.
                    format: uri
                success_url:
                    type: string
                    description: URL to redirect the user to on successful completion of the Admin Portal flow.
                    format: uri
            required:
                - intent
        GenerateWorkOSAdminPortalLinkResult:
            type: object
            properties:
                url:
                    type: string
                    description: URL to the WorkOS Admin Portal flow.
            required:
                - url
        GetActiveDeploymentResult:
            type: object
            properties:
                deployment:
                    $ref: '#/components/schemas/Deployment'
        GetDeploymentForm:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the deployment
            required:
                - id
        GetDeploymentLogsForm:
            type: object
            properties:
                cursor:
                    type: string
                    description: The cursor to fetch results from
                deployment_id:
                    type: string
                    description: The ID of the deployment
            required:
                - deployment_id
        GetDeploymentLogsResult:
            type: object
            properties:
                events:
                    type: array
                    items:
                        $ref: '#/components/schemas/DeploymentLogEvent'
                    description: The logs for the deployment
                next_cursor:
                    type: string
                    description: The cursor to fetch results from
                status:
                    type: string
                    description: The status of the deployment
            required:
                - events
                - status
        GetDeploymentResult:
            type: object
            properties:
                cloned_from:
                    type: string
                    description: The ID of the deployment that this deployment was cloned from.
                    example: bc5f4a555e933e6861d12edba4c2d87ef6caf8e6
                created_at:
                    type: string
                    description: The creation date of the deployment.
                    format: date-time
                external_id:
                    type: string
                    description: The external ID to refer to the deployment. This can be a git commit hash for example.
                    example: bc5f4a555e933e6861d12edba4c2d87ef6caf8e6
                external_mcp_tool_count:
                    type: integer
                    description: The number of tools in the deployment generated from external MCP servers.
                    format: int64
                external_mcps:
                    type: array
                    items:
                        $ref: '#/components/schemas/DeploymentExternalMCP'
                    description: The external MCP servers that were deployed.
                external_url:
                    type: string
                    description: The upstream URL a deployment can refer to. This can be a github url to a commit hash or pull request.
                functions_assets:
                    type: array
                    items:
                        $ref: '#/components/schemas/DeploymentFunctions'
                    description: The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions.
                functions_tool_count:
                    type: integer
                    description: The number of tools in the deployment generated from Functions.
                    format: int64
                github_pr:
                    type: string
                    description: The github pull request that resulted in the deployment.
                    example: "1234"
                github_repo:
                    type: string
                    description: The github repository in the form of "owner/repo".
                    example: speakeasyapi/gram
                github_sha:
                    type: string
                    description: The commit hash that triggered the deployment.
                    example: f33e693e9e12552043bc0ec5c37f1b8a9e076161
                id:
                    type: string
                    description: The ID to of the deployment.
                    example: bc5f4a555e933e6861d12edba4c2d87ef6caf8e6
                idempotency_key:
                    type: string
                    description: A unique identifier that will mitigate against duplicate deployments.
                    example: 01jqq0ajmb4qh9eppz48dejr2m
                openapiv3_assets:
                    type: array
                    items:
                        $ref: '#/components/schemas/OpenAPIv3DeploymentAsset'
                    description: The IDs, as returned from the assets upload service, to uploaded OpenAPI 3.x documents whose operations will become tool definitions.
                openapiv3_tool_count:
                    type: integer
                    description: The number of tools in the deployment generated from OpenAPI documents.
                    format: int64
                organization_id:
                    type: string
                    description: The ID of the organization that the deployment belongs to.
                packages:
                    type: array
                    items:
                        $ref: '#/components/schemas/DeploymentPackage'
                    description: The packages that were deployed.
                project_id:
                    type: string
                    description: The ID of the project that the deployment belongs to.
                status:
                    type: string
                    description: The status of the deployment.
                user_id:
                    type: string
                    description: The ID of the user that created the deployment.
            required:
                - id
                - created_at
                - organization_id
                - project_id
                - user_id
                - openapiv3_assets
                - status
                - packages
                - openapiv3_tool_count
                - functions_tool_count
                - external_mcp_tool_count
        GetEmployeeDataFlowGraphPayload:
            type: object
            properties:
                account_type:
                    type: string
                    description: Optional account type filter ('team' or 'personal')
                external_org_id:
                    type: string
                    description: Optional filter to a single AI account by its provider org id; scopes the graph to that one account
                external_user_id:
                    type: string
                    description: External user ID to get the graph for (mutually exclusive with user_id)
                from:
                    type: string
                    description: Start time in ISO 8601 format
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                to:
                    type: string
                    description: End time in ISO 8601 format
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
                user_id:
                    type: string
                    description: User ID to get the graph for (mutually exclusive with external_user_id)
            description: Payload for getting an employee-level MCP data flow graph
            required:
                - from
                - to
        GetEmployeeDataFlowGraphResult:
            type: object
            properties:
                edges:
                    type: array
                    items:
                        $ref: '#/components/schemas/EmployeeDataFlowEdge'
                    description: Weighted graph edges between adjacent populated tiers
                nodes:
                    type: array
                    items:
                        $ref: '#/components/schemas/EmployeeDataFlowNode'
                    description: Graph nodes grouped by tier
            description: Result of employee data flow graph query
            required:
                - nodes
                - edges
        GetHooksSummaryPayload:
            type: object
            properties:
                filters:
                    type: array
                    items:
                        $ref: '#/components/schemas/LogFilter'
                    description: Filter conditions (same as listHooksTraces)
                from:
                    type: string
                    description: Start time in ISO 8601 format
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                to:
                    type: string
                    description: End time in ISO 8601 format
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
                types_to_include:
                    type: array
                    items:
                        type: string
                        enum:
                            - mcp
                            - local
                            - skill
                    description: Hook types to include (mcp, local, skill). If empty, includes all types.
                    example:
                        - mcp
                        - skill
            description: Payload for getting aggregated hooks metrics
            required:
                - from
                - to
        GetHooksSummaryResult:
            type: object
            properties:
                breakdown:
                    type: array
                    items:
                        $ref: '#/components/schemas/HooksBreakdownRow'
                    description: 'Cross-dimensional pivot: (user, server, source, tool) x counts'
                servers:
                    type: array
                    items:
                        $ref: '#/components/schemas/HooksServerSummary'
                    description: Aggregated metrics grouped by server
                skill_breakdown:
                    type: array
                    items:
                        $ref: '#/components/schemas/SkillBreakdownRow'
                    description: Per-user skill breakdown
                skill_time_series:
                    type: array
                    items:
                        $ref: '#/components/schemas/SkillTimeSeriesPoint'
                    description: Time-bucketed event counts by skill
                skills:
                    type: array
                    items:
                        $ref: '#/components/schemas/SkillSummary'
                    description: Aggregated metrics grouped by skill
                time_series:
                    type: array
                    items:
                        $ref: '#/components/schemas/HooksTimeSeriesPoint'
                    description: Time-bucketed event counts by server and user
                total_events:
                    type: integer
                    description: Total number of hook events
                    format: int64
                total_sessions:
                    type: integer
                    description: Total number of unique sessions
                    format: int64
                users:
                    type: array
                    items:
                        $ref: '#/components/schemas/HooksUserSummary'
                    description: Aggregated metrics grouped by user
            description: Result of hooks summary query
            required:
                - servers
                - users
                - skills
                - total_events
                - total_sessions
                - breakdown
                - time_series
                - skill_time_series
                - skill_breakdown
        GetInstanceForm:
            type: object
            properties:
                apikey_token:
                    type: string
                chat_sessions_token:
                    type: string
                project_slug_input:
                    type: string
                session_token:
                    type: string
                toolset_slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            required:
                - toolset_slug
        GetInstanceResult:
            type: object
            properties:
                description:
                    type: string
                    description: The description of the toolset
                external_mcp_header_definitions:
                    type: array
                    items:
                        $ref: '#/components/schemas/ExternalMCPHeaderDefinition'
                    description: The external MCP header definitions that are relevant to the toolset
                function_environment_variables:
                    type: array
                    items:
                        $ref: '#/components/schemas/FunctionEnvironmentVariable'
                    description: The function environment variables that are relevant to the toolset
                mcp_servers:
                    type: array
                    items:
                        $ref: '#/components/schemas/InstanceMcpServer'
                    description: The MCP servers that are relevant to the toolset
                name:
                    type: string
                    description: The name of the toolset
                prompt_templates:
                    type: array
                    items:
                        $ref: '#/components/schemas/PromptTemplate'
                    description: The list of prompt templates
                security_variables:
                    type: array
                    items:
                        $ref: '#/components/schemas/SecurityVariable'
                    description: The security variables that are relevant to the toolset
                server_variables:
                    type: array
                    items:
                        $ref: '#/components/schemas/ServerVariable'
                    description: The server variables that are relevant to the toolset
                tools:
                    type: array
                    items:
                        $ref: '#/components/schemas/Tool'
                    description: The list of tools
            required:
                - name
                - tools
                - mcp_servers
        GetIntegrationForm:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the integration to get (refers to a package id).
                name:
                    type: string
                    description: The name of the integration to get (refers to a package name).
            description: Get a third-party integration by ID or name.
        GetIntegrationResult:
            type: object
            properties:
                integration:
                    $ref: '#/components/schemas/Integration'
        GetKeyUsageResponseBody:
            type: object
            properties:
                credits_used:
                    type: number
                    description: Credits spent this month, rounded to cents.
                    format: double
                monthly_credits:
                    type: integer
                    description: Monthly credit ceiling recorded locally.
                    format: int64
                upstream_limit:
                    type: integer
                    description: Monthly limit as configured upstream; absent when OpenRouter reports an unlimited key.
                    format: int64
            description: Live usage as reported by OpenRouter at request time.
            required:
                - credits_used
                - monthly_credits
        GetLatestDeploymentResult:
            type: object
            properties:
                deployment:
                    $ref: '#/components/schemas/Deployment'
        GetMcpMetadataResponseBody:
            type: object
            properties:
                metadata:
                    $ref: '#/components/schemas/McpMetadata'
        GetMcpServerActivityPayload:
            type: object
            properties:
                recent_window_days:
                    type: integer
                    description: Size of the recent-activity window in days. A server with tool calls in the overall lookback window but none inside this window is flagged as stale. Defaults to 14.
                    default: 14
                    format: int64
                    minimum: 1
                    maximum: 90
            description: Payload for per-MCP-server tool-call activity used by the Distribute MCP listing indicators
        GetMcpServerActivityResult:
            type: object
            properties:
                activity:
                    type: array
                    items:
                        $ref: '#/components/schemas/McpServerActivity'
                    description: One entry per MCP server (hosted or tunneled) that has received at least one tool call within the lookback window
                lookback_days:
                    type: integer
                    description: The overall lookback window size in days (bounded by telemetry retention)
                    format: int64
                recent_window_days:
                    type: integer
                    description: The recent-activity window size in days that was applied
                    format: int64
            description: Per-MCP-server tool-call activity. Only servers with at least one tool call inside the lookback window are returned; a server absent from the list has never received a tool call (within the telemetry retention window).
            required:
                - activity
                - recent_window_days
                - lookback_days
        GetMetricsSummaryResult:
            type: object
            properties:
                metrics:
                    $ref: '#/components/schemas/ProjectSummary'
            description: Result of metrics summary query
            required:
                - metrics
        GetObservabilityOverviewPayload:
            type: object
            properties:
                account_type:
                    type: string
                    description: Optional account type filter ('team' or 'personal')
                api_key_id:
                    type: string
                    description: Optional API key ID filter
                event_source:
                    type: string
                    description: Optional event source filter (e.g. 'hook')
                external_org_id:
                    type: string
                    description: Optional filter to a single AI account by its provider org id; scopes the overview to that one account
                external_user_id:
                    type: string
                    description: Optional external user ID filter
                from:
                    type: string
                    description: Start time in ISO 8601 format
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                hook_source:
                    type: string
                    description: Optional hook source filter (e.g. 'cursor', 'claude-code')
                include_time_series:
                    type: boolean
                    description: 'Whether to include time series data (default: true)'
                    default: true
                mcp_server_id:
                    type: string
                    description: Optional MCP server ID filter (fronting server; spans both remote-backed and toolset-backed activity)
                    format: uuid
                remote_mcp_server_id:
                    type: string
                    description: Optional Remote MCP server ID filter
                    format: uuid
                to:
                    type: string
                    description: End time in ISO 8601 format
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
                toolset_slug:
                    type: string
                    description: Optional toolset/MCP server slug filter
                user_id:
                    type: string
                    description: Optional internal user ID filter
            description: Payload for getting observability overview metrics
            required:
                - from
                - to
        GetObservabilityOverviewResult:
            type: object
            properties:
                comparison:
                    $ref: '#/components/schemas/ObservabilitySummary'
                interval_seconds:
                    type: integer
                    description: The time bucket interval in seconds used for the time series data
                    format: int64
                summary:
                    $ref: '#/components/schemas/ObservabilitySummary'
                time_series:
                    type: array
                    items:
                        $ref: '#/components/schemas/TimeSeriesBucket'
                    description: Time series data points
                top_tools_by_count:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolMetric'
                    description: Top tools by call count
                top_tools_by_failure_rate:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolMetric'
                    description: Top tools by failure rate
            description: Result of observability overview query
            required:
                - summary
                - comparison
                - time_series
                - top_tools_by_count
                - top_tools_by_failure_rate
                - interval_seconds
        GetPluginsResult:
            type: object
            properties:
                configuration:
                    $ref: '#/components/schemas/DeviceAgentConfiguration'
                etag:
                    type: string
                    description: Opaque revision identifier covering the marketplace, plugin, and remote-configuration set. The agent stores this to detect changes between polls.
                marketplaces:
                    type: array
                    items:
                        $ref: '#/components/schemas/AgentMarketplace'
                    description: Plugin marketplaces the agent should register with the tools it manages. Sorted by name.
                plugins:
                    type: array
                    items:
                        $ref: '#/components/schemas/AgentPlugin'
                    description: Plugins the agent should enable. Each entry references one of the marketplaces above by name.
            required:
                - etag
                - marketplaces
                - plugins
        GetProductFeaturesResponseBody:
            type: object
            properties:
                ai_platform_push_integrations_enabled:
                    type: boolean
                    description: Whether the organization can provision push integrations for AI platforms
                authz_challenge_logging_enabled:
                    type: boolean
                    description: Whether authz challenge logging to ClickHouse is enabled
                custom_model_keys_enabled:
                    type: boolean
                    description: Whether the organization can supply its own model provider API keys (BYOK)
                customer_managed_encryption_keys_enabled:
                    type: boolean
                    description: Whether the organization can manage the external credentials and cloud KMS keys backing customer-managed encryption
                device_agent:
                    type: boolean
                    description: Whether the organization uses the device agent (any device has polled agent.getPlugins). Derived from device-agent syncs, not an admin-settable feature.
                hooks_browser_login_enabled:
                    type: boolean
                    description: Whether generated hook plugins may mint per-user keys via the interactive browser login
                hooks_fail_open_enabled:
                    type: boolean
                    description: Whether hooks fail open when the Speakeasy control plane is unreachable or erroring — blocking policies are not enforced for the duration of the outage
                logs_enabled:
                    type: boolean
                    description: Whether logging is enabled
                platform_mcp_enabled:
                    type: boolean
                    description: Whether the organization can use the Gram Platform MCP capability
                remote_session_auto_refresh_enabled:
                    type: boolean
                    description: Whether consent screens expose automatic remote-session refresh for the organization
                remote_session_auto_refresh_enforced_enabled:
                    type: boolean
                    description: 'Whether automatic remote-session refresh is enforced as the organization default: forced on for every user, shown locked on consent screens, and applied by the keepalive regardless of per-session preference'
                scim_enabled:
                    type: boolean
                    description: Whether SCIM/directory sync setup is enabled for the organization
                session_capture_enabled:
                    type: boolean
                    description: Whether Claude Code session capture is enabled
                skill_capture_metadata_only:
                    type: boolean
                    description: Whether skill capture stores activation metadata without requesting manifest content
                skills_enabled:
                    type: boolean
                    description: Whether the Skills page is enabled for the organization
                sso_enabled:
                    type: boolean
                    description: Whether SSO setup is enabled for the organization
                tool_io_logs_enabled:
                    type: boolean
                    description: Whether tool I/O logging is enabled
            required:
                - logs_enabled
                - tool_io_logs_enabled
                - session_capture_enabled
                - authz_challenge_logging_enabled
                - sso_enabled
                - scim_enabled
                - hooks_browser_login_enabled
                - hooks_fail_open_enabled
                - custom_model_keys_enabled
                - skills_enabled
                - skill_capture_metadata_only
                - ai_platform_push_integrations_enabled
                - platform_mcp_enabled
                - customer_managed_encryption_keys_enabled
                - remote_session_auto_refresh_enabled
                - remote_session_auto_refresh_enforced_enabled
                - device_agent
        GetProjectForm:
            type: object
            properties:
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            required:
                - slug
        GetProjectMetricsSummaryPayload:
            type: object
            properties:
                from:
                    type: string
                    description: Start time in ISO 8601 format
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                to:
                    type: string
                    description: End time in ISO 8601 format
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
            description: Payload for getting project-level metrics summary
            required:
                - from
                - to
        GetProjectOverviewPayload:
            type: object
            properties:
                from:
                    type: string
                    description: Start time in ISO 8601 format
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                to:
                    type: string
                    description: End time in ISO 8601 format
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
            description: Payload for getting project-level overview
            required:
                - from
                - to
        GetProjectOverviewResult:
            type: object
            properties:
                comparison:
                    $ref: '#/components/schemas/ProjectOverviewSummary'
                metrics_mode:
                    type: string
                    description: Indicates whether metrics are session-based or tool-call-based
                    enum:
                        - session
                        - tool_call
                summary:
                    $ref: '#/components/schemas/ProjectOverviewSummary'
            description: Result of project overview query
            required:
                - summary
                - comparison
                - metrics_mode
        GetProjectResult:
            type: object
            properties:
                project:
                    $ref: '#/components/schemas/Project'
            required:
                - project
        GetPromptTemplateResult:
            type: object
            properties:
                template:
                    $ref: '#/components/schemas/PromptTemplate'
            required:
                - template
        GetRiskPolicyChallengeResponseBody:
            type: object
            properties:
                acknowledged:
                    type: boolean
                    description: Whether this challenge has already been acknowledged.
                expires_at:
                    type: string
                    description: RFC3339 time the acknowledgement link expires.
                    format: date-time
                message:
                    type: string
                    description: Human-facing challenge message describing what was flagged.
                policy_name:
                    type: string
                    description: The policy that issued the warning.
                tool_name:
                    type: string
                    description: The tool the challenge applies to, if any.
            required:
                - message
                - acknowledged
        GetSessionMetaResult:
            type: object
            properties:
                sessions:
                    type: array
                    items:
                        $ref: '#/components/schemas/AgentSessionMeta'
                    description: Metadata for the requested sessions that exist and are owned by the calling user. Requested ids with no captured chat or another owner are omitted.
            required:
                - sessions
        GetSetupDocsResponseBody:
            type: object
            properties:
                guides:
                    type: array
                    items:
                        $ref: '#/components/schemas/MCPSetupGuide'
                    description: Matching setup guides, most specific match first. Empty when no guide has been published for the server.
            required:
                - guides
        GetSignedAssetURLForm:
            type: object
            properties:
                asset_id:
                    type: string
                    description: The ID of the function asset
            required:
                - asset_id
        GetSignedAssetURLResult:
            type: object
            properties:
                url:
                    type: string
                    description: The signed URL to access the asset
            required:
                - url
        GetSkillResult:
            type: object
            properties:
                adoption:
                    $ref: '#/components/schemas/SkillAdoption'
                assistant_count:
                    type: integer
                    description: The number of active, non-deleted assistants using the skill.
                    format: int64
                drift:
                    $ref: '#/components/schemas/SkillDrift'
                latest_version:
                    $ref: '#/components/schemas/SkillVersion'
                prompt_injection_findings:
                    type: array
                    items:
                        $ref: '#/components/schemas/SkillPromptInjectionFinding'
                    description: Open prompt-injection findings for the current skill version.
                sighting_timeline:
                    type: array
                    items:
                        $ref: '#/components/schemas/SkillSightingTimelinePoint'
                    description: Daily activations by attributed version in the adoption window.
                skill:
                    $ref: '#/components/schemas/Skill'
            description: An active skill and its current version.
            required:
                - skill
                - adoption
                - sighting_timeline
                - drift
                - assistant_count
                - prompt_injection_findings
        GetToolUsageFilterOptionsPayload:
            type: object
            properties:
                from:
                    type: string
                    description: Start time in ISO 8601 format
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                option_types:
                    type: array
                    items:
                        type: string
                        description: Tool usage filter option type
                        enum:
                            - hosted_servers
                            - shadow_servers
                            - users
                    description: Filter option types to include. Empty means all option types.
                to:
                    type: string
                    description: End time in ISO 8601 format
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
            description: Payload for target-aware MCP and tool usage filter options
            required:
                - from
                - to
        GetToolUsageFilterOptionsResult:
            type: object
            properties:
                hosted_servers:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageHostedServerFilterOption'
                    description: Hosted MCP servers with usage in the selected time range
                shadow_servers:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageShadowServerFilterOption'
                    description: Shadow MCP servers with usage in the selected time range
                users:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageUserFilterOption'
                    description: User identities with usage in the selected time range
            description: Filter options for target-aware MCP and tool usage metrics
            required:
                - hosted_servers
                - shadow_servers
                - users
        GetToolUsageSummaryPayload:
            type: object
            properties:
                account_type:
                    type: string
                    description: Optional account type filter ('team' or 'personal').
                from:
                    type: string
                    description: Start time in ISO 8601 format
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                hook_sources:
                    type: array
                    items:
                        type: string
                    description: Hook plugin sources to include. Direct hosted MCP calls have no hook source and are excluded when this filter is set.
                hosted_toolset_slugs:
                    type: array
                    items:
                        type: string
                    description: Hosted MCP toolset slugs to include
                shadow_server_names:
                    type: array
                    items:
                        type: string
                    description: Shadow MCP server names to include
                target_types:
                    type: array
                    items:
                        type: string
                        description: Tool usage target type
                        enum:
                            - hosted_mcp_server
                            - tunneled_mcp_server
                            - shadow_mcp_server
                            - local_tool
                            - skill
                    description: Target types to include. Empty means all target types.
                to:
                    type: string
                    description: End time in ISO 8601 format
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
                user_filters:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageUserFilter'
                    description: Typed user identities to include
            description: Payload for target-aware MCP and tool usage metrics
            required:
                - from
                - to
        GetToolUsageSummaryResult:
            type: object
            properties:
                target_time_series:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageTargetTimeSeriesPoint'
                    description: Time-series usage buckets grouped by target
                target_tool_breakdown:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageTargetToolBreakdownRow'
                    description: Per-tool usage rows grouped by target
                targets:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageTargetSummary'
                    description: Top usage targets for the selected filters and time range
                totals:
                    $ref: '#/components/schemas/ToolUsageTotals'
                user_time_series:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageUserTimeSeriesPoint'
                    description: Time-series usage buckets grouped by user identity
                users:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageUserSummary'
                    description: Top user identities for the selected filters and time range
                users_by_target:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageUsersByTargetRow'
                    description: Cross-dimensional usage rows grouped by target and user identity
            description: Target-aware MCP and tool usage metrics
            required:
                - totals
                - targets
                - users
                - target_time_series
                - user_time_series
                - users_by_target
                - target_tool_breakdown
        GetToolUsageTargetTimeSeriesResult:
            type: object
            properties:
                target_time_series:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageTargetTimeSeriesPoint'
                    description: Time-series usage buckets grouped by target
            description: Time-series MCP and tool usage grouped by target
            required:
                - target_time_series
        GetToolUsageTargetToolBreakdownResult:
            type: object
            properties:
                target_tool_breakdown:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageTargetToolBreakdownRow'
                    description: Per-tool usage rows grouped by target
            description: Per-tool MCP and tool usage grouped by target
            required:
                - target_tool_breakdown
        GetToolUsageTargetsResult:
            type: object
            properties:
                targets:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageTargetSummary'
                    description: Top usage targets for the selected filters and time range
            description: Top MCP and tool usage targets for the selected filters and time range
            required:
                - targets
        GetToolUsageTotalsResult:
            type: object
            properties:
                totals:
                    $ref: '#/components/schemas/ToolUsageTotals'
            description: Overall MCP and tool usage totals for the selected filters and time range
            required:
                - totals
        GetToolUsageUserTimeSeriesResult:
            type: object
            properties:
                user_time_series:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageUserTimeSeriesPoint'
                    description: Time-series usage buckets grouped by user identity
            description: Time-series MCP and tool usage grouped by user identity
            required:
                - user_time_series
        GetToolUsageUsersByTargetResult:
            type: object
            properties:
                users_by_target:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageUsersByTargetRow'
                    description: Cross-dimensional usage rows grouped by target and user identity
            description: Cross-dimensional MCP and tool usage grouped by target and user identity
            required:
                - users_by_target
        GetToolUsageUsersResult:
            type: object
            properties:
                users:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageUserSummary'
                    description: Top user identities for the selected filters and time range
            description: Top MCP and tool usage user identities for the selected filters and time range
            required:
                - users
        GetUnproxiedMcpServerClientUsageResult:
            type: object
            properties:
                clients:
                    type: array
                    items:
                        $ref: '#/components/schemas/UnproxiedMcpServerClientUsageRow'
                next_cursor:
                    type: string
                    description: Cursor for next page
            description: Result of a Shadow-MCP-backed per-client usage lookup for an unproxied MCP server
            required:
                - clients
        GetUnproxiedMcpServerToolUsageResult:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: Cursor for next page
                tools:
                    type: array
                    items:
                        $ref: '#/components/schemas/UnproxiedMcpServerToolUsageRow'
            description: Result of a Shadow-MCP-backed per-tool usage lookup for an unproxied MCP server
            required:
                - tools
        GetUnproxiedMcpServerUsageRequestBody:
            type: object
            properties:
                from:
                    type: string
                    description: Start time in ISO 8601 format
                    format: date-time
                to:
                    type: string
                    description: End time in ISO 8601 format
                    format: date-time
                url:
                    type: string
                    description: The unproxied MCP server's vendor URL
                    format: uri
            required:
                - url
                - from
                - to
        GetUnproxiedMcpServerUsageResult:
            type: object
            properties:
                buckets:
                    type: array
                    items:
                        $ref: '#/components/schemas/UnproxiedMcpServerUsageBucket'
            description: Result of a Shadow-MCP-backed usage lookup for an unproxied MCP server
            required:
                - buckets
        GetUnproxiedMcpServerUserUsageResult:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: Cursor for next page
                users:
                    type: array
                    items:
                        $ref: '#/components/schemas/UnproxiedMcpServerUserUsageRow'
            description: Result of a Shadow-MCP-backed per-user usage lookup for an unproxied MCP server
            required:
                - users
        GetUserMetricsSummaryPayload:
            type: object
            properties:
                account_type:
                    type: string
                    description: Optional account type filter ('team' or 'personal')
                event_source:
                    type: string
                    description: Optional event source filter (e.g. 'hook')
                external_org_id:
                    type: string
                    description: Optional filter to a single AI account by its provider org id; scopes metrics to that one account
                external_user_id:
                    type: string
                    description: External user ID to get metrics for (mutually exclusive with user_id)
                from:
                    type: string
                    description: Start time in ISO 8601 format
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                hook_source:
                    type: string
                    description: Optional hook source filter (e.g. 'cursor', 'claude-code')
                to:
                    type: string
                    description: End time in ISO 8601 format
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
                user_id:
                    type: string
                    description: User ID to get metrics for (mutually exclusive with external_user_id)
            description: Payload for getting user-level metrics summary
            required:
                - from
                - to
        GetUserMetricsSummaryResult:
            type: object
            properties:
                metrics:
                    $ref: '#/components/schemas/ProjectSummary'
            description: Result of user metrics summary query
            required:
                - metrics
        GlobalRemoteSessionIssuer:
            type: object
            properties:
                global_client_count:
                    type: integer
                    description: Number of non-deleted global remote_session_clients (project_id NULL, organization_id NULL) registered with this issuer. These block a delete and the platform admin can remove them here.
                    format: int64
                issuer:
                    $ref: '#/components/schemas/RemoteSessionIssuer'
                tenant_client_count:
                    type: integer
                    description: Number of non-deleted remote_session_clients owned by an organization or project that are registered with this issuer. These block a delete but only their owning organization can remove them.
                    format: int64
            description: 'A platform-administrator view of a global remote_session_issuer: the issuer plus its global and tenant-owned client counts.'
            required:
                - issuer
                - global_client_count
                - tenant_client_count
        HTTPToolDefinition:
            type: object
            properties:
                annotations:
                    $ref: '#/components/schemas/ToolAnnotations'
                asset_id:
                    type: string
                    description: The ID of the asset
                canonical:
                    $ref: '#/components/schemas/CanonicalToolAttributes'
                canonical_name:
                    type: string
                    description: The canonical name of the tool. Will be the same as the name if there is no variation.
                confirm:
                    type: string
                    description: Confirmation mode for the tool
                confirm_prompt:
                    type: string
                    description: Prompt for the confirmation
                created_at:
                    type: string
                    description: The creation date of the tool.
                    format: date-time
                default_server_url:
                    type: string
                    description: The default server URL for the tool
                deployment_id:
                    type: string
                    description: The ID of the deployment
                description:
                    type: string
                    description: Description of the tool
                http_method:
                    type: string
                    description: HTTP method for the request
                id:
                    type: string
                    description: The ID of the tool
                name:
                    type: string
                    description: The name of the tool
                openapiv3_document_id:
                    type: string
                    description: The ID of the OpenAPI v3 document
                openapiv3_operation:
                    type: string
                    description: OpenAPI v3 operation
                package_name:
                    type: string
                    description: The name of the source package
                path:
                    type: string
                    description: Path for the request
                project_id:
                    type: string
                    description: The ID of the project
                response_filter:
                    $ref: '#/components/schemas/ResponseFilter'
                schema:
                    type: string
                    description: JSON schema for the request
                schema_version:
                    type: string
                    description: Version of the schema
                security:
                    type: string
                    description: Security requirements for the underlying HTTP endpoint
                summarizer:
                    type: string
                    description: Summarizer for the tool
                summary:
                    type: string
                    description: Summary of the tool
                tags:
                    type: array
                    items:
                        type: string
                    description: The tags list for this http tool
                tool_urn:
                    type: string
                    description: The URN of this tool
                updated_at:
                    type: string
                    description: The last update date of the tool.
                    format: date-time
                variation:
                    $ref: '#/components/schemas/ToolVariation'
            description: An HTTP tool
            required:
                - summary
                - tags
                - http_method
                - path
                - schema
                - deployment_id
                - asset_id
                - id
                - project_id
                - name
                - canonical_name
                - description
                - tool_urn
                - created_at
                - updated_at
        HookIngestData:
            type: object
            properties:
                mcp:
                    $ref: '#/components/schemas/HookMCPData'
                mcp_attribution:
                    type: array
                    items:
                        $ref: '#/components/schemas/HookMCPAttributionEntry'
                    description: Transcript-derived per-request MCP attribution (Claude Stop/SubagentStop).
                mcp_inventory:
                    type: array
                    items:
                        $ref: '#/components/schemas/HookMCPData'
                    description: Configured MCP server snapshot captured at session start or configuration change. Transport credentials must be redacted by the sender.
                mcp_inventory_collected:
                    type: boolean
                    description: Whether the sender was able to read the agent's MCP server list for this session. True with an empty mcp_inventory means the agent genuinely has no servers configured; absent or false means the list could not be read (no agent binary, a failed probe) and the inventory says nothing about what the session can reach. Enforcement that treats a missing inventory as proof of absence must consult this first.
                message:
                    $ref: '#/components/schemas/HookMessageData'
                notification:
                    $ref: '#/components/schemas/HookNotificationData'
                prompt:
                    $ref: '#/components/schemas/HookPromptData'
                prompt_attachments:
                    type: array
                    items:
                        $ref: '#/components/schemas/HookPromptAttachmentEntry'
                    description: Transcript-derived prompt attachment content (Claude Stop/SubagentStop/SessionEnd).
                skill:
                    $ref: '#/components/schemas/HookSkillData'
                tool_call:
                    $ref: '#/components/schemas/HookToolCallData'
                usage:
                    $ref: '#/components/schemas/HookUsageData'
            description: Feature-specific payloads. Hooks populate only the blocks needed for the event.
        HookIngestEvent:
            type: object
            properties:
                occurred_at:
                    type: string
                    description: RFC3339 timestamp from the local agent. Defaults to receive time when absent.
                    format: date-time
                type:
                    type: string
                    description: Canonical Gram hook event type.
                    enum:
                        - session.started
                        - session.updated
                        - session.ended
                        - mcp.inventory
                        - prompt.submitted
                        - tool.requested
                        - tool.completed
                        - tool.failed
                        - assistant.responded
                        - assistant.thought
                        - usage.reported
                        - skill.activated
                        - notification.reported
            description: Canonical Gram feature event.
            required:
                - type
        HookIngestSession:
            type: object
            properties:
                cwd:
                    type: string
                    description: Current working directory when the event fired.
                id:
                    type: string
                    description: Stable conversation or session identifier.
                model:
                    type: string
                    description: Model identifier reported by the local agent.
                turn_id:
                    type: string
                    description: Generation, request, or turn identifier.
            description: Agent session and turn identity, independent of provider naming.
        HookIngestSource:
            type: object
            properties:
                adapter:
                    type: string
                    description: Stable adapter slug, e.g. claude, cursor, codex, or a customer hook name.
                adapter_version:
                    type: string
                    description: Adapter implementation version.
                hostname:
                    type: string
                    description: Hostname of the machine that emitted the hook event.
                raw_event_name:
                    type: string
                    description: Provider-native event name, if one exists.
                user_email:
                    type: string
                    description: Self-reported email of the developer on the emitting machine (device agent or provider account), used for attribution when the API key is shared org-wide.
            description: Metadata about the local hook adapter that translated a provider event into the Gram hook contract.
            required:
                - adapter
        HookMCPAttributionEntry:
            type: object
            properties:
                mcp_server:
                    type: string
                    description: Unredacted MCP server name from the transcript.
                mcp_tool:
                    type: string
                    description: Unredacted MCP tool name from the transcript.
                request_id:
                    type: string
                    description: Provider API request identifier (e.g. Claude's req_*) the attribution applies to.
            description: Transcript-derived MCP attribution for one model API request. Claude redacts user-configured MCP server names to 'custom' on its OTEL telemetry, but records the real names in the local session transcript; hooks ship them here so ingest can restore the redacted names.
            required:
                - request_id
        HookMCPData:
            type: object
            properties:
                command:
                    type: string
                    description: MCP server command, when available.
                result_json:
                    type: string
                    description: JSON-encoded MCP tool result, when reported as a string.
                server_identity:
                    type: string
                    description: Stable server identity inferred by the hook adapter.
                server_name:
                    type: string
                    description: Provider-reported MCP server name.
                url:
                    type: string
                    description: MCP server URL, when available.
            description: MCP feature payload.
        HookMessageData:
            type: object
            properties:
                duration_ms:
                    type: number
                    description: Message or thinking-block duration in milliseconds, when reported.
                    format: double
                role:
                    type: string
                    description: Message role, e.g. assistant or user.
                text:
                    type: string
                    description: Message text.
            description: Assistant/user message payload.
        HookNotificationData:
            type: object
            properties:
                message:
                    type: string
                    description: Notification message.
                title:
                    type: string
                    description: Notification title.
                type:
                    type: string
                    description: Notification type.
            description: Local agent notification payload.
        HookPromptAttachmentEntry:
            type: object
            properties:
                attachment_kind:
                    type: string
                    description: Provider attachment kind, such as file or directory.
                content:
                    type: string
                    description: Attachment text visible to the model.
                display_path:
                    type: string
                    description: Provider display path for the attachment, when available.
                entry_uuid:
                    type: string
                    description: Provider transcript entry UUID. Used as the stable attachment identifier.
                file_path:
                    type: string
                    description: Absolute provider-reported file or directory path, when available.
                num_lines:
                    type: integer
                    description: Number of lines included in the attachment window, when reported.
                    format: int64
                prompt_id:
                    type: string
                    description: Prompt identifier of the user turn this attachment belongs to, when the transcript parent chain resolves.
                prompt_sha256:
                    type: string
                    description: Lowercase hex SHA-256 of the trimmed prompt text stored for the parent user message, when available.
                start_line:
                    type: integer
                    description: First one-based source line included in the attachment window, when reported.
                    format: int64
                timestamp:
                    type: string
                    description: Provider transcript timestamp for this attachment, when available.
                total_lines:
                    type: integer
                    description: Total source file lines, when reported.
                    format: int64
            description: Transcript-derived content that a provider attached to a submitted prompt, such as Claude Code @file and @directory mentions.
            required:
                - entry_uuid
                - attachment_kind
                - content
        HookPromptData:
            type: object
            properties:
                text:
                    type: string
                    description: User prompt text.
            description: Prompt feature payload.
        HookSkillData:
            type: object
            properties:
                name:
                    type: string
                    description: Activated skill name.
                    maxLength: 256
                raw_sha256:
                    type: string
                    description: SHA-256 of the raw skill manifest, if available.
                    maxLength: 128
                source:
                    type: string
                    description: Skill source or namespace, if available.
                    maxLength: 256
                source_level:
                    type: string
                    description: Scope where the skill was resolved, if available.
                    maxLength: 64
                source_path:
                    type: string
                    description: Local path where the skill was resolved, if available.
                    maxLength: 4096
            description: Skill activation payload.
            required:
                - name
        HookSourceUsage:
            type: object
            properties:
                event_count:
                    type: integer
                    description: Total hook events for this source
                    format: int64
                source:
                    type: string
                    description: Hook source (from attributes.gram.hook.source)
            description: Hook source usage statistics
            required:
                - source
                - event_count
        HookToolCallData:
            type: object
            properties:
                duration_ms:
                    type: number
                    description: Tool execution duration in milliseconds, when reported.
                    format: double
                error:
                    description: Tool error payload.
                id:
                    type: string
                    description: Provider tool call identifier.
                input:
                    description: Tool input payload.
                is_interrupt:
                    type: boolean
                    description: Whether the failure was caused by user interruption.
                name:
                    type: string
                    description: Tool name.
                output:
                    description: Tool output payload.
                permission_type:
                    type: string
                    description: Permission type requested by the agent, when applicable.
                status:
                    type: string
                    description: Provider-reported tool call status, when available.
            description: Tool call feature payload.
        HookTraceSummary:
            type: object
            properties:
                block_reason:
                    type: string
                    description: Reason set when hook_status is 'blocked' (e.g. shadow-MCP guard rejection)
                event_source:
                    type: string
                    description: Event source (from materialized column)
                gram_urn:
                    type: string
                    description: Gram URN associated with this hook trace
                hook_source:
                    type: string
                    description: Hook source (from attributes.gram.hook.source)
                hook_status:
                    type: string
                    description: Hook execution status
                    enum:
                        - success
                        - failure
                        - pending
                        - blocked
                log_count:
                    type: integer
                    description: Total number of logs in this trace
                    format: int64
                skill_name:
                    type: string
                    description: Skill name (from materialized column, only for Skill tool)
                start_time_unix_nano:
                    type: string
                    description: Earliest log timestamp in Unix nanoseconds (string for JS int64 precision)
                tool_name:
                    type: string
                    description: Tool name (from materialized column)
                tool_source:
                    type: string
                    description: Tool call source (from materialized column)
                trace_id:
                    type: string
                    description: Trace ID (32 hex characters)
                    pattern: ^[a-f0-9]{32}$
                user_email:
                    type: string
                    description: User email (from attributes.user.email)
            description: Summary information for a hook trace
            required:
                - trace_id
                - start_time_unix_nano
                - log_count
                - gram_urn
        HookUsageData:
            type: object
            properties:
                cache_read_tokens:
                    type: integer
                    description: Cache read token count.
                    format: int64
                cache_write_tokens:
                    type: integer
                    description: Cache write token count.
                    format: int64
                cost:
                    type: number
                    description: Reported cost.
                    format: double
                input_tokens:
                    type: integer
                    description: Input token count.
                    format: int64
                loop_count:
                    type: integer
                    description: Agent loop count, when reported.
                    format: int64
                output_tokens:
                    type: integer
                    description: Output token count.
                    format: int64
                status:
                    type: string
                    description: Provider-reported usage or session status, when available.
            description: Token and cost usage payload.
        HooksBreakdownRow:
            type: object
            properties:
                event_count:
                    type: integer
                    description: Total events for this combination
                    format: int64
                failure_count:
                    type: integer
                    description: Number of failures for this combination
                    format: int64
                hook_source:
                    type: string
                    description: Hook source (e.g. claude-desktop, cursor)
                server_name:
                    type: string
                    description: Server name ('local' for non-MCP tools)
                tool_name:
                    type: string
                    description: Tool name
                user_email:
                    type: string
                    description: User email address
            description: 'Cross-dimensional aggregation row: one entry per unique (user, server, hook_source, tool) combination'
            required:
                - user_email
                - server_name
                - hook_source
                - tool_name
                - event_count
                - failure_count
        HooksServerSummary:
            type: object
            properties:
                event_count:
                    type: integer
                    description: Total number of hook events for this server
                    format: int64
                failure_count:
                    type: integer
                    description: Number of failed tool completions (PostToolUseFailure events)
                    format: int64
                failure_rate:
                    type: number
                    description: Failure rate as a decimal (0.0 to 1.0)
                    format: double
                server_name:
                    type: string
                    description: Server name (extracted from tool name, or 'local' for non-MCP tools)
                success_count:
                    type: integer
                    description: Number of successful tool completions (PostToolUse events)
                    format: int64
                unique_tools:
                    type: integer
                    description: Number of unique tools used for this server
                    format: int64
            description: Aggregated hooks metrics for a single server
            required:
                - server_name
                - event_count
                - unique_tools
                - success_count
                - failure_count
                - failure_rate
        HooksTimeSeriesPoint:
            type: object
            properties:
                bucket_start_ns:
                    type: string
                    description: Bucket start time in Unix nanoseconds (string for JS int64 precision)
                event_count:
                    type: integer
                    description: Number of events in this bucket
                    format: int64
                failure_count:
                    type: integer
                    description: Number of failed hook events in this bucket
                    format: int64
                server_name:
                    type: string
                    description: Server name
                user_email:
                    type: string
                    description: User email address
            description: A single time-series bucket for hooks activity
            required:
                - bucket_start_ns
                - server_name
                - user_email
                - event_count
                - failure_count
        HooksUserSummary:
            type: object
            properties:
                event_count:
                    type: integer
                    description: Total number of hook events for this user
                    format: int64
                failure_count:
                    type: integer
                    description: Number of failed tool completions (PostToolUseFailure events)
                    format: int64
                failure_rate:
                    type: number
                    description: Failure rate as a decimal (0.0 to 1.0)
                    format: double
                success_count:
                    type: integer
                    description: Number of successful tool completions (PostToolUse events)
                    format: int64
                unique_tools:
                    type: integer
                    description: Number of unique tools used by this user
                    format: int64
                user_email:
                    type: string
                    description: User email address
            description: Aggregated hooks metrics for a single user
            required:
                - user_email
                - event_count
                - unique_tools
                - success_count
                - failure_count
                - failure_rate
        InferenceSpendCap:
            type: object
            properties:
                credits_used:
                    type: number
                    description: Monthly usage in USD
                    format: double
                disabled:
                    type: boolean
                    description: Whether the platform-managed key is disabled
                key_type:
                    type: string
                    description: The platform-managed inference function
                    enum:
                        - chat
                        - internal
                monthly_credits:
                    type: integer
                    description: The enforced monthly spend cap in USD
                    format: int64
            required:
                - key_type
                - credits_used
                - monthly_credits
                - disabled
        InfoResponseBody:
            type: object
            properties:
                active_organization_id:
                    type: string
                gram_account_type:
                    type: string
                has_active_subscription:
                    type: boolean
                    description: Whether the organization has an active billing subscription
                impersonator_email:
                    type: string
                    description: The WorkOS Dashboard operator who initiated this impersonation session. Empty for ordinary authentication.
                is_admin:
                    type: boolean
                organizations:
                    type: array
                    items:
                        $ref: '#/components/schemas/OrganizationEntry'
                trial:
                    $ref: '#/components/schemas/Trial'
                user_display_name:
                    type: string
                user_email:
                    type: string
                user_id:
                    type: string
                user_photo_url:
                    type: string
                user_signature:
                    type: string
                whitelisted:
                    type: boolean
                    description: Whether the organization is whitelisted to access the platform
            required:
                - user_id
                - user_email
                - is_admin
                - active_organization_id
                - organizations
                - gram_account_type
                - has_active_subscription
                - whitelisted
        IngestHookPayload:
            type: object
            properties:
                data:
                    $ref: '#/components/schemas/HookIngestData'
                event:
                    $ref: '#/components/schemas/HookIngestEvent'
                idempotency_key:
                    type: string
                    description: Optional per-invocation token reused across retries so the server stores a redelivered event exactly once.
                raw:
                    description: Original provider payload for debugging. The backend does not use this for feature behavior.
                schema_version:
                    type: string
                    description: Contract version. The current version is hook.ingest.v1.
                session:
                    $ref: '#/components/schemas/HookIngestSession'
                source:
                    $ref: '#/components/schemas/HookIngestSource'
            description: Feature-first unified hook event payload.
            required:
                - schema_version
                - source
                - event
        IngestHookResult:
            type: object
            properties:
                decision:
                    type: string
                    description: Whether the local hook should allow or deny the action.
                    enum:
                        - allow
                        - deny
                effects:
                    type: object
                    description: Optional side-effect hints for hook SDKs.
                    additionalProperties: true
                message:
                    type: string
                    description: User-facing decision message.
                reason:
                    type: string
                    description: Machine-readable decision reason.
            description: Provider-neutral decision returned by the unified hook endpoint.
            required:
                - decision
        IngestRequestBody:
            type: object
            properties:
                data:
                    $ref: '#/components/schemas/HookIngestData'
                event:
                    $ref: '#/components/schemas/HookIngestEvent'
                raw:
                    description: Original provider payload for debugging. The backend does not use this for feature behavior.
                schema_version:
                    type: string
                    description: Contract version. The current version is hook.ingest.v1.
                session:
                    $ref: '#/components/schemas/HookIngestSession'
                source:
                    $ref: '#/components/schemas/HookIngestSource'
            required:
                - schema_version
                - source
                - event
        IngestRequestBody2:
            type: object
            properties:
                additional_provider_specific_params:
                    type: object
                    additionalProperties: true
                images:
                    type: array
                    items:
                        type: string
                input_type:
                    type: string
                    enum:
                        - request
                        - response
                litellm_call_id:
                    type: string
                litellm_trace_id:
                    type: string
                litellm_version:
                    type: string
                model:
                    type: string
                request_data:
                    $ref: '#/components/schemas/LiteLLMRequestData'
                request_headers:
                    type: object
                    additionalProperties:
                        type: string
                structured_messages:
                    type: array
                    items:
                        $ref: '#/components/schemas/LiteLLMStructuredMessage'
                texts:
                    type: array
                    items:
                        type: string
                tool_calls:
                    type: array
                    items: {}
                tools:
                    type: array
                    items: {}
            required:
                - input_type
                - request_data
        InstanceMcpServer:
            type: object
            properties:
                url:
                    type: string
                    description: The address of the MCP server
            required:
                - url
        Integration:
            type: object
            properties:
                package_description:
                    type: string
                package_description_raw:
                    type: string
                package_id:
                    type: string
                package_image_asset_id:
                    type: string
                package_keywords:
                    type: array
                    items:
                        type: string
                package_name:
                    type: string
                package_summary:
                    type: string
                package_title:
                    type: string
                package_url:
                    type: string
                tool_names:
                    type: array
                    items:
                        type: string
                version:
                    type: string
                    description: The latest version of the integration
                version_created_at:
                    type: string
                    format: date-time
                versions:
                    type: array
                    items:
                        $ref: '#/components/schemas/IntegrationVersion'
            required:
                - package_id
                - package_name
                - package_title
                - package_summary
                - version
                - version_created_at
                - tool_names
        IntegrationEntry:
            type: object
            properties:
                package_id:
                    type: string
                package_image_asset_id:
                    type: string
                package_keywords:
                    type: array
                    items:
                        type: string
                package_name:
                    type: string
                package_summary:
                    type: string
                package_title:
                    type: string
                package_url:
                    type: string
                tool_names:
                    type: array
                    items:
                        type: string
                version:
                    type: string
                version_created_at:
                    type: string
                    format: date-time
            required:
                - package_id
                - package_name
                - version
                - version_created_at
                - tool_names
        IntegrationVersion:
            type: object
            properties:
                created_at:
                    type: string
                    format: date-time
                version:
                    type: string
            required:
                - version
                - created_at
        IssuerConvergenceCandidate:
            type: object
            properties:
                client_count:
                    type: integer
                    description: Number of non-deleted remote_session_clients that would move onto the target issuer.
                    format: int64
                endpoint_mismatches:
                    type: array
                    items:
                        type: string
                    description: Names of the authorization-server metadata fields (issuer, token_endpoint, authorization_endpoint) that differ from the target. Non-empty blocks the migration.
                issuer:
                    $ref: '#/components/schemas/RemoteSessionIssuer'
                organization_id:
                    type: string
                    description: The organization that owns the candidate. Empty for a legacy project-scoped issuer written before this column existed.
                organization_name:
                    type: string
                    description: Display name of the owning organization. Empty when the organization has no synced metadata.
                warnings:
                    type: array
                    items:
                        type: string
                    description: Non-blocking divergences (oidc, passthrough, scopes_supported). The target issuer's values become authoritative for the migrated clients.
            description: An organization- or project-level remote_session_issuer that names the same upstream authorization server as a global issuer, and so could be consolidated onto it.
            required:
                - issuer
                - organization_id
                - organization_name
                - client_count
                - endpoint_mismatches
                - warnings
        IssuerMigratePreflight:
            type: object
            properties:
                can_migrate:
                    type: boolean
                    description: 'TRUE when the migration would succeed: no endpoint mismatches and no conflicting MCP-server bindings.'
                client_count:
                    type: integer
                    description: Number of non-deleted remote_session_clients that would be re-pointed from the source issuer to the target issuer.
                    format: int64
                conflicting_mcp_server_names:
                    type: array
                    items:
                        type: string
                    description: Display names of MCP servers where both the source and the target issuer already have a client bound. Non-empty blocks the migration; detach one client per listed server and retry.
                endpoint_mismatches:
                    type: array
                    items:
                        type: string
                    description: Names of the authorization-server metadata fields (issuer, token_endpoint, authorization_endpoint) that differ between source and target. Non-empty blocks the migration.
                mcp_server_names:
                    type: array
                    items:
                        type: string
                    description: Display names of MCP servers attached to the source issuer's clients.
                target_tenant_client_count:
                    type: integer
                    description: Number of tenant-owned remote_session_clients already registered with the target issuer, BEFORE this migration. Any non-zero value blocks deleting the target issuer, and only the owning organizations can clear it, so a successful migration is effectively one-way.
                    format: int64
                warnings:
                    type: array
                    items:
                        type: string
                    description: Non-blocking divergences (oidc, passthrough, scopes_supported). The target issuer's values become authoritative for the migrated clients.
            description: 'Authoritative impact summary for consolidating a tenant remote_session_issuer onto a global one: how many clients move, which MCP servers are affected, every blocker that would make the migration fail, and how many tenant-owned clients the target already carries.'
            required:
                - client_count
                - mcp_server_names
                - endpoint_mismatches
                - conflicting_mcp_server_names
                - warnings
                - can_migrate
                - target_tenant_client_count
        Key:
            type: object
            properties:
                created_at:
                    type: string
                    description: The creation date of the key.
                    format: date-time
                created_by_user_id:
                    type: string
                    description: The ID of the user who created this key
                id:
                    type: string
                    description: The ID of the key
                key:
                    type: string
                    description: The token of the api key (only returned on key creation)
                key_prefix:
                    type: string
                    description: The store prefix of the api key for recognition
                last_accessed_at:
                    type: string
                    description: When the key was last accessed.
                    format: date-time
                name:
                    type: string
                    description: The name of the key
                organization_id:
                    type: string
                    description: The organization ID this key belongs to
                project_id:
                    type: string
                    description: The optional project ID this key is scoped to
                scopes:
                    type: array
                    items:
                        type: string
                    description: List of permission scopes for this key
                updated_at:
                    type: string
                    description: When the key was last updated.
                    format: date-time
            required:
                - id
                - organization_id
                - created_by_user_id
                - name
                - key_prefix
                - scopes
                - created_at
                - updated_at
        LLMClientUsage:
            type: object
            properties:
                activity_count:
                    type: integer
                    description: Number of messages (session mode) or tool calls (tool_call mode)
                    format: int64
                client_name:
                    type: string
                    description: Client/agent name (e.g., 'cursor', 'claude-code', 'cowork')
            description: Usage breakdown by LLM client/agent
            required:
                - client_name
                - activity_count
        ListAIIntegrationSchedulesResult:
            type: object
            properties:
                organization_id:
                    type: string
                    description: Organization the schedules belong to.
                provider:
                    type: string
                    description: AI provider identifier.
                schedules:
                    type: array
                    items:
                        $ref: '#/components/schemas/AIIntegrationScheduleState'
                    description: Scheduler state for each of the provider's sync schedules.
            description: Sync schedules for one provider integration. Empty when no config is set for the provider.
            required:
                - organization_id
                - provider
                - schedules
        ListActorAttributesResult:
            type: object
            properties:
                attributes:
                    type: array
                    items:
                        $ref: '#/components/schemas/ActorAttribute'
                    description: The member attributes available to target conditions, in editor display order.
            required:
                - attributes
        ListAllowedOriginsResult:
            type: object
            properties:
                allowed_origins:
                    type: array
                    items:
                        $ref: '#/components/schemas/AllowedOrigin'
                    description: The list of allowed origins
            required:
                - allowed_origins
        ListApprovalRequestsResult:
            type: object
            properties:
                requests:
                    type: array
                    items:
                        $ref: '#/components/schemas/ApprovalRequestSummary'
                    description: The list of approval requests
            description: A page of the approval queue.
            required:
                - requests
        ListAssetsResult:
            type: object
            properties:
                assets:
                    type: array
                    items:
                        $ref: '#/components/schemas/Asset'
                    description: The list of assets
            required:
                - assets
        ListAssistantMemoriesResult:
            type: object
            properties:
                memories:
                    type: array
                    items:
                        $ref: '#/components/schemas/AssistantMemory'
                    description: Assistant memories matching the query.
                next_cursor:
                    type: string
                    description: The cursor to be used for the next page of results.
            required:
                - memories
        ListAssistantsResult:
            type: object
            properties:
                assistants:
                    type: array
                    items:
                        $ref: '#/components/schemas/Assistant'
                    description: Assistants for the current project.
            required:
                - assistants
        ListAttributeKeysPayload:
            type: object
            properties:
                from:
                    type: string
                    description: Start time in ISO 8601 format
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                to:
                    type: string
                    description: End time in ISO 8601 format
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
            description: Payload for listing distinct attribute keys available for filtering
            required:
                - from
                - to
        ListAttributeKeysResult:
            type: object
            properties:
                keys:
                    type: array
                    items:
                        type: string
                    description: Distinct attribute keys. User attributes are prefixed with @
            description: Result of listing distinct attribute keys
            required:
                - keys
        ListAuditLogFacetsForm:
            type: object
            properties:
                project_slug:
                    type: string
                    description: Project slug to filter facet values to a specific project.
        ListAuditLogFacetsResult:
            type: object
            properties:
                actions:
                    type: array
                    items:
                        $ref: '#/components/schemas/AuditLogFacetOption'
                    description: Available action facets
                actors:
                    type: array
                    items:
                        $ref: '#/components/schemas/AuditLogFacetOption'
                    description: Available actor facets
                surfaces:
                    type: array
                    items:
                        $ref: '#/components/schemas/AuditLogFacetOption'
                    description: Available acting surface facets
            required:
                - actors
                - actions
                - surfaces
        ListAuditLogsForm:
            type: object
            properties:
                acting_surface:
                    type: string
                    description: Acting surface to filter audit logs to changes made through one surface, e.g. 'platform_mcp' to review agent-driven activity alone.
                action:
                    type: string
                    description: Action to filter audit logs to a specific action.
                actor_id:
                    type: string
                    description: Actor ID to filter audit logs to a specific actor.
                cursor:
                    type: string
                    description: The cursor for paginating through audit logs.
                project_slug:
                    type: string
                    description: Project slug to filter audit logs to a specific project.
                subject_id:
                    type: string
                    description: Subject ID to filter audit logs to a specific subject (e.g. a single assistant).
                subject_type:
                    type: string
                    description: Subject type to filter audit logs to a specific kind of subject. When omitted, assistant activity events are excluded; pass 'assistant' to list them.
        ListAuditLogsResult:
            type: object
            properties:
                logs:
                    type: array
                    items:
                        $ref: '#/components/schemas/AuditLog'
                    description: List of audit logs
                next_cursor:
                    type: string
                    description: The cursor to be used for the next page of results.
            required:
                - logs
        ListBuiltinExclusionsResult:
            type: object
            properties:
                categories:
                    type: array
                    items:
                        $ref: '#/components/schemas/BuiltinExclusionCategory'
                    description: The library grouped by category.
                version:
                    type: string
                    description: Catalog checksum/version, for provenance.
            required:
                - version
                - categories
        ListBusinessMemoriesResponseBody:
            type: object
            properties:
                memories:
                    type: array
                    items:
                        $ref: '#/components/schemas/BusinessMemory'
                next_cursor:
                    type: string
            required:
                - memories
        ListBusinessMemoryContentScopesResponseBody:
            type: object
            properties:
                nodes:
                    type: array
                    items:
                        $ref: '#/components/schemas/BusinessMemoryContentScopeNode'
                    description: Namespace and exact-tag nodes in lexical order.
                total_memories:
                    type: integer
                    description: Total number of active memories, including memories without a content scope.
                    format: int64
            required:
                - nodes
                - total_memories
        ListCatalogResponseBody:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: Pagination cursor for the next page
                servers:
                    type: array
                    items:
                        $ref: '#/components/schemas/ExternalMCPServerEntry'
                    description: List of available MCP servers
            required:
                - servers
        ListChallengeBucketsResult:
            type: object
            properties:
                buckets:
                    type: array
                    items:
                        $ref: '#/components/schemas/ChallengeBucket'
                    description: The challenge buckets.
                total:
                    type: integer
                    description: Total number of matching buckets for pagination.
                    format: int64
            required:
                - buckets
                - total
        ListChallengesResult:
            type: object
            properties:
                challenges:
                    type: array
                    items:
                        $ref: '#/components/schemas/AuthzChallenge'
                    description: The challenge events.
                total:
                    type: integer
                    description: Total number of matching challenges for pagination.
                    format: int64
            required:
                - challenges
                - total
        ListChatsResult:
            type: object
            properties:
                chats:
                    type: array
                    items:
                        $ref: '#/components/schemas/ChatOverview'
                    description: The list of chats
                total:
                    type: integer
                    description: Total number of chats (before pagination)
                    format: int64
            required:
                - chats
                - total
        ListCimdClientPresetsResult:
            type: object
            properties:
                items:
                    type: array
                    items:
                        $ref: '#/components/schemas/CimdClientPreset'
            description: Result type for listing the CIMD preset catalog.
            required:
                - items
        ListCustomDetectionRulesResult:
            type: object
            properties:
                rules:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskCustomDetectionRule'
                    description: The list of custom detection rules.
            required:
                - rules
        ListCustomDomainMcpEndpointsResult:
            type: object
            properties:
                mcp_endpoints:
                    type: array
                    items:
                        $ref: '#/components/schemas/CustomDomainMcpEndpoint'
            description: Result of listing the MCP endpoints registered under an organization's custom domain.
            required:
                - mcp_endpoints
        ListCustomDomainsResult:
            type: object
            properties:
                domains:
                    type: array
                    items:
                        $ref: '#/components/schemas/CustomDomain'
            description: Result of listing an organization's custom domains.
            required:
                - domains
        ListDeploymentForm:
            type: object
            properties:
                cursor:
                    type: string
                    description: The cursor to fetch results from
        ListDeploymentResult:
            type: object
            properties:
                items:
                    type: array
                    items:
                        $ref: '#/components/schemas/DeploymentSummary'
                    description: A list of deployments
                next_cursor:
                    type: string
                    description: The cursor to fetch results from
                    example: 01jp3f054qc02gbcmpp0qmyzed
            required:
                - items
        ListDeviceIntegrationProvidersResult:
            type: object
            properties:
                providers:
                    type: array
                    items:
                        $ref: '#/components/schemas/DeviceIntegrationProvider'
                    description: Every available provider, sorted by id.
            required:
                - providers
        ListDeviceIntegrationSchedulesResult:
            type: object
            properties:
                organization_id:
                    type: string
                    description: Organization the schedules belong to.
                provider:
                    type: string
                    description: Provider identifier.
                schedules:
                    type: array
                    items:
                        $ref: '#/components/schemas/DeviceIntegrationScheduleState'
                    description: State for each of the provider's sync schedules.
            description: Sync schedules for one provider integration. Empty when no config is set for the provider.
            required:
                - organization_id
                - provider
                - schedules
        ListEnvironmentsResult:
            type: object
            properties:
                environments:
                    type: array
                    items:
                        $ref: '#/components/schemas/Environment'
            description: Result type for listing environments
            required:
                - environments
        ListExternalCredentialsResult:
            type: object
            properties:
                credentials:
                    type: array
                    items:
                        $ref: '#/components/schemas/ExternalCredentialSummary'
                    description: The organization's external credentials.
            required:
                - credentials
        ListExternalKeysResult:
            type: object
            properties:
                keys:
                    type: array
                    items:
                        $ref: '#/components/schemas/ExternalKeySummary'
                    description: The organization's external keys.
            required:
                - keys
        ListFilterOptionsPayload:
            type: object
            properties:
                event_source:
                    type: string
                    description: Optional event source filter for the option list
                filter_type:
                    type: string
                    description: Type of filter to list options for
                    enum:
                        - api_key
                        - user
                        - internal_user
                        - agent
                from:
                    type: string
                    description: Start time in ISO 8601 format
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                to:
                    type: string
                    description: End time in ISO 8601 format
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
            description: Payload for listing filter options
            required:
                - from
                - to
                - filter_type
        ListFilterOptionsResult:
            type: object
            properties:
                options:
                    type: array
                    items:
                        $ref: '#/components/schemas/FilterOption'
                    description: List of filter options
            description: Result of listing filter options
            required:
                - options
        ListGlobalRemoteSessionIssuersResult:
            type: object
            properties:
                items:
                    type: array
                    items:
                        $ref: '#/components/schemas/GlobalRemoteSessionIssuer'
                next_cursor:
                    type: string
                    description: Cursor for the next page; empty when exhausted.
            description: Result type for the platform-administrator global issuer listing.
            required:
                - items
        ListHooksTracesPayload:
            type: object
            properties:
                cursor:
                    type: string
                    description: Cursor for pagination (trace_id)
                filters:
                    type: array
                    items:
                        $ref: '#/components/schemas/LogFilter'
                    description: Filter conditions for the search query
                from:
                    type: string
                    description: Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                limit:
                    type: integer
                    description: Number of items to return (1-1000)
                    default: 50
                    format: int64
                    minimum: 1
                    maximum: 1000
                sort:
                    type: string
                    description: Sort order
                    default: desc
                    enum:
                        - asc
                        - desc
                to:
                    type: string
                    description: End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
                types_to_include:
                    type: array
                    items:
                        type: string
                        enum:
                            - mcp
                            - local
                            - skill
                    description: Hook types to include (mcp, local, skill). If empty or not provided, includes all types.
                    example:
                        - mcp
                        - skill
            description: Payload for listing hook traces
            required:
                - from
                - to
        ListHooksTracesResult:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: Cursor for next page
                traces:
                    type: array
                    items:
                        $ref: '#/components/schemas/HookTraceSummary'
                    description: List of hook trace summaries
            description: Result of listing hook traces
            required:
                - traces
        ListInstancesResponseBody:
            type: object
            properties:
                instances:
                    type: array
                    items:
                        $ref: '#/components/schemas/LiteLLMInstance'
            required:
                - instances
        ListIntegrationsForm:
            type: object
            properties:
                keywords:
                    type: array
                    items:
                        type: string
                        maxLength: 20
                    description: Keywords to filter integrations by
        ListIntegrationsResult:
            type: object
            properties:
                integrations:
                    type: array
                    items:
                        $ref: '#/components/schemas/IntegrationEntry'
                    description: List of available third-party integrations
        ListInvitesResult:
            type: object
            properties:
                invitations:
                    type: array
                    items:
                        $ref: '#/components/schemas/OrganizationInvitation'
                    description: Pending invitations for the organization only; accepted, expired, and revoked invitations are omitted.
            required:
                - invitations
        ListIssuerConvergenceCandidatesResult:
            type: object
            properties:
                items:
                    type: array
                    items:
                        $ref: '#/components/schemas/IssuerConvergenceCandidate'
                next_cursor:
                    type: string
                    description: Cursor for the next page; empty when exhausted.
            description: Result type for the platform-administrator convergence-candidate listing.
            required:
                - items
        ListKeysResponseBody:
            type: object
            properties:
                keys:
                    type: array
                    items:
                        $ref: '#/components/schemas/ModelProviderKey'
                    description: The model provider keys configured for the project.
            required:
                - keys
        ListKeysResponseBody2:
            type: object
            properties:
                keys:
                    type: array
                    items:
                        $ref: '#/components/schemas/AdminOpenRouterKey'
                    description: Every live platform OpenRouter key, ordered by organization slug then key type.
            required:
                - keys
        ListKeysResult:
            type: object
            properties:
                keys:
                    type: array
                    items:
                        $ref: '#/components/schemas/Key'
            required:
                - keys
        ListManagedDevicesResult:
            type: object
            properties:
                devices:
                    type: array
                    items:
                        $ref: '#/components/schemas/ManagedDevice'
                    description: Devices, newest first.
                next_cursor:
                    type: string
                    description: Cursor for the next page. Omitted on the last page.
            required:
                - devices
        ListMcpEndpointsResult:
            type: object
            properties:
                mcp_endpoints:
                    type: array
                    items:
                        $ref: '#/components/schemas/McpEndpoint'
            description: Result type for listing MCP endpoints
            required:
                - mcp_endpoints
        ListMcpServersResult:
            type: object
            properties:
                mcp_servers:
                    type: array
                    items:
                        $ref: '#/components/schemas/McpServer'
            description: Result type for listing MCP servers
            required:
                - mcp_servers
        ListMembersResult:
            type: object
            properties:
                members:
                    type: array
                    items:
                        $ref: '#/components/schemas/AccessMember'
                    description: The members in your organization.
            required:
                - members
        ListOrganizationMcpServersResult:
            type: object
            properties:
                items:
                    type: array
                    items:
                        $ref: '#/components/schemas/OrganizationMcpServer'
            description: Result type for the MCP servers attached to a remote_session_client.
            required:
                - items
        ListOrganizationRemoteSessionClientsResult:
            type: object
            properties:
                items:
                    type: array
                    items:
                        $ref: '#/components/schemas/OrganizationRemoteSessionClient'
                next_cursor:
                    type: string
                    description: Cursor for the next page; empty when exhausted.
            description: Result type for the organization-administrator client listing for a single issuer.
            required:
                - items
        ListOrganizationRemoteSessionIssuersResult:
            type: object
            properties:
                items:
                    type: array
                    items:
                        $ref: '#/components/schemas/OrganizationRemoteSessionIssuer'
                next_cursor:
                    type: string
                    description: Cursor for the next page; empty when exhausted.
            description: Result type for the organization-administrator issuer listing — organizational and project-specific issuers across the org.
            required:
                - items
        ListOrganizationRemoteSessionsResult:
            type: object
            properties:
                items:
                    type: array
                    items:
                        $ref: '#/components/schemas/RemoteSession'
                next_cursor:
                    type: string
                    description: Cursor for the next page; empty when exhausted.
            description: Result type for the remote_sessions minted against a remote_session_client.
            required:
                - items
        ListPackagesResult:
            type: object
            properties:
                packages:
                    type: array
                    items:
                        $ref: '#/components/schemas/Package'
                    description: The list of packages
            required:
                - packages
        ListPluginsResult:
            type: object
            properties:
                plugins:
                    type: array
                    items:
                        $ref: '#/components/schemas/Plugin'
                    description: The plugins in the organization.
            required:
                - plugins
        ListProjectsPayload:
            type: object
            properties:
                apikey_token:
                    type: string
                organization_id:
                    type: string
                    description: The ID of the organization to list projects for
                session_token:
                    type: string
            required:
                - organization_id
        ListProjectsResult:
            type: object
            properties:
                projects:
                    type: array
                    items:
                        $ref: '#/components/schemas/ProjectEntry'
                    description: The list of projects
            required:
                - projects
        ListPromptTemplatesResult:
            type: object
            properties:
                templates:
                    type: array
                    items:
                        $ref: '#/components/schemas/PromptTemplate'
                    description: The created prompt template
            required:
                - templates
        ListRegistriesResponseBody:
            type: object
            properties:
                registries:
                    type: array
                    items:
                        $ref: '#/components/schemas/MCPRegistry'
                    description: List of MCP registries
            required:
                - registries
        ListRemoteSessionClientsResult:
            type: object
            properties:
                items:
                    type: array
                    items:
                        $ref: '#/components/schemas/RemoteSessionClient'
                next_cursor:
                    type: string
                    description: Cursor for the next page; empty when exhausted.
            description: Result type for listing remote_session_clients.
            required:
                - items
        ListRemoteSessionIssuersResult:
            type: object
            properties:
                items:
                    type: array
                    items:
                        $ref: '#/components/schemas/RemoteSessionIssuer'
                next_cursor:
                    type: string
                    description: Cursor for the next page; empty when exhausted.
            description: Result type for listing remote_session_issuers.
            required:
                - items
        ListRemoteSessionsResult:
            type: object
            properties:
                items:
                    type: array
                    items:
                        $ref: '#/components/schemas/RemoteSession'
                next_cursor:
                    type: string
                    description: Cursor for the next page; empty when exhausted.
            description: Result type for listing remote_sessions.
            required:
                - items
        ListResourcesResult:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: The cursor to fetch results from
                resources:
                    type: array
                    items:
                        $ref: '#/components/schemas/Resource'
                    description: The list of resources
            required:
                - resources
        ListResponseBody:
            type: object
            properties:
                collections:
                    type: array
                    items:
                        $ref: '#/components/schemas/MCPCollection'
                    description: List of collections
            required:
                - collections
        ListRiskEvalReviewsResult:
            type: object
            properties:
                reviews:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskPolicyEvalReview'
                    description: The active review set for the policy.
            required:
                - reviews
        ListRiskExclusionsResult:
            type: object
            properties:
                exclusions:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskExclusion'
                    description: The list of risk exclusions.
            required:
                - exclusions
        ListRiskPoliciesResult:
            type: object
            properties:
                policies:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskPolicy'
                    description: The list of risk policies.
            required:
                - policies
        ListRiskPolicyBypassRequestsResult:
            type: object
            properties:
                requests:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskPolicyBypassRequest'
                    description: Current risk policy bypass request records.
            required:
                - requests
        ListRiskResultsByChatResult:
            type: object
            properties:
                chats:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskChatSummary'
                    description: Risk results grouped by chat.
                next_cursor:
                    type: string
                    description: Cursor for the next page of results.
            required:
                - chats
        ListRiskResultsForAgentResult:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: Cursor for the next page of results.
                results:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskResultRedacted'
                    description: The list of risk results with match content redacted to opaque fingerprints.
                total_count:
                    type: integer
                    description: Total number of findings across all enabled policies.
                    format: int64
            required:
                - results
                - total_count
        ListRiskResultsResult:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: Cursor for the next page of results.
                results:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskResult'
                    description: The list of risk results.
                total_count:
                    type: integer
                    description: Total number of findings across all enabled policies.
                    format: int64
            required:
                - results
                - total_count
        ListRoleGrant:
            type: object
            properties:
                scope:
                    type: string
                    description: The scope slug this grant applies to.
                    enum:
                        - org:read
                        - org:blocked_read
                        - org:admin
                        - org:blocked_admin
                        - project:read
                        - project:blocked_read
                        - project:write
                        - project:blocked_write
                        - mcp:read
                        - mcp:blocked_read
                        - mcp:write
                        - mcp:blocked_write
                        - mcp:connect
                        - mcp:blocked_connect
                        - environment:read
                        - environment:blocked_read
                        - environment:write
                        - environment:blocked_write
                        - skill:read
                        - skill:blocked_read
                        - skill:write
                        - skill:blocked_write
                        - risk_policy:evaluate
                        - risk_policy:bypass
                        - risk_policy:block
                        - chat:read
                        - chat:write
                selectors:
                    type: array
                    items:
                        $ref: '#/components/schemas/Selector'
                    description: Selector constraints. Null means unrestricted.
                sub_scopes:
                    type: array
                    items:
                        type: string
                        enum:
                            - org:read
                            - org:blocked_read
                            - org:admin
                            - org:blocked_admin
                            - project:read
                            - project:blocked_read
                            - project:write
                            - project:blocked_write
                            - mcp:read
                            - mcp:blocked_read
                            - mcp:write
                            - mcp:blocked_write
                            - mcp:connect
                            - mcp:blocked_connect
                            - environment:read
                            - environment:blocked_read
                            - environment:write
                            - environment:blocked_write
                            - skill:read
                            - skill:blocked_read
                            - skill:write
                            - skill:blocked_write
                            - risk_policy:evaluate
                            - risk_policy:bypass
                            - risk_policy:block
                            - chat:read
                            - chat:write
                    description: The inherited scopes the primary scope grants.
            required:
                - scope
        ListRolesResult:
            type: object
            properties:
                roles:
                    type: array
                    items:
                        $ref: '#/components/schemas/Role'
                    description: The roles in your organization.
            required:
                - roles
        ListScopesResult:
            type: object
            properties:
                scopes:
                    type: array
                    items:
                        $ref: '#/components/schemas/ScopeDefinition'
                    description: The scopes available in access control.
            required:
                - scopes
        ListServerHeadersResult:
            type: object
            properties:
                headers:
                    type: array
                    items:
                        $ref: '#/components/schemas/RemoteMcpServerHeader'
            description: Result type for listing the headers of a remote MCP server
            required:
                - headers
        ListServersResponseBody:
            type: object
            properties:
                servers:
                    type: array
                    items:
                        $ref: '#/components/schemas/ExternalMCPServer'
                    description: List of available MCP servers
            required:
                - servers
        ListServersResult:
            type: object
            properties:
                remote_mcp_servers:
                    type: array
                    items:
                        $ref: '#/components/schemas/RemoteMcpServer'
            description: Result type for listing remote MCP servers
            required:
                - remote_mcp_servers
        ListSessionsPayload:
            type: object
            properties:
                cursor:
                    type: string
                    description: Opaque cursor for pagination
                filters:
                    type: array
                    items:
                        $ref: '#/components/schemas/QueryFilter'
                    description: Optional filters; all filters are ANDed together.
                from:
                    type: string
                    description: Start time in ISO 8601 format
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                limit:
                    type: integer
                    description: Number of sessions to return (1-1000)
                    default: 50
                    format: int64
                    minimum: 1
                    maximum: 1000
                sort_by:
                    type: string
                    description: Measure used to rank sessions. Defaults to total_cost.
                    default: total_cost
                    enum:
                        - total_cost
                        - total_tokens
                        - total_input_tokens
                        - total_output_tokens
                        - tool_call_count
                        - message_count
                        - duration_seconds
                to:
                    type: string
                    description: End time in ISO 8601 format
                    example: "2025-12-26T10:00:00Z"
                    format: date-time
            description: Payload for listing org-scoped chat sessions
            required:
                - from
                - to
        ListSessionsResult:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: Cursor for next page
                sessions:
                    type: array
                    items:
                        $ref: '#/components/schemas/SessionSummary'
                    description: List of chat session summaries
            description: Result of listing org-scoped chat sessions
            required:
                - sessions
        ListShadowMCPInventoryResult:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: Cursor for the next page of results.
                servers:
                    type: array
                    items:
                        $ref: '#/components/schemas/ShadowMCPInventoryServer'
            required:
                - servers
        ListShadowMCPInventoryUsersResult:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: Cursor for the next page of results.
                users:
                    type: array
                    items:
                        $ref: '#/components/schemas/ShadowMCPInventoryUser'
            required:
                - users
        ListSkillDistributionsResult:
            type: object
            properties:
                distributions:
                    type: array
                    items:
                        $ref: '#/components/schemas/PluginSkillDistribution'
                    description: The active plugin skill distributions in this page.
                next_cursor:
                    type: string
                    description: Cursor for the next page; absent when exhausted.
            description: A page of active plugin skill distributions for the current project.
            required:
                - distributions
        ListSkillFeedbackResult:
            type: object
            properties:
                counts:
                    $ref: '#/components/schemas/SkillFeedbackCounts'
                feedback:
                    type: array
                    items:
                        $ref: '#/components/schemas/SkillFeedback'
                metrics:
                    $ref: '#/components/schemas/SkillFeedbackMetrics'
                next_cursor:
                    type: string
                    description: Cursor for the next page; absent when exhausted.
                timeline:
                    type: array
                    items:
                        $ref: '#/components/schemas/SkillFeedbackTimelinePoint'
            description: Outcome counts, collection metrics, a 30-day timeline, and a newest-first page of feedback for a skill.
            required:
                - counts
                - metrics
                - timeline
                - feedback
        ListSkillSuggestionFeedbackResult:
            type: object
            properties:
                feedback:
                    type: array
                    items:
                        $ref: '#/components/schemas/SkillFeedback'
                    description: The feedback records linked to the suggestion.
            description: The agent feedback a suggestion was generated from, newest first.
            required:
                - feedback
        ListSkillSuggestionsResult:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: Cursor for the next page; absent when exhausted.
                suggestions:
                    type: array
                    items:
                        $ref: '#/components/schemas/SkillEditSuggestion'
                    description: The open suggestions in this page.
                total_open_count:
                    type: integer
                    description: The total number of matching open suggestions, independent of pagination.
                    format: int64
            description: A page of open skill edit suggestions.
            required:
                - suggestions
                - total_open_count
        ListSkillTagsResult:
            type: object
            properties:
                tags:
                    type: array
                    items:
                        type: string
                    description: Distinct tags used by active skills in the project, sorted lexicographically.
            required:
                - tags
        ListSkillVersionsResult:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: Cursor for the next page; absent when exhausted.
                versions:
                    type: array
                    items:
                        $ref: '#/components/schemas/SkillVersion'
                    description: The skill versions in this page.
            description: A page of immutable skill versions.
            required:
                - versions
        ListSkillsResult:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: Cursor for the next page; absent when exhausted.
                skills:
                    type: array
                    items:
                        $ref: '#/components/schemas/Skill'
                    description: The active skills in this page.
                total_count:
                    type: integer
                    description: The total number of active skills matching the filters.
                    format: int64
            description: A page of active project skills.
            required:
                - skills
                - total_count
        ListSourcesResult:
            type: object
            properties:
                sources:
                    type: array
                    items:
                        type: string
                    description: The distinct agent sources present in this project's chats (raw source strings such as 'claude-code', 'Codex', 'playground').
            required:
                - sources
        ListSpendRuleEventsResult:
            type: object
            properties:
                events:
                    type: array
                    items:
                        $ref: '#/components/schemas/SpendRuleEvent'
                    description: The list of budget rule events, most recent first.
                next_cursor:
                    type: string
                    description: Cursor for the next page of events.
            required:
                - events
        ListSpendRulesResult:
            type: object
            properties:
                rules:
                    type: array
                    items:
                        $ref: '#/components/schemas/SpendRule'
                    description: The list of budget rules.
            required:
                - rules
        ListSyncedUsersResult:
            type: object
            properties:
                users:
                    type: array
                    items:
                        $ref: '#/components/schemas/SyncedAgentUser'
                    description: Emails seen syncing the device agent, most recently active first.
            required:
                - users
        ListToolFiltersResult:
            type: object
            properties:
                excluded:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolFilterTool'
                    description: 'Tools whose effective tag set is empty: reachable only without a ?tags= filter.'
                filtering_enabled:
                    type: boolean
                    description: Whether tool filtering is enabled, i.e. the resolution chain (mcp_servers then toolsets) yields a non-null tool variations group. When false, scopes and excluded are empty. A project-default (source-level) variations group is not treated as filtering here.
                scopes:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolFilterScope'
                    description: The available filter scopes (tags), each with its member tools. Union of effective tags across the server's tools.
                tool_variations_group_id:
                    type: string
                    description: The ID of the resolved tool variations group, if filtering is enabled.
                    format: uuid
                tool_variations_group_name:
                    type: string
                    description: The name of the resolved tool variations group, if filtering is enabled.
            description: 'The tool filtering configuration in effect for an MCP server: the resolved tool variations group, the available filter scopes (tags), and the tools excluded from all filters. Read-only. Filtering is reported as enabled only when an explicit tool variations group is configured on the MCP server or its toolset; the per-group effective-tag derivation matches the runtime ?tags= filter for that group.'
            required:
                - filtering_enabled
                - scopes
                - excluded
        ListToolMetadataResult:
            type: object
            properties:
                tools:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolMetadata'
                    description: The stored tool metadata for the MCP server
            description: Result type for listing tool metadata
            required:
                - tools
        ListToolUsageTracesPayload:
            type: object
            properties:
                account_type:
                    type: string
                    description: Optional account type filter ('team' or 'personal'). 'team' includes unclassified traces.
                cursor:
                    type: string
                    description: Cursor for pagination
                filters:
                    type: array
                    items:
                        $ref: '#/components/schemas/LogFilter'
                    description: Arbitrary attribute filter conditions from the af URL param
                from:
                    type: string
                    description: Start time in ISO 8601 format
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                hook_sources:
                    type: array
                    items:
                        type: string
                    description: Hook plugin sources to include. Direct hosted MCP calls have no hook source and are excluded when this filter is set.
                hosted_toolset_slugs:
                    type: array
                    items:
                        type: string
                    description: Hosted MCP toolset slugs to include
                limit:
                    type: integer
                    description: Number of traces to return
                    default: 100
                    format: int64
                    minimum: 1
                    maximum: 1000
                query:
                    type: string
                    description: Free-text attribute search string from the q URL param. Matches useful identifier attributes such as Gram URN, conversation ID, and trigger instance ID.
                shadow_server_names:
                    type: array
                    items:
                        type: string
                    description: Shadow MCP server names to include
                sort:
                    type: string
                    description: Sort order
                    default: desc
                    enum:
                        - asc
                        - desc
                statuses:
                    type: array
                    items:
                        type: string
                        description: Tool usage trace outcome
                        enum:
                            - error
                            - success
                            - blocked
                            - pending
                    description: Trace outcomes to include (error, success, blocked, pending). Empty means all.
                target_types:
                    type: array
                    items:
                        type: string
                        description: Tool usage target type
                        enum:
                            - hosted_mcp_server
                            - tunneled_mcp_server
                            - shadow_mcp_server
                            - local_tool
                            - skill
                    description: Target types to include. Empty means all target types.
                to:
                    type: string
                    description: End time in ISO 8601 format
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
                user_filters:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageUserFilter'
                    description: Typed user identities to include
            description: Payload for listing target-aware MCP and tool usage traces
            required:
                - from
                - to
        ListToolUsageTracesResult:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: Cursor for next page
                traces:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsageTraceSummary'
                    description: Target-aware tool usage trace rows
            description: Result of listing target-aware MCP and tool usage traces
            required:
                - traces
        ListToolVariationGroupsResult:
            type: object
            properties:
                groups:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolVariationGroup'
            required:
                - groups
        ListToolsResult:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: The cursor to fetch results from
                tools:
                    type: array
                    items:
                        $ref: '#/components/schemas/Tool'
                    description: The list of tools (polymorphic union of HTTP tools and prompt templates)
            required:
                - tools
        ListToolsetSummariesResult:
            type: object
            properties:
                toolsets:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolsetSummary'
                    description: The list of toolset summaries
            required:
                - toolsets
        ListToolsetsResult:
            type: object
            properties:
                toolsets:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolsetEntry'
                    description: The list of toolsets
            required:
                - toolsets
        ListTriggerDefinitionsResult:
            type: object
            properties:
                definitions:
                    type: array
                    items:
                        $ref: '#/components/schemas/TriggerDefinition'
                    description: The available trigger definitions.
            required:
                - definitions
        ListTriggerEventsResult:
            type: object
            properties:
                events:
                    type: array
                    items:
                        $ref: '#/components/schemas/TriggerEvent'
                    description: The dispatch events for the trigger instance, most recent first.
            required:
                - events
        ListTriggerInstancesResult:
            type: object
            properties:
                triggers:
                    type: array
                    items:
                        $ref: '#/components/schemas/TriggerInstance'
                    description: The trigger instances for the current project.
            required:
                - triggers
        ListTunneledMcpServersResult:
            type: object
            properties:
                tunneled_mcp_servers:
                    type: array
                    items:
                        $ref: '#/components/schemas/TunneledMcpServer'
            description: Result type for listing tunneled MCP servers
            required:
                - tunneled_mcp_servers
        ListUnknownSkillActivationsResult:
            type: object
            properties:
                activations:
                    type: array
                    items:
                        $ref: '#/components/schemas/UnknownSkillActivation'
                    description: Unknown activations in this page.
                next_cursor:
                    type: string
                    description: Cursor for the next page; absent when exhausted.
            description: A page of terminal skill activations without exact version attribution.
            required:
                - activations
        ListUnproxiedMcpServerToolsResult:
            type: object
            properties:
                message:
                    type: string
                    description: Human-readable detail, present for non-success statuses
                status:
                    type: string
                    description: Outcome of the discovery attempt
                    enum:
                        - success
                        - auth_required
                        - unreachable
                        - error
                tools:
                    type: array
                    items:
                        $ref: '#/components/schemas/UnproxiedMcpServerTool'
            description: Result of a live tool-discovery probe against an unproxied MCP server
            required:
                - status
                - tools
        ListUnproxiedMcpServersResult:
            type: object
            properties:
                unproxied_mcp_servers:
                    type: array
                    items:
                        $ref: '#/components/schemas/UnproxiedMcpServer'
            description: Result type for listing unproxied MCP servers
            required:
                - unproxied_mcp_servers
        ListUserGrantsResult:
            type: object
            properties:
                grants:
                    type: array
                    items:
                        $ref: '#/components/schemas/ListRoleGrant'
                    description: The user's effective grants in this organization.
            required:
                - grants
        ListUserSessionClientsResult:
            type: object
            properties:
                items:
                    type: array
                    items:
                        $ref: '#/components/schemas/UserSessionClient'
                next_cursor:
                    type: string
                    description: Cursor for the next page; empty when exhausted.
            description: Result type for listing user_session_clients.
            required:
                - items
        ListUserSessionConsentsResult:
            type: object
            properties:
                items:
                    type: array
                    items:
                        $ref: '#/components/schemas/UserSessionConsent'
                next_cursor:
                    type: string
                    description: Cursor for the next page; empty when exhausted.
            description: Result type for listing user_session_consents.
            required:
                - items
        ListUserSessionFacetsResult:
            type: object
            properties:
                clients:
                    type: array
                    items:
                        $ref: '#/components/schemas/UserSessionFacetOption'
                    description: Connecting client facets.
                servers:
                    type: array
                    items:
                        $ref: '#/components/schemas/UserSessionFacetOption'
                    description: Issuer/server facets.
                users:
                    type: array
                    items:
                        $ref: '#/components/schemas/UserSessionFacetOption'
                    description: Subject (user) facets.
            required:
                - clients
                - users
                - servers
        ListUserSessionIssuerCimdClientsResult:
            type: object
            properties:
                items:
                    type: array
                    items:
                        $ref: '#/components/schemas/UserSessionIssuerCimdClient'
                next_cursor:
                    type: string
                    description: Cursor for the next page; empty when exhausted.
            description: Result type for listing an issuer's custom CIMD document URLs.
            required:
                - items
        ListUserSessionIssuersResult:
            type: object
            properties:
                items:
                    type: array
                    items:
                        $ref: '#/components/schemas/UserSessionIssuer'
                next_cursor:
                    type: string
                    description: Cursor for the next page; empty when exhausted.
            description: Result type for listing user_session_issuers.
            required:
                - items
        ListUserSessionsResult:
            type: object
            properties:
                items:
                    type: array
                    items:
                        $ref: '#/components/schemas/UserSession'
                next_cursor:
                    type: string
                    description: Cursor for the next page; empty when exhausted.
            description: Result type for listing user_sessions.
            required:
                - items
        ListUsersResult:
            type: object
            properties:
                users:
                    type: array
                    items:
                        $ref: '#/components/schemas/OrganizationUser'
                    description: Users linked to the organization in Gram.
            required:
                - users
        ListVariationsResult:
            type: object
            properties:
                variations:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolVariation'
            required:
                - variations
        ListVersionsForm:
            type: object
            properties:
                name:
                    type: string
                    description: The name of the package
            required:
                - name
        ListVersionsResult:
            type: object
            properties:
                package:
                    $ref: '#/components/schemas/Package'
                versions:
                    type: array
                    items:
                        $ref: '#/components/schemas/PackageVersion'
            required:
                - package
                - versions
        LiteLLMInstance:
            type: object
            properties:
                active:
                    type: boolean
                created_at:
                    type: string
                    format: date-time
                created_by_user_id:
                    type: string
                diagnostics:
                    $ref: '#/components/schemas/LiteLLMInstanceDiagnostics'
                failure_posture:
                    type: string
                    description: How LiteLLM behaves when Gram cannot evaluate a request.
                    enum:
                        - fail_closed
                        - fail_open
                id:
                    type: string
                    format: uuid
                key_prefix:
                    type: string
                last_used_at:
                    type: string
                    format: date-time
                name:
                    type: string
                organization_id:
                    type: string
                project:
                    $ref: '#/components/schemas/ProjectEntry'
                updated_at:
                    type: string
                    format: date-time
            description: A provisioned LiteLLM integration and its project-bound ingestion credential metadata.
            required:
                - id
                - organization_id
                - project
                - name
                - failure_posture
                - key_prefix
                - created_by_user_id
                - created_at
                - updated_at
                - active
                - diagnostics
        LiteLLMInstanceDiagnostics:
            type: object
            properties:
                last_error_at:
                    type: string
                    format: date-time
                last_error_kind:
                    type: string
                    description: Safe category for the latest observed ingest error.
                    enum:
                        - auth_failure
                        - decode_failure
                        - limit_exceeded
                last_guardrail_event_at:
                    type: string
                    format: date-time
                last_otel_event_at:
                    type: string
                    format: date-time
                platform_user_pct_24h:
                    type: number
                    description: Percentage of model requests in the last 24 hours that resolved to a Gram user.
                    format: double
                    minimum: 0
                    maximum: 100
                reported_litellm_version:
                    type: string
                    maxLength: 128
                status:
                    type: string
                    description: Derived health of a LiteLLM integration's latest ingest activity.
                    enum:
                        - pending
                        - success
                        - failed
                virtual_key_email_pct_24h:
                    type: number
                    description: Percentage of model requests in the last 24 hours that supplied a virtual-key email.
                    format: double
                    minimum: 0
                    maximum: 100
            description: Health and identity-attribution diagnostics for a LiteLLM integration. No prompt, credential, or identity values are returned.
            required:
                - status
        LiteLLMRequestData:
            type: object
            properties:
                user_api_key_alias:
                    type: string
                user_api_key_end_user_id:
                    type: string
                user_api_key_hash:
                    type: string
                user_api_key_org_id:
                    type: string
                user_api_key_team_alias:
                    type: string
                user_api_key_team_id:
                    type: string
                user_api_key_user_email:
                    type: string
                user_api_key_user_id:
                    type: string
            description: Sanitized metadata bound to the LiteLLM virtual key and request.
        LiteLLMStructuredMessage:
            type: object
            properties:
                content: {}
                role:
                    type: string
            description: A message supplied to LiteLLM for the guarded model request.
            required:
                - role
        LitellmIngestResult:
            type: object
            properties:
                action:
                    enum:
                        - BLOCKED
                        - NONE
                        - GUARDRAIL_INTERVENED
                    type: string
                    x-speakeasy-name-override: LiteLLMGuardrailAction
                blocked_reason:
                    type: string
                images:
                    type: array
                    items:
                        type: string
                stream_holdback_chars:
                    type: array
                    items:
                        type: integer
                        format: int64
                texts:
                    type: array
                    items:
                        type: string
                tools:
                    type: array
                    items: {}
            description: LiteLLM Generic Guardrail decision.
            required:
                - action
        LitellmInstanceKeyResult:
            type: object
            properties:
                instance:
                    $ref: '#/components/schemas/LiteLLMInstance'
                key:
                    type: string
            description: A LiteLLM instance and its newly minted plaintext key. The key is shown only once.
            required:
                - instance
                - key
        LogFilter:
            type: object
            properties:
                operator:
                    type: string
                    description: Comparison operator
                    default: eq
                    enum:
                        - eq
                        - not_eq
                        - contains
                        - exists
                        - not_exists
                        - in
                path:
                    type: string
                    description: Attribute path. Use @ prefix for custom attributes (e.g. '@user.region'), or bare path for system attributes (e.g. 'http.route').
                    example: '@user.region'
                    pattern: ^@?[a-zA-Z_][a-zA-Z0-9_]*(\.[a-zA-Z_][a-zA-Z0-9_]*)*$
                    minLength: 1
                    maxLength: 256
                values:
                    type: array
                    items:
                        type: string
                    description: Values to compare against. Pass one value for single-value operators (eq, not_eq, contains) and multiple for 'in'. Ignored for 'exists' and 'not_exists'.
                    maxItems: 256
            description: A single filter condition for a log search query.
            required:
                - path
        MCPCollection:
            type: object
            properties:
                description:
                    type: string
                    description: Description of the collection
                id:
                    type: string
                    description: Collection ID
                    format: uuid
                mcp_registry_namespace:
                    type: string
                    description: Registry namespace
                name:
                    type: string
                    description: Display name for the collection
                slug:
                    type: string
                    description: URL-friendly identifier
                visibility:
                    type: string
                    description: Visibility of the collection
                    enum:
                        - public
                        - private
            description: An MCP collection within an organization
            required:
                - id
                - name
                - slug
                - visibility
        MCPRegistry:
            type: object
            properties:
                id:
                    type: string
                    description: Registry ID
                    format: uuid
                name:
                    type: string
                    description: Display name for the registry
                url:
                    type: string
                    description: URL of the registry
            description: An MCP registry
            required:
                - id
                - name
                - url
        MCPSetupGuide:
            type: object
            properties:
                add_server_flow:
                    type: string
                    description: How the server is meant to be added in Gram, when the guide states one (e.g., 'catalog', 'custom-remote')
                aliases:
                    type: array
                    items:
                        type: string
                    description: Registry identifiers the guide is also published under
                external_markdown:
                    type: string
                    description: Markdown instructions for the setup work that happens in the upstream provider
                match_kind:
                    type: string
                    description: How the lookup matched this guide. The most specific kind, when both lookup keys matched it.
                    enum:
                        - endpoint
                        - alias
                matched_remote_id:
                    type: string
                    description: ID of the documented endpoint the lookup matched. Absent when the lookup identified the guide and not a specific endpoint, which is always the case for an 'alias' match.
                    example: hosted
                remotes:
                    type: array
                    items:
                        $ref: '#/components/schemas/MCPSetupGuideRemote'
                    description: Endpoints documented by the guide
                slug:
                    type: string
                    description: Stable identifier of the guide
                    example: box
                speakeasy_markdown:
                    type: string
                    description: Markdown instructions for the setup work that happens in Gram
                summary:
                    type: string
                    description: One-line summary of what the guide covers
                title:
                    type: string
                    description: Display title of the guide
                    example: Box
            description: Published setup documentation for an upstream MCP server
            required:
                - slug
                - title
                - summary
                - aliases
                - remotes
                - match_kind
                - external_markdown
                - speakeasy_markdown
        MCPSetupGuideRemote:
            type: object
            properties:
                id:
                    type: string
                    description: Stable identifier of the endpoint within the guide
                    example: hosted
                tenanted:
                    type: boolean
                    description: Whether the endpoint URL is customer-specific and has to be filled in per tenant
                transport_type:
                    type: string
                    description: Transport type as published by the guide (e.g., 'streamable-http', 'sse')
                    example: streamable-http
                url:
                    type: string
                    description: URL of the endpoint
                    format: uri
            description: An MCP server endpoint documented by a setup guide
            required:
                - id
                - url
                - transport_type
                - tenanted
        ManagedDevice:
            type: object
            properties:
                agent_last_seen_at:
                    type: string
                    description: 'The device-agent heartbeat that classified this device: the machine''s own under device-level matching, otherwise its assigned user''s. Omitted when no agent has ever synced.'
                    format: date-time
                coverage_bucket:
                    type: string
                    description: Coverage classification for the device. What agent_active attests depends on the org's matching mode and on whether this device matched by serial or by assigned-user email.
                    enum:
                        - agent_active
                        - agent_stale
                        - agent_other_device
                        - no_agent
                        - no_email
                        - unresolved_email
                        - missing
                external_id:
                    type: string
                    description: The MDM's identifier for the device.
                first_seen_at:
                    type: string
                    format: date-time
                hostname:
                    type: string
                    description: Device hostname.
                id:
                    type: string
                    description: Device row ID.
                last_seen_at:
                    type: string
                    format: date-time
                mdm_last_check_in_at:
                    type: string
                    description: Last device check-in as reported by the MDM.
                    format: date-time
                missing_since:
                    type: string
                    description: When the device went absent from the MDM inventory. Omitted while present.
                    format: date-time
                os_name:
                    type: string
                    description: Operating system name.
                os_version:
                    type: string
                    description: Operating system version.
                provider:
                    type: string
                    description: Provider the device was synced from.
                serial_number:
                    type: string
                    description: Hardware serial number as reported by the MDM.
                user_email:
                    type: string
                    description: Assigned user's email exactly as the MDM reported it. Omitted when the MDM has no assignment.
                user_id:
                    type: string
                    description: Resolved Gram user for the assigned email. Omitted when the email is missing or does not resolve to an org member.
            description: 'One device from a connected MDM''s inventory, annotated with its agent-coverage bucket. What that bucket attests depends on the organization''s matching mode: under device-level matching a device may be classified by its own hardware serial (this machine ran the agent) or, when no serial heartbeat exists for it, by its assigned-user email (only that user ran the agent somewhere). Under user-level matching only the latter applies.'
            required:
                - id
                - provider
                - external_id
                - coverage_bucket
                - first_seen_at
                - last_seen_at
        MarkRiskResultsFalsePositiveRequestBody:
            type: object
            properties:
                reason:
                    type: string
                    description: Optional free-text reason for the dismissal.
                result_ids:
                    type: array
                    items:
                        type: string
                    description: IDs of the risk results to mark as false positive.
                    minItems: 1
                    maxItems: 500
            required:
                - result_ids
        MarketplaceSettingsResult:
            type: object
            properties:
                default_name:
                    type: string
                    description: The default marketplace name used when no override is configured.
                effective_name:
                    type: string
                    description: The marketplace name that will be used at publish time (override if set, otherwise default).
                marketplace_name:
                    type: string
                    description: User-provided override for the marketplace name. Absent when no override is configured.
            required:
                - default_name
                - effective_name
        McpEndpoint:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the MCP endpoint was created
                    format: date-time
                custom_domain_id:
                    type: string
                    description: The ID of the custom domain this endpoint slug is registered under. Null for platform-domain endpoints.
                    format: uuid
                id:
                    type: string
                    description: The ID of the MCP endpoint
                    format: uuid
                is_domain_root:
                    type: boolean
                    description: Whether this endpoint is mapped to its custom-domain root
                mcp_server_id:
                    type: string
                    description: The ID of the MCP server this endpoint addresses
                    format: uuid
                project_id:
                    type: string
                    description: The project ID this MCP endpoint belongs to
                    format: uuid
                slug:
                    type: string
                    description: A url-friendly label (up to 128 characters) that addresses an MCP server through a slug-based URL. Platform-domain slugs (no custom domain) must be prefixed with the organization slug.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 128
                updated_at:
                    type: string
                    description: When the MCP endpoint was last updated
                    format: date-time
            description: 'An MCP endpoint: a url-friendly slug identifier that addresses an MCP server.'
            required:
                - id
                - project_id
                - mcp_server_id
                - slug
                - is_domain_root
                - created_at
                - updated_at
        McpEnvironmentConfig:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the config was created
                    format: date-time
                header_display_name:
                    type: string
                    description: Custom display name for the variable in MCP headers
                id:
                    type: string
                    description: The ID of the environment config
                provided_by:
                    type: string
                    description: 'How the variable is provided: ''user'', ''system'', or ''none'''
                updated_at:
                    type: string
                    description: When the config was last updated
                    format: date-time
                variable_name:
                    type: string
                    description: The name of the environment variable
            description: Represents an environment variable configured for an MCP server.
            required:
                - id
                - variable_name
                - provided_by
                - created_at
                - updated_at
        McpEnvironmentConfigInput:
            type: object
            properties:
                header_display_name:
                    type: string
                    description: Custom display name for the variable in MCP headers
                provided_by:
                    type: string
                    description: 'How the variable is provided: ''user'', ''system'', or ''none'''
                variable_name:
                    type: string
                    description: The name of the environment variable
            description: Input for configuring an environment variable for an MCP server.
            required:
                - variable_name
                - provided_by
        McpExport:
            type: object
            properties:
                authentication:
                    $ref: '#/components/schemas/McpExportAuthentication'
                description:
                    type: string
                    description: Description of the MCP server
                documentation_url:
                    type: string
                    description: Link to external documentation
                instructions:
                    type: string
                    description: Server instructions for users
                logo_url:
                    type: string
                    description: URL to the server logo
                name:
                    type: string
                    description: The MCP server name
                server_url:
                    type: string
                    description: The MCP server URL
                slug:
                    type: string
                    description: The MCP server slug
                tools:
                    type: array
                    items:
                        $ref: '#/components/schemas/McpExportTool'
                    description: Available tools on this MCP server
            description: Complete MCP server export for documentation and integration
            required:
                - name
                - slug
                - server_url
                - tools
                - authentication
        McpExportAuthHeader:
            type: object
            properties:
                display_name:
                    type: string
                    description: User-friendly display name (e.g., API Key)
                name:
                    type: string
                    description: The HTTP header name (e.g., Authorization)
            description: An authentication header required by the MCP server
            required:
                - name
                - display_name
        McpExportAuthentication:
            type: object
            properties:
                headers:
                    type: array
                    items:
                        $ref: '#/components/schemas/McpExportAuthHeader'
                    description: Required authentication headers
                required:
                    type: boolean
                    description: Whether authentication is required
            description: Authentication requirements for the MCP server
            required:
                - required
                - headers
        McpExportTool:
            type: object
            properties:
                description:
                    type: string
                    description: Description of what the tool does
                input_schema:
                    description: JSON Schema for the tool's input parameters
                name:
                    type: string
                    description: The tool name
            description: A tool definition in the MCP export
            required:
                - name
                - description
                - input_schema
        McpMetadata:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the metadata entry was created
                    format: date-time
                default_environment_id:
                    type: string
                    description: The default environment to load variables from
                    format: uuid
                environment_configs:
                    type: array
                    items:
                        $ref: '#/components/schemas/McpEnvironmentConfig'
                    description: The list of environment variables configured for this MCP
                external_documentation_text:
                    type: string
                    description: A blob of text for the button on the MCP server page
                external_documentation_url:
                    type: string
                    description: A link to external documentation for the MCP install page
                    format: uri
                id:
                    type: string
                    description: The ID of the metadata record
                installation_override_url:
                    type: string
                    description: URL to redirect to instead of showing the default installation page
                    format: uri
                instructions:
                    type: string
                    description: Server instructions returned in the MCP initialize response
                logo_asset_id:
                    type: string
                    description: The asset ID for the MCP install page logo
                    format: uuid
                mcp_server_id:
                    type: string
                    description: The MCP server associated with this install page metadata. Mutually exclusive with toolset_id.
                    format: uuid
                toolset_id:
                    type: string
                    description: The toolset associated with this install page metadata. Mutually exclusive with mcp_server_id.
                    format: uuid
                updated_at:
                    type: string
                    description: When the metadata entry was last updated
                    format: date-time
            description: Metadata used to configure the MCP install page. Exactly one of toolset_id or mcp_server_id identifies which backend the metadata belongs to.
            required:
                - id
                - created_at
                - updated_at
        McpServer:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the MCP server was created
                    format: date-time
                environment_id:
                    type: string
                    description: The ID of the environment associated with the server
                    format: uuid
                id:
                    type: string
                    description: The ID of the MCP server
                    format: uuid
                name:
                    type: string
                    description: A human-readable display name for the server
                project_id:
                    type: string
                    description: The project ID this MCP server belongs to
                    format: uuid
                remote_mcp_server_id:
                    type: string
                    description: The ID of the remote MCP server used as the backend
                    format: uuid
                slug:
                    type: string
                    description: A URL-safe, project-unique slug derived server-side from the name and ID
                tool_variations_group_id:
                    type: string
                    description: The ID of the tool variations group enabling MCP tool filtering for this server, if any.
                    format: uuid
                toolset_id:
                    type: string
                    description: The ID of the toolset used as the backend
                    format: uuid
                tunneled_mcp_server_id:
                    type: string
                    description: The ID of the tunneled MCP server used as the backend
                    format: uuid
                unproxied_mcp_server_id:
                    type: string
                    description: The ID of the unproxied MCP server used as the backend, if any. A server backed by an unproxied MCP server is never proxied by Gram.
                    format: uuid
                updated_at:
                    type: string
                    description: When the MCP server was last updated
                    format: date-time
                user_session_issuer_id:
                    type: string
                    description: The ID of the user session issuer that gates OAuth-based MCP client authentication for this server, if any.
                    format: uuid
                visibility:
                    type: string
                    description: The visibility of an MCP server
                    enum:
                        - disabled
                        - private
                        - public
            description: 'An MCP server configuration: authentication, environment, and backend selection for an MCP server.'
            required:
                - id
                - project_id
                - visibility
                - created_at
                - updated_at
        McpServerActivity:
            type: object
            properties:
                last_tool_call_at:
                    type: string
                    description: ISO 8601 timestamp of the most recent tool call
                    format: date-time
                recent_tool_calls:
                    type: integer
                    description: Number of tool calls observed inside the recent-activity window
                    format: int64
                target_id:
                    type: string
                    description: 'Stable target identifier: toolset slug for hosted servers, MCP server slug for tunneled/remote servers'
                target_label:
                    type: string
                    description: User-facing label for the target
                target_type:
                    type: string
                    description: MCP server activity target type. Only the two server-backed kinds this endpoint reports are valid, unlike the broader tool-usage target types.
                    enum:
                        - hosted_mcp_server
                        - tunneled_mcp_server
                total_tool_calls:
                    type: integer
                    description: Number of tool calls observed across the whole lookback window
                    format: int64
            description: Tool-call activity for one MCP server, keyed by the same target identifier used elsewhere (toolset slug for hosted servers, MCP server slug for tunneled/remote servers)
            required:
                - target_type
                - target_id
                - target_label
                - total_tool_calls
                - recent_tool_calls
        MigrateIssuerRequestBody:
            type: object
            properties:
                source_id:
                    type: string
                    description: The remote_session_issuer to migrate away from; soft-deleted on success.
                    format: uuid
                target_id:
                    type: string
                    description: The remote_session_issuer to migrate onto; survives and adopts the source's clients.
                    format: uuid
            required:
                - source_id
                - target_id
        MigrateOrganizationRemoteSessionIssuerResult:
            type: object
            properties:
                clients_migrated:
                    type: integer
                    description: Number of remote_session_clients re-pointed from the source issuer to the target issuer. Zero when the source had no active clients.
                    format: int64
                issuer:
                    $ref: '#/components/schemas/RemoteSessionIssuer'
                source_deleted:
                    type: boolean
                    description: TRUE when the source issuer was soft-deleted.
            description: 'Outcome of consolidating a source remote_session_issuer onto a target issuer: the surviving target issuer, how many clients were re-pointed, and whether the source was soft-deleted.'
            required:
                - issuer
                - clients_migrated
                - source_deleted
        MigrateRemoteSessionIssuerRequestBody:
            type: object
            properties:
                source_id:
                    type: string
                    description: The organization- or project-level remote_session_issuer to migrate away from; soft-deleted on success.
                    format: uuid
                target_id:
                    type: string
                    description: The global remote_session_issuer to migrate onto; survives and adopts the source's clients.
                    format: uuid
            required:
                - source_id
                - target_id
        MigrateRemoteSessionIssuerResult:
            type: object
            properties:
                clients_migrated:
                    type: integer
                    description: Number of remote_session_clients re-pointed from the source issuer to the target issuer. Zero when the source had no active clients.
                    format: int64
                issuer:
                    $ref: '#/components/schemas/RemoteSessionIssuer'
                source_deleted:
                    type: boolean
                    description: TRUE when the source issuer was soft-deleted.
            description: 'Outcome of consolidating a tenant remote_session_issuer onto a global issuer: the surviving global issuer, how many clients were re-pointed, and whether the source was soft-deleted.'
            required:
                - issuer
                - clients_migrated
                - source_deleted
        MintUserSessionRequestBody:
            type: object
            properties:
                mcp_server_id:
                    type: string
                    description: Bind the JWT to this remote MCP server's user_session_issuer audience (the /x/mcp convention, since remote servers have no toolset). Mutually exclusive with toolset_id; exactly one must be set. Must be issuer-gated and live in the caller's project.
                    format: uuid
                toolset_id:
                    type: string
                    description: Bind the JWT to this toolset's /mcp/{slug} audience. Mutually exclusive with mcp_server_id; exactly one must be set. Must be issuer-gated and live in the caller's project.
                    format: uuid
        MintUserSessionResponseBody:
            type: object
            properties:
                access_token:
                    type: string
                    description: 'The minted user-session JWT. Send as `Authorization: Bearer` on MCP requests to the bound /mcp/{slug} (or /x/mcp/{slug}) surface.'
                expires_in:
                    type: integer
                    description: Lifetime of the access token in seconds.
                    format: int64
            required:
                - access_token
                - expires_in
        ModelProviderKey:
            type: object
            properties:
                created_at:
                    type: string
                    description: ISO 8601 timestamp when the key was created.
                    format: date-time
                enabled:
                    type: boolean
                    description: Whether the key participates in key resolution.
                id:
                    type: string
                    description: The ID of the key
                    format: uuid
                project_id:
                    type: string
                    description: The project the key belongs to
                    format: uuid
                provider:
                    type: string
                    description: The model provider the key authenticates with. Supported values include openrouter.
                slot:
                    type: string
                    description: The responsibility slot the key applies to. The 'default' slot covers every slot without a dedicated override.
                updated_at:
                    type: string
                    description: ISO 8601 timestamp of the most recent change.
                    format: date-time
            description: A customer-supplied model provider API key bound to a project and responsibility slot. Key material is write-only and never returned.
            required:
                - id
                - project_id
                - slot
                - provider
                - enabled
                - created_at
                - updated_at
        ModelUsage:
            type: object
            properties:
                count:
                    type: integer
                    description: Number of times used
                    format: int64
                name:
                    type: string
                    description: Model name
            description: Model usage statistics
            required:
                - name
                - count
        MoveIssuerRequestBody:
            type: object
            properties:
                id:
                    type: string
                    description: The remote_session_issuer id.
                    format: uuid
                project_id:
                    type: string
                    description: Target owning project id; the project must belong to the caller's organization. Omit to make the issuer organization-level.
                    format: uuid
            required:
                - id
        NotModified:
            type: object
            properties:
                location:
                    type: string
            required:
                - location
        OAuthEnablementMetadata:
            type: object
            properties:
                oauth2_security_count:
                    type: integer
                    description: Count of security variables that are OAuth2 supported
                    format: int64
            required:
                - oauth2_security_count
        OTELAttribute:
            type: object
            properties:
                key:
                    type: string
                    description: Attribute key
                value:
                    $ref: '#/components/schemas/OTELAttributeValue'
            description: OTEL log attribute with key and typed value
            required:
                - key
        OTELAttributeValue:
            type: object
            properties:
                arrayValue:
                    description: Array value (passed through)
                boolValue:
                    type: boolean
                    description: Boolean value
                bytesValue:
                    type: string
                    description: Bytes value (base64-encoded per OTLP/JSON)
                doubleValue:
                    type: number
                    description: Double value
                    format: double
                intValue:
                    description: Integer value (string-encoded per OTLP/JSON, or raw number)
                kvlistValue:
                    description: Key-value list value (passed through)
                stringValue:
                    type: string
                    description: String value
            description: OTEL attribute value - any of the OTLP/JSON value kinds
        OTELLogBody:
            type: object
            properties:
                stringValue:
                    type: string
                    description: String body value
            description: OTEL log body
        OTELLogRecord:
            type: object
            properties:
                attributes:
                    type: array
                    items:
                        $ref: '#/components/schemas/OTELAttribute'
                    description: Log attributes
                body:
                    $ref: '#/components/schemas/OTELLogBody'
                droppedAttributesCount:
                    type: integer
                    description: Number of dropped attributes
                    format: int64
                observedTimeUnixNano:
                    type: string
                    description: Observed timestamp in nanoseconds
                spanId:
                    type: string
                    description: Span ID
                timeUnixNano:
                    type: string
                    description: Timestamp in nanoseconds since Unix epoch
                traceId:
                    type: string
                    description: Trace ID
            description: Individual OTEL log record
        OTELLogsPayload:
            type: object
            properties:
                resourceLogs:
                    type: array
                    items:
                        $ref: '#/components/schemas/OTELResourceLog'
                    description: Array of resource logs
            description: OTEL logs export payload
        OTELMetric:
            type: object
            properties:
                description:
                    type: string
                    description: Metric description
                exponentialHistogram:
                    description: ExponentialHistogram metric data (passed through)
                gauge:
                    description: Gauge metric data (passed through)
                histogram:
                    description: Histogram metric data (passed through)
                name:
                    type: string
                    description: Metric name
                sum:
                    $ref: '#/components/schemas/OTELSum'
                summary:
                    description: Summary metric data (passed through)
                unit:
                    type: string
                    description: Metric unit
            description: OTEL metric
        OTELMetricsPayload:
            type: object
            properties:
                resourceMetrics:
                    type: array
                    items:
                        $ref: '#/components/schemas/OTELResourceMetrics'
                    description: Array of resource metrics
            description: OTEL metrics export payload
        OTELNumberDataPoint:
            type: object
            properties:
                asDouble:
                    type: number
                    description: Value as double
                    format: double
                asInt:
                    description: Value as integer (string-encoded per OTLP/JSON, or raw number)
                attributes:
                    type: array
                    items:
                        $ref: '#/components/schemas/OTELAttribute'
                    description: Data point attributes
                startTimeUnixNano:
                    type: string
                    description: Start timestamp in nanoseconds
                timeUnixNano:
                    type: string
                    description: Timestamp in nanoseconds
            description: OTEL number data point
        OTELResource:
            type: object
            properties:
                attributes:
                    type: array
                    items:
                        $ref: '#/components/schemas/OTELResourceAttribute'
                    description: Resource attributes
                droppedAttributesCount:
                    type: integer
                    description: Number of dropped attributes
                    format: int64
            description: OTEL resource information
        OTELResourceAttribute:
            type: object
            properties:
                key:
                    type: string
                    description: Resource attribute key
                value:
                    $ref: '#/components/schemas/OTELAttributeValue'
            description: OTEL resource attribute
            required:
                - key
        OTELResourceLog:
            type: object
            properties:
                resource:
                    $ref: '#/components/schemas/OTELResource'
                scopeLogs:
                    type: array
                    items:
                        $ref: '#/components/schemas/OTELScopeLog'
                    description: Array of scope logs
            description: OTEL resource logs container
        OTELResourceMetrics:
            type: object
            properties:
                resource:
                    $ref: '#/components/schemas/OTELResource'
                scopeMetrics:
                    type: array
                    items:
                        $ref: '#/components/schemas/OTELScopeMetrics'
                    description: Array of scope metrics
            description: OTEL resource metrics container
        OTELScope:
            type: object
            properties:
                name:
                    type: string
                    description: Scope name
                version:
                    type: string
                    description: Scope version
            description: OTEL instrumentation scope
        OTELScopeLog:
            type: object
            properties:
                logRecords:
                    type: array
                    items:
                        $ref: '#/components/schemas/OTELLogRecord'
                    description: Array of log records
                scope:
                    $ref: '#/components/schemas/OTELScope'
            description: OTEL scope logs container
        OTELScopeMetrics:
            type: object
            properties:
                metrics:
                    type: array
                    items:
                        $ref: '#/components/schemas/OTELMetric'
                    description: Array of metrics
                scope:
                    $ref: '#/components/schemas/OTELScope'
            description: OTEL scope metrics container
        OTELSum:
            type: object
            properties:
                aggregationTemporality:
                    description: Aggregation temporality (number or enum string)
                dataPoints:
                    type: array
                    items:
                        $ref: '#/components/schemas/OTELNumberDataPoint'
                    description: Data points
                isMonotonic:
                    type: boolean
                    description: Whether the sum is monotonic
            description: OTEL sum metric
        ObservabilitySummary:
            type: object
            properties:
                avg_latency_ms:
                    type: number
                    description: Average tool latency in milliseconds
                    format: double
                avg_resolution_time_ms:
                    type: number
                    description: Average time to resolution in milliseconds
                    format: double
                avg_session_duration_ms:
                    type: number
                    description: Average session duration in milliseconds
                    format: double
                cache_creation_input_tokens:
                    type: integer
                    description: Sum of cache creation input tokens
                    format: int64
                cache_read_input_tokens:
                    type: integer
                    description: Sum of cache read input tokens
                    format: int64
                failed_chats:
                    type: integer
                    description: Number of failed chat sessions
                    format: int64
                failed_tool_calls:
                    type: integer
                    description: Number of failed tool calls
                    format: int64
                resolved_chats:
                    type: integer
                    description: Number of resolved chat sessions
                    format: int64
                total_chats:
                    type: integer
                    description: Total number of chat sessions
                    format: int64
                total_cost:
                    type: number
                    description: Total cost of all requests
                    format: double
                total_input_tokens:
                    type: integer
                    description: Sum of input tokens used
                    format: int64
                total_output_tokens:
                    type: integer
                    description: Sum of output tokens used
                    format: int64
                total_tokens:
                    type: integer
                    description: Sum of all tokens used
                    format: int64
                total_tool_calls:
                    type: integer
                    description: Total number of tool calls
                    format: int64
            description: Aggregated summary metrics for a time period
            required:
                - total_chats
                - resolved_chats
                - failed_chats
                - avg_session_duration_ms
                - avg_resolution_time_ms
                - total_input_tokens
                - total_output_tokens
                - total_tokens
                - cache_read_input_tokens
                - cache_creation_input_tokens
                - total_cost
                - total_tool_calls
                - failed_tool_calls
                - avg_latency_ms
        OnboardingHookEvent:
            type: object
            properties:
                chat_id:
                    type: string
                    description: Gram chat/session ID that owns this event, when present.
                event_name:
                    type: string
                    description: Hook event name (e.g. PreToolUse, SessionStart).
                project_slug:
                    type: string
                    description: Slug of the Gram project that received the event.
                source:
                    type: string
                    description: 'Hook source: claude_code, cursor, or codex.'
                status:
                    type: string
                    description: 'Outcome status: allowed, blocked, failure, or pending.'
                time_unix_nano:
                    type: string
                    description: Event timestamp in nanoseconds since unix epoch. Stringified to preserve int64 precision.
                tool_name:
                    type: string
                    description: Tool invoked by the hook, if any.
                user_email:
                    type: string
                    description: Email of the user whose session produced the event, when present in hook attributes.
            required:
                - time_unix_nano
                - source
                - project_slug
        OnboardingStatusResult:
            type: object
            properties:
                dsync_configured:
                    type: boolean
                    description: Whether the organization has at least one linked directory sync in WorkOS.
                sso_configured:
                    type: boolean
                    description: Whether the organization has at least one active SSO connection in WorkOS.
            required:
                - sso_configured
                - dsync_configured
        OpenAPIv3DeploymentAsset:
            type: object
            properties:
                asset_id:
                    type: string
                    description: The ID of the uploaded asset.
                id:
                    type: string
                    description: The ID of the deployment asset.
                name:
                    type: string
                    description: The name to give the document as it will be displayed in UIs.
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            required:
                - id
                - asset_id
                - name
                - slug
        Organization:
            type: object
            properties:
                account_type:
                    type: string
                    description: The account type of the organization
                created_at:
                    type: string
                    description: The creation date of the organization.
                    format: date-time
                id:
                    type: string
                    description: The ID of the organization
                name:
                    type: string
                    description: The name of the organization
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                updated_at:
                    type: string
                    description: The last update date of the organization.
                    format: date-time
                webhooks_enabled:
                    type: boolean
                    description: Whether webhooks are enabled for the organization
                webhooks_onboarded:
                    type: boolean
                    description: Whether webhooks support is initialized for the organization
            required:
                - id
                - name
                - slug
                - account_type
                - webhooks_onboarded
                - webhooks_enabled
                - created_at
                - updated_at
        OrganizationClientDeletePreflight:
            type: object
            properties:
                mcp_server_names:
                    type: array
                    items:
                        type: string
                    description: Display names of MCP servers this client is attached to.
                session_count:
                    type: integer
                    description: Number of non-deleted remote_sessions minted against this client.
                    format: int64
            description: 'Authoritative impact summary for deleting a remote_session_client: how many sessions it holds and the names of the MCP servers it is attached to.'
            required:
                - session_count
                - mcp_server_names
        OrganizationEntry:
            type: object
            properties:
                id:
                    type: string
                name:
                    type: string
                projects:
                    type: array
                    items:
                        $ref: '#/components/schemas/ProjectEntry'
                scim_enabled:
                    type: boolean
                    description: Whether SCIM directory sync is enabled for this organization (synced from WorkOS)
                slug:
                    type: string
                sso_enabled:
                    type: boolean
                    description: Whether SSO is enabled for this organization (synced from WorkOS)
                user_workspace_slugs:
                    type: array
                    items:
                        type: string
            required:
                - id
                - name
                - slug
                - projects
        OrganizationInvitation:
            type: object
            properties:
                accepted_at:
                    type: string
                    description: When the invitation was accepted.
                    format: date-time
                created_at:
                    type: string
                    format: date-time
                email:
                    type: string
                    description: Invitee email address.
                expires_at:
                    type: string
                    description: When the invitation expires.
                    format: date-time
                id:
                    type: string
                    description: WorkOS invitation ID.
                inviter_user_id:
                    type: string
                    description: Gram user ID of the inviter, when known.
                revoked_at:
                    type: string
                    description: When the invitation was revoked.
                    format: date-time
                role_slug:
                    type: string
                    description: WorkOS role slug assigned when the invite is accepted.
                state:
                    type: string
                    description: Invitation lifecycle state.
                    enum:
                        - pending
                        - accepted
                        - expired
                        - revoked
                updated_at:
                    type: string
                    format: date-time
            required:
                - id
                - email
                - state
                - created_at
                - updated_at
        OrganizationInvitationAccept:
            type: object
            properties:
                accept_invitation_url:
                    type: string
                    description: URL to complete acceptance in WorkOS (may be empty when not actionable).
                email:
                    type: string
                    description: Invitee email address.
                organization_name:
                    type: string
                    description: Gram organization display name when the org is linked in Gram; empty if unknown.
                state:
                    type: string
                    description: Invitation lifecycle state.
                    enum:
                        - pending
                        - accepted
                        - expired
                        - revoked
            required:
                - email
                - state
                - organization_name
                - accept_invitation_url
        OrganizationIssuerDeletePreflight:
            type: object
            properties:
                client_count:
                    type: integer
                    description: Number of non-deleted remote_session_clients registered with this issuer.
                    format: int64
                mcp_server_names:
                    type: array
                    items:
                        type: string
                    description: Display names of MCP servers attached to this issuer's clients.
            description: 'Authoritative impact summary for deleting a remote_session_issuer: how many clients reference it and the names of the MCP servers those clients are attached to.'
            required:
                - client_count
                - mcp_server_names
        OrganizationIssuerMigratePreflight:
            type: object
            properties:
                can_migrate:
                    type: boolean
                    description: 'TRUE when the migration would succeed: no endpoint mismatches and no conflicting MCP-server bindings.'
                client_count:
                    type: integer
                    description: Number of non-deleted remote_session_clients that would be re-pointed from the source issuer to the target issuer.
                    format: int64
                conflicting_mcp_server_names:
                    type: array
                    items:
                        type: string
                    description: Display names of MCP servers where both the source and the target issuer already have a client bound. Non-empty blocks the migration; detach one client per listed server and retry.
                endpoint_mismatches:
                    type: array
                    items:
                        type: string
                    description: Names of the authorization-server metadata fields (issuer, token_endpoint, authorization_endpoint) that differ between source and target. Non-empty blocks the migration.
                mcp_server_names:
                    type: array
                    items:
                        type: string
                    description: Display names of MCP servers attached to the source issuer's clients.
                warnings:
                    type: array
                    items:
                        type: string
                    description: Non-blocking divergences (oidc, passthrough, scopes_supported). The target issuer's values become authoritative for the migrated clients.
            description: 'Authoritative impact summary for migrating a remote_session_issuer''s clients onto another issuer: how many clients move, which MCP servers are affected, and every blocker that would make the migration fail.'
            required:
                - client_count
                - mcp_server_names
                - endpoint_mismatches
                - conflicting_mcp_server_names
                - warnings
                - can_migrate
        OrganizationMcpServer:
            type: object
            properties:
                id:
                    type: string
                    description: The mcp_server id.
                    format: uuid
                name:
                    type: string
                    description: The MCP server name; empty when unset (display falls back to the URL).
                project_id:
                    type: string
                    description: The owning project id.
                    format: uuid
                project_slug:
                    type: string
                    description: The owning project's slug, for linking to the MCP server in its project.
                slug:
                    type: string
                    description: The MCP server slug.
                url:
                    type: string
                    description: The remote MCP server URL; empty for non-remote (toolset-backed) servers.
            description: An MCP server attached to a remote_session_client, with the fields the org-admin UI needs to display and link to it.
            required:
                - id
                - project_id
        OrganizationRemoteSessionClient:
            type: object
            properties:
                active_session_count:
                    type: integer
                    description: Number of non-deleted (active) remote_sessions minted against this client.
                    format: int64
                client:
                    $ref: '#/components/schemas/RemoteSessionClient'
                mcp_server_count:
                    type: integer
                    description: Number of non-deleted MCP servers attached to this client (via user_session_issuers).
                    format: int64
            description: 'An organization-administrator view of a remote_session_client: the client plus the number of MCP servers it is attached to and the number of active sessions minted against it.'
            required:
                - client
                - mcp_server_count
                - active_session_count
        OrganizationRemoteSessionIssuer:
            type: object
            properties:
                client_count:
                    type: integer
                    description: Number of non-deleted remote_session_clients registered with this issuer.
                    format: int64
                issuer:
                    $ref: '#/components/schemas/RemoteSessionIssuer'
                project_name:
                    type: string
                    description: The owning project's name. Empty for organizational (project_id NULL) issuers.
            description: 'An organization-administrator view of a remote_session_issuer: the issuer plus its associated client count and (for project-specific issuers) the owning project''s name.'
            required:
                - issuer
                - client_count
        OrganizationUser:
            type: object
            properties:
                created_at:
                    type: string
                    format: date-time
                email:
                    type: string
                    description: User email address.
                id:
                    type: string
                    description: Gram relationship row ID.
                last_login:
                    type: string
                    description: Timestamp of the user's most recent login.
                    format: date-time
                name:
                    type: string
                    description: User display name.
                organization_id:
                    type: string
                    description: Gram organization ID.
                photo_url:
                    type: string
                    description: User photo URL.
                updated_at:
                    type: string
                    format: date-time
                user_id:
                    type: string
                    description: Gram user ID.
                workos_membership_id:
                    type: string
                    description: WorkOS organization membership ID when known.
            required:
                - id
                - organization_id
                - user_id
                - name
                - email
                - created_at
                - updated_at
        OtelForwardingConfig:
            type: object
            properties:
                created_at:
                    type: string
                    description: ISO 8601 timestamp when the config was created. Omitted when no config is set.
                    format: date-time
                enabled:
                    type: boolean
                    description: Whether forwarding is currently active.
                endpoint_url:
                    type: string
                    description: URL each OTEL payload is POSTed to. Empty string when no config is set.
                headers:
                    type: array
                    items:
                        $ref: '#/components/schemas/OtelForwardingHeader'
                    description: Headers configured for this endpoint. Values are never returned.
                id:
                    type: string
                    description: Config ID. Omitted when no config is set for the organization.
                organization_id:
                    type: string
                    description: Organization the config belongs to.
                updated_at:
                    type: string
                    description: ISO 8601 timestamp of the most recent change. Omitted when no config is set.
                    format: date-time
            description: Per-organization config that controls forwarding of OTEL payloads received on the hooks endpoints to a customer-owned URL. When no config is set, id/created_at/updated_at are omitted and enabled defaults to false.
            required:
                - organization_id
                - endpoint_url
                - enabled
                - headers
        OtelForwardingHeader:
            type: object
            properties:
                has_value:
                    type: boolean
                    description: Whether a non-empty value is currently stored for this header. Always false on write-only operations.
                name:
                    type: string
                    description: Header name.
            description: HTTP header forwarded with each OTEL payload.
            required:
                - name
                - has_value
        OtelForwardingHeaderInput:
            type: object
            properties:
                name:
                    type: string
                    description: Header name.
                value:
                    type: string
                    description: Header value. Stored encrypted at rest; never returned on reads.
            description: HTTP header value provided when upserting a forwarding config.
            required:
                - name
                - value
        Package:
            type: object
            properties:
                created_at:
                    type: string
                    description: The creation date of the package
                    format: date-time
                deleted_at:
                    type: string
                    description: The deletion date of the package
                    format: date-time
                description:
                    type: string
                    description: The description of the package. This contains HTML content.
                description_raw:
                    type: string
                    description: The unsanitized, user-supplied description of the package. Limited markdown syntax is supported.
                id:
                    type: string
                    description: The ID of the package
                image_asset_id:
                    type: string
                    description: The asset ID of the image to show for this package
                keywords:
                    type: array
                    items:
                        type: string
                    description: The keywords of the package
                latest_version:
                    type: string
                    description: The latest version of the package
                name:
                    type: string
                    description: The name of the package
                organization_id:
                    type: string
                    description: The ID of the organization that owns the package
                project_id:
                    type: string
                    description: The ID of the project that owns the package
                summary:
                    type: string
                    description: The summary of the package
                title:
                    type: string
                    description: The title of the package
                updated_at:
                    type: string
                    description: The last update date of the package
                    format: date-time
                url:
                    type: string
                    description: External URL for the package owner
            required:
                - id
                - name
                - project_id
                - organization_id
                - created_at
                - updated_at
        PackageVersion:
            type: object
            properties:
                created_at:
                    type: string
                    description: The creation date of the package version
                    format: date-time
                deployment_id:
                    type: string
                    description: The ID of the deployment that the version belongs to
                id:
                    type: string
                    description: The ID of the package version
                package_id:
                    type: string
                    description: The ID of the package that the version belongs to
                semver:
                    type: string
                    description: The semantic version value
                visibility:
                    type: string
                    description: The visibility of the package version
            required:
                - id
                - package_id
                - deployment_id
                - visibility
                - semver
                - created_at
        PaygBillingSummary:
            type: object
            properties:
                estimated_total_usd:
                    type: string
                    description: Exact estimated current-cycle total in USD through recorded_through
                other_inference_spend_usd:
                    type: string
                    description: Exact durable Other inference spend in USD through recorded_through
                period_end:
                    type: string
                    description: End of the live paid Stripe service period (exclusive)
                    format: date-time
                period_start:
                    type: string
                    description: Start of the live paid Stripe service period
                    format: date-time
                recorded_through:
                    type: string
                    description: Most recent completed durable UTC spend day included in the estimate
                    format: date
                tum_cost_usd:
                    type: string
                    description: Exact estimated tokens-under-management cost in USD
                tum_tokens:
                    type: integer
                    description: Tokens under management in the live paid service period
                    format: int64
                tum_unit_price_usd:
                    type: string
                    description: Exact flat USD price per token under management
            required:
                - period_start
                - period_end
                - tum_tokens
                - tum_unit_price_usd
                - tum_cost_usd
                - other_inference_spend_usd
                - estimated_total_usd
        PeriodUsage:
            type: object
            properties:
                actual_enabled_server_count:
                    type: integer
                    description: The number of servers enabled at the time of the request
                    format: int64
                credits:
                    type: integer
                    description: The number of credits used. Only populated for platform admins.
                    format: int64
                has_active_subscription:
                    type: boolean
                    description: Whether the project has an active subscription
                included_credits:
                    type: integer
                    description: The number of credits included in the tier. Only populated for platform admins.
                    format: int64
                included_servers:
                    type: integer
                    description: The number of servers included in the tier
                    format: int64
                included_tool_calls:
                    type: integer
                    description: The number of tool calls included in the tier
                    format: int64
                servers:
                    type: integer
                    description: The number of servers used, according to the Polar meter
                    format: int64
                tool_calls:
                    type: integer
                    description: The number of tool calls used
                    format: int64
            required:
                - tool_calls
                - included_tool_calls
                - servers
                - included_servers
                - actual_enabled_server_count
                - has_active_subscription
        PlatformMCPOnboardingSetupHandoff:
            type: object
            properties:
                dashboard_setup_url:
                    type: string
                    description: Server-owned same-origin dashboard Inspect URL for the persisted browser Catalogue registration.
                handoff:
                    type: string
                    description: One-time opaque local-fixture setup handoff.
            description: Secure setup continuation returned only to the immediate session-authenticated dashboard caller. Browser Catalogue entries return a server-owned Inspect URL; the local synthetic fixture returns a one-time handoff. Neither is part of the onboarding projection.
        PlatformMCPOnboardingState:
            type: object
            properties:
                agent_configuration_copied:
                    type: boolean
                    description: Whether the user copied Platform MCP configuration or completed an equivalent supported agent-setup action in this workflow.
                catalog_explored:
                    type: boolean
                    description: Whether the active workflow observed a successful reviewed MCP Catalog search through Platform MCP.
                client_family:
                    type: string
                    description: Selected manual-install client family when a workflow is active.
                connection_auth_state:
                    type: string
                    description: Bounded authorization state for the authenticated user's latest Platform MCP connection.
                    enum:
                        - not_connected
                        - active
                        - reauthorization_required
                connection_authorized:
                    type: boolean
                    description: Whether the authenticated user has a current authorized Platform MCP connection.
                connection_ready:
                    type: boolean
                    description: Whether the authenticated user's current connection has completed authenticated discovery.
                distribution_attached:
                    type: boolean
                    description: Whether the selected MCP is currently attached to the selected project's existing Default plugin.
                distribution_expected_version:
                    type: string
                    description: Opaque server-issued version token required by distribute, remove, or publication-repair mutations. It binds the selected project and authenticated user without exposing internal IDs or counters.
                distribution_publication_state:
                    type: string
                    description: Bounded package-publication state for the selected project's Default plugin after a distribution change.
                    enum:
                        - ""
                        - pending
                        - current
                        - repair_required
                distribution_state:
                    type: string
                    description: Bounded lifecycle state for the selected MCP's existing-Default-plugin distribution.
                    enum:
                        - ""
                        - attached
                        - removed
                distribution_tool_succeeded:
                    type: boolean
                    description: Whether Platform MCP successfully added the workflow-bound MCP to the selected project's existing Default plugin.
                enabled:
                    type: boolean
                    description: Whether the active organization currently passes the Platform MCP capability and rollout gates.
                mcp_url:
                    type: string
                    description: Canonical Platform MCP endpoint URL supplied by the server.
                organization_setup_complete:
                    type: boolean
                    description: Whether the organization already has a durable Platform MCP value outcome or an attached distribution.
                readiness_freshness:
                    type: string
                    description: Whether selected-registration readiness is currently fresh.
                    enum:
                        - ""
                        - fresh
                        - stale
                        - unavailable
                readiness_state:
                    type: string
                    description: Bounded current readiness state for the selected registration.
                    enum:
                        - ""
                        - ready
                        - needs_provider_setup
                        - needs_gram_authorization
                        - needs_configuration
                        - auth_failed
                        - unreachable
                        - unsupported
                        - unauthorized
                        - guide_unavailable
                        - degraded
                readiness_verified:
                    type: boolean
                    description: Whether Platform MCP observed a successful ready status check for the workflow-bound MCP.
                reauthorization_reason:
                    type: string
                    description: Bounded reason why interactive Platform MCP authorization is required again.
                    enum:
                        - ""
                        - idle_expired
                        - authorization_expired
                        - refresh_invalidated
                        - authorization_changed
                        - revoked
                        - security_reset
                registration_complete:
                    type: boolean
                    description: Whether the server-owned local candidate is registered for the selected project.
                repair_action:
                    type: string
                    description: A bounded next action when the workflow cannot progress.
                    enum:
                        - ""
                        - enable_platform_mcp
                        - authorize_platform_mcp
                        - select_project
                        - start_setup
                        - continue_dashboard_setup
                        - retry_readiness
                        - retry_registration
                        - contact_support
                        - distribute_to_default_plugin
                        - repair_publication
                selected_project_name:
                    type: string
                    description: Display name of the workflow-bound project, when one has been selected.
                selected_project_slug:
                    type: string
                    description: Slug of the workflow-bound project, when one has been selected.
                selected_use_verified:
                    type: boolean
                    description: Whether the server observed a successful normal Remote MCP tool call for the currently attached selected distribution version.
                stage:
                    type: string
                    description: Current server-derived onboarding stage.
                    enum:
                        - not_started
                        - install_instructions
                        - authorized
                        - connection_ready
                workflow_active:
                    type: boolean
                    description: Whether the authenticated user has an active onboarding workflow in this organization.
            description: Safe, session-authenticated Platform MCP onboarding projection. It contains no provider URLs, credentials, OAuth values, setup handoffs, or internal resource identifiers.
            required:
                - enabled
                - stage
                - mcp_url
                - workflow_active
                - organization_setup_complete
                - client_family
                - agent_configuration_copied
                - connection_authorized
                - connection_auth_state
                - reauthorization_reason
                - connection_ready
                - catalog_explored
                - selected_project_name
                - selected_project_slug
                - registration_complete
                - readiness_state
                - readiness_freshness
                - distribution_state
                - distribution_attached
                - distribution_tool_succeeded
                - readiness_verified
                - distribution_publication_state
                - selected_use_verified
                - distribution_expected_version
                - repair_action
        PlatformMCPPackageStatusResult:
            type: object
            properties:
                admission:
                    type: string
                    description: 'Organization package admission: enabled, disabled, or indeterminate.'
                    enum:
                        - enabled
                        - disabled
                        - indeterminate
                agent_plugin_filename:
                    type: string
                    description: Deterministic portable Agent Plugins direct-download ZIP filename.
                available:
                    type: boolean
                    description: Whether organization admission currently permits installing the package.
                canonical_project_slug:
                    type: string
                    description: Literal default project that owns the canonical organization marketplace, when present.
                claude_filename:
                    type: string
                    description: Deterministic Claude direct-download ZIP filename.
                direct_download_available:
                    type: boolean
                    description: Whether keyless direct downloads are currently admitted.
                freshness:
                    type: string
                    description: 'Platform package freshness: current, stale, missing, unavailable, or indeterminate.'
                    enum:
                        - current
                        - stale
                        - missing
                        - unavailable
                        - indeterminate
                marketplace_connected:
                    type: boolean
                    description: Whether the canonical default project has a published GitHub marketplace.
                marketplace_name:
                    type: string
                    description: Effective name of the canonical marketplace, when its default project is present.
                marketplace_url:
                    type: string
                    description: Git URL used by supported clients to register the canonical marketplace.
                package_name:
                    type: string
                    description: Fixed Platform MCP package identity.
                package_present:
                    type: boolean
                    description: Whether the last successful canonical publish recorded the Platform package fingerprint.
                repair_allowed:
                    type: boolean
                    description: Whether an organization admin can publish or repair the canonical package now.
                repo_url:
                    type: string
                    description: Canonical GitHub repository URL.
            required:
                - admission
                - available
                - package_name
                - claude_filename
                - agent_plugin_filename
                - marketplace_connected
                - package_present
                - freshness
                - repair_allowed
                - direct_download_available
        PlatformToolDefinition:
            type: object
            properties:
                annotations:
                    $ref: '#/components/schemas/ToolAnnotations'
                canonical:
                    $ref: '#/components/schemas/CanonicalToolAttributes'
                canonical_name:
                    type: string
                    description: The canonical name of the tool. Will be the same as the name if there is no variation.
                confirm:
                    type: string
                    description: Confirmation mode for the tool
                confirm_prompt:
                    type: string
                    description: Prompt for the confirmation
                created_at:
                    type: string
                    description: The creation date of the tool.
                    format: date-time
                description:
                    type: string
                    description: Description of the tool
                id:
                    type: string
                    description: The ID of the tool
                name:
                    type: string
                    description: The name of the tool
                owner_id:
                    type: string
                    description: Optional owning entity ID
                owner_kind:
                    type: string
                    description: The entity kind that owns this tool's lifecycle
                project_id:
                    type: string
                    description: The ID of the project
                schema:
                    type: string
                    description: JSON schema for the request
                schema_version:
                    type: string
                    description: Version of the schema
                source_slug:
                    type: string
                    description: 'The backing platform tool source (for example: logs)'
                summarizer:
                    type: string
                    description: Summarizer for the tool
                tool_urn:
                    type: string
                    description: The URN of this tool
                updated_at:
                    type: string
                    description: The last update date of the tool.
                    format: date-time
                variation:
                    $ref: '#/components/schemas/ToolVariation'
            description: A platform-owned tool served directly by the platform
            required:
                - source_slug
                - id
                - project_id
                - name
                - canonical_name
                - description
                - schema
                - tool_urn
                - created_at
                - updated_at
        Plugin:
            type: object
            properties:
                agent_plugins_v1_compatible:
                    type: boolean
                    description: Whether the plugin's complete current intended state can be published as an Agent Plugins 1.0 package.
                assignment_count:
                    type: integer
                    description: Number of role/user assignments.
                    format: int64
                assignments:
                    type: array
                    items:
                        $ref: '#/components/schemas/PluginAssignment'
                    description: Role/user assignments.
                created_at:
                    type: string
                    format: date-time
                description:
                    type: string
                    description: Optional description.
                id:
                    type: string
                    description: Unique plugin identifier.
                    format: uuid
                is_default:
                    type: boolean
                    description: Whether this is the project's fallback plugin that new servers attach to.
                name:
                    type: string
                    description: Display name.
                server_count:
                    type: integer
                    description: Number of active servers in this plugin.
                    format: int64
                servers:
                    type: array
                    items:
                        $ref: '#/components/schemas/PluginServer'
                    description: Servers included in this plugin.
                skill_count:
                    type: integer
                    description: Number of active skills in this plugin.
                    format: int64
                slug:
                    type: string
                    description: URL-safe identifier, unique per org.
                updated_at:
                    type: string
                    format: date-time
            required:
                - id
                - name
                - slug
                - agent_plugins_v1_compatible
                - created_at
                - updated_at
        PluginAssignment:
            type: object
            properties:
                created_at:
                    type: string
                    format: date-time
                id:
                    type: string
                    description: Unique assignment identifier.
                    format: uuid
                principal_urn:
                    type: string
                    description: Principal URN (e.g. role:organization:<uuid>, user:id, or *).
            required:
                - id
                - principal_urn
                - created_at
        PluginServer:
            type: object
            properties:
                created_at:
                    type: string
                    format: date-time
                display_name:
                    type: string
                    description: Display name shown in generated plugin config.
                id:
                    type: string
                    description: Unique plugin server identifier.
                    format: uuid
                mcp_server_id:
                    type: string
                    description: Gram MCP server ID. Set when this server is Remote MCP-backed (exactly one of toolset_id / mcp_server_id is set).
                    format: uuid
                policy:
                    type: string
                    description: Whether this server is required or optional.
                    enum:
                        - required
                        - optional
                sort_order:
                    type: integer
                    description: Ordering within the plugin.
                    format: int32
                toolset_id:
                    type: string
                    description: Gram toolset ID. Set when this server is toolset-backed (exactly one of toolset_id / mcp_server_id is set).
                    format: uuid
            required:
                - id
                - display_name
                - policy
                - sort_order
                - created_at
        PluginSkillDistribution:
            type: object
            properties:
                channel:
                    type: string
                    description: The distribution channel.
                    enum:
                        - plugin
                created_at:
                    type: string
                    description: When the distribution was created.
                    format: date-time
                created_by_user_id:
                    type: string
                    description: The user that created the distribution.
                id:
                    type: string
                    description: The distribution ID.
                    format: uuid
                pinned_version_id:
                    type: string
                    description: The pinned version, absent when tracking the latest valid version.
                    format: uuid
                plugin_id:
                    type: string
                    description: The plugin that carries the skill.
                    format: uuid
                plugin_name:
                    type: string
                    description: The name of the plugin that carries the skill.
                project_id:
                    type: string
                    description: The project that owns the distribution.
                    format: uuid
                resolved_version_id:
                    type: string
                    description: The version currently targeted by this distribution.
                    format: uuid
                skill_display_name:
                    type: string
                    description: The display name of the distributed skill.
                skill_id:
                    type: string
                    description: The distributed skill ID.
                    format: uuid
                skill_name:
                    type: string
                    description: The canonical name of the distributed skill.
                updated_at:
                    type: string
                    description: When the distribution configuration last changed.
                    format: date-time
            description: An active plugin distribution of a project skill.
            required:
                - id
                - project_id
                - skill_id
                - skill_name
                - skill_display_name
                - plugin_id
                - plugin_name
                - resolved_version_id
                - channel
                - created_by_user_id
                - created_at
                - updated_at
        PolicyBypassRedemption:
            type: object
            properties:
                id:
                    type: string
                    description: The id of the created or refreshed request.
                kind:
                    type: string
                    description: The kind of request the token redeemed into.
                    enum:
                        - approval_request
                        - bypass_request
                status:
                    type: string
                    description: The request's current status.
            description: 'What a redeemed block-link token turned into: an MCP access request when the approval workflow handles the server, or a legacy policy bypass request otherwise.'
            required:
                - kind
                - id
                - status
        PreviewSpendRuleRequestBody:
            type: object
            properties:
                limit_usd:
                    type: number
                    description: Per-person budget in USD used to compute usage percentages.
                    format: double
                    minimum: 0
                target:
                    $ref: '#/components/schemas/SpendRuleTargetCondition'
                warn_at_pct:
                    type: integer
                    description: Percentage of the limit at which a warning event is emitted.
                    default: 80
                    format: int64
                    minimum: 1
                    maximum: 100
                window_kind:
                    type: string
                    description: UTC calendar window to compute spend over.
                    enum:
                        - daily
                        - weekly
                        - monthly
            required:
                - target
                - limit_usd
                - window_kind
        PreviewSpendRuleResult:
            type: object
            properties:
                actors:
                    type: array
                    items:
                        $ref: '#/components/schemas/SpendRuleActorUsage'
                    description: Matched actors with their current-window spend, ordered by spend descending. Capped at 50 entries.
                matched_count:
                    type: integer
                    description: Total number of organization members the target expression matches.
                    format: int64
                window_end:
                    type: string
                    description: Exclusive end of the current window used for spend.
                    format: date-time
                window_start:
                    type: string
                    description: Inclusive start of the current window used for spend.
                    format: date-time
            required:
                - matched_count
                - window_start
                - window_end
                - actors
        Project:
            type: object
            properties:
                created_at:
                    type: string
                    description: The creation date of the project.
                    format: date-time
                id:
                    type: string
                    description: The ID of the project
                logo_asset_id:
                    type: string
                    description: The ID of the logo asset for the project
                name:
                    type: string
                    description: The name of the project
                organization_id:
                    type: string
                    description: The ID of the organization that owns the project
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                updated_at:
                    type: string
                    description: The last update date of the project.
                    format: date-time
            required:
                - id
                - name
                - slug
                - organization_id
                - created_at
                - updated_at
        ProjectEntry:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the project
                name:
                    type: string
                    description: The name of the project
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            required:
                - id
                - name
                - slug
        ProjectOverviewSummary:
            type: object
            properties:
                active_servers_count:
                    type: integer
                    description: Number of MCP servers with at least one tool call in the time period
                    format: int64
                active_users_count:
                    type: integer
                    description: Number of unique users with activity in the time period
                    format: int64
                failed_chats:
                    type: integer
                    description: Number of failed chat sessions
                    format: int64
                failed_tool_calls:
                    type: integer
                    description: Number of failed tool calls
                    format: int64
                llm_client_breakdown:
                    type: array
                    items:
                        $ref: '#/components/schemas/LLMClientUsage'
                    description: Breakdown of messages/activity by LLM client/agent
                resolved_chats:
                    type: integer
                    description: Number of resolved chat sessions
                    format: int64
                top_servers:
                    type: array
                    items:
                        $ref: '#/components/schemas/TopServer'
                    description: Top 10 MCP servers by tool call count
                top_users:
                    type: array
                    items:
                        $ref: '#/components/schemas/TopUser'
                    description: Top 10 users by activity (# of messages or tool calls depending on metrics_mode)
                total_chats:
                    type: integer
                    description: Total number of chat sessions
                    format: int64
                total_tool_calls:
                    type: integer
                    description: Total number of tool calls
                    format: int64
            description: Aggregated project-level summary metrics for a time period
            required:
                - total_chats
                - resolved_chats
                - failed_chats
                - total_tool_calls
                - failed_tool_calls
                - active_servers_count
                - active_users_count
                - top_users
                - top_servers
                - llm_client_breakdown
        ProjectSummary:
            type: object
            properties:
                avg_chat_duration_ms:
                    type: number
                    description: Average chat request duration in milliseconds
                    format: double
                avg_chat_resolution_score:
                    type: number
                    description: Average chat resolution score (0-100)
                    format: double
                avg_tokens_per_request:
                    type: number
                    description: Average tokens per chat request
                    format: double
                avg_tool_duration_ms:
                    type: number
                    description: Average tool call duration in milliseconds
                    format: double
                cache_creation_input_tokens:
                    type: integer
                    description: Sum of cache creation input tokens
                    format: int64
                cache_read_input_tokens:
                    type: integer
                    description: Sum of cache read input tokens
                    format: int64
                chat_resolution_abandoned:
                    type: integer
                    description: Chats abandoned by user
                    format: int64
                chat_resolution_failure:
                    type: integer
                    description: Chats that failed to resolve
                    format: int64
                chat_resolution_partial:
                    type: integer
                    description: Chats partially resolved
                    format: int64
                chat_resolution_success:
                    type: integer
                    description: Chats resolved successfully
                    format: int64
                distinct_models:
                    type: integer
                    description: Number of distinct models used (project scope only)
                    format: int64
                distinct_providers:
                    type: integer
                    description: Number of distinct providers used (project scope only)
                    format: int64
                finish_reason_stop:
                    type: integer
                    description: Requests that completed naturally
                    format: int64
                finish_reason_tool_calls:
                    type: integer
                    description: Requests that resulted in tool calls
                    format: int64
                first_seen_unix_nano:
                    type: string
                    description: Earliest activity timestamp in Unix nanoseconds
                last_seen_unix_nano:
                    type: string
                    description: Latest activity timestamp in Unix nanoseconds
                models:
                    type: array
                    items:
                        $ref: '#/components/schemas/ModelUsage'
                    description: List of models used with call counts
                tool_call_failure:
                    type: integer
                    description: Failed tool calls (4xx/5xx status)
                    format: int64
                tool_call_success:
                    type: integer
                    description: Successful tool calls (2xx status)
                    format: int64
                tools:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsage'
                    description: List of tools used with success/failure counts
                total_chat_requests:
                    type: integer
                    description: Total number of chat requests
                    format: int64
                total_chats:
                    type: integer
                    description: Number of unique chat sessions (project scope only)
                    format: int64
                total_cost:
                    type: number
                    description: Total cost of all requests
                    format: double
                total_input_tokens:
                    type: integer
                    description: Sum of input tokens used
                    format: int64
                total_output_tokens:
                    type: integer
                    description: Sum of output tokens used
                    format: int64
                total_tokens:
                    type: integer
                    description: Sum of all tokens used
                    format: int64
                total_tool_calls:
                    type: integer
                    description: Total number of tool calls
                    format: int64
            description: Aggregated metrics
            required:
                - first_seen_unix_nano
                - last_seen_unix_nano
                - total_input_tokens
                - total_output_tokens
                - total_tokens
                - cache_read_input_tokens
                - cache_creation_input_tokens
                - total_cost
                - avg_tokens_per_request
                - total_chat_requests
                - avg_chat_duration_ms
                - finish_reason_stop
                - finish_reason_tool_calls
                - total_tool_calls
                - tool_call_success
                - tool_call_failure
                - avg_tool_duration_ms
                - chat_resolution_success
                - chat_resolution_failure
                - chat_resolution_partial
                - chat_resolution_abandoned
                - avg_chat_resolution_score
                - total_chats
                - distinct_models
                - distinct_providers
                - models
                - tools
        PromoteRequestBody:
            type: object
            properties:
                risk_policy_bypass_request_id:
                    type: string
                    description: The bypass request to promote.
            required:
                - risk_policy_bypass_request_id
        PromptGuardrailEvalResult:
            type: object
            properties:
                chat_id:
                    type: string
                    description: The chat session that was replayed.
                    format: uuid
                flagged:
                    type: boolean
                    description: True when the guardrail flagged at least one in-scope message.
                judged_count:
                    type: integer
                    description: Number of in-scope messages the judge evaluated.
                    format: int64
                total_cost_usd:
                    type: number
                    description: Total OpenRouter cost across in-scope judge calls, in USD.
                    format: double
                total_latency_ms:
                    type: integer
                    description: Aggregate judge latency overhead across in-scope messages, computed as the sum of per-message judge latencies.
                    format: int64
                verdicts:
                    type: array
                    items:
                        $ref: '#/components/schemas/PromptGuardrailMessageVerdict'
                    description: Per-message verdicts for in-scope messages, ordered by seq.
            description: 'The result of replaying a prompt guardrail against one chat session. Read-only: no findings are persisted.'
            required:
                - chat_id
                - flagged
                - judged_count
                - total_cost_usd
                - total_latency_ms
                - verdicts
        PromptGuardrailMessageVerdict:
            type: object
            properties:
                completion_tokens:
                    type: integer
                    description: Completion tokens billed for this judge call.
                    format: int64
                confidence:
                    type: number
                    description: Judge confidence in [0,1]; 0 when not matched.
                    format: double
                cost_usd:
                    type: number
                    description: OpenRouter cost for judging this message, in USD. Zero when cost was not returned.
                    format: double
                latency_ms:
                    type: integer
                    description: Wall-clock latency for judging this message, in milliseconds.
                    format: int64
                matched:
                    type: boolean
                    description: True when the guardrail flagged this message.
                message_id:
                    type: string
                    description: The chat message ID.
                    format: uuid
                message_type:
                    type: string
                    description: The judged message type (user_message, assistant_message, tool_request, tool_response, prompt_attachment).
                prompt_tokens:
                    type: integer
                    description: Prompt tokens billed for this judge call.
                    format: int64
                rationale:
                    type: string
                    description: One-sentence judge rationale; empty when not matched.
                seq:
                    type: integer
                    description: Message sequence within the chat generation, ascending.
                    format: int64
                tool_name:
                    type: string
                    description: Tool name for a single-call tool_request message; empty otherwise.
                total_tokens:
                    type: integer
                    description: Total tokens billed for this judge call.
                    format: int64
            description: The LLM judge's verdict for one in-scope message in the replayed session.
            required:
                - message_id
                - seq
                - message_type
                - matched
                - confidence
                - rationale
                - latency_ms
                - cost_usd
                - prompt_tokens
                - completion_tokens
                - total_tokens
        PromptTemplate:
            type: object
            properties:
                annotations:
                    $ref: '#/components/schemas/ToolAnnotations'
                canonical:
                    $ref: '#/components/schemas/CanonicalToolAttributes'
                canonical_name:
                    type: string
                    description: The canonical name of the tool. Will be the same as the name if there is no variation.
                confirm:
                    type: string
                    description: Confirmation mode for the tool
                confirm_prompt:
                    type: string
                    description: Prompt for the confirmation
                created_at:
                    type: string
                    description: The creation date of the tool.
                    format: date-time
                description:
                    type: string
                    description: Description of the tool
                engine:
                    type: string
                    description: The template engine
                    enum:
                        - mustache
                history_id:
                    type: string
                    description: The revision tree ID for the prompt template
                id:
                    type: string
                    description: The ID of the tool
                kind:
                    type: string
                    description: The kind of prompt the template is used for
                    enum:
                        - prompt
                        - higher_order_tool
                name:
                    type: string
                    description: The name of the tool
                predecessor_id:
                    type: string
                    description: The previous version of the prompt template to use as predecessor
                project_id:
                    type: string
                    description: The ID of the project
                prompt:
                    type: string
                    description: The template content
                schema:
                    type: string
                    description: JSON schema for the request
                schema_version:
                    type: string
                    description: Version of the schema
                summarizer:
                    type: string
                    description: Summarizer for the tool
                tool_urn:
                    type: string
                    description: The URN of this tool
                tool_urns_hint:
                    type: array
                    items:
                        type: string
                    description: The suggested tool URNS associated with the prompt template
                    maxItems: 20
                tools_hint:
                    type: array
                    items:
                        type: string
                    description: The suggested tool names associated with the prompt template
                    maxItems: 20
                updated_at:
                    type: string
                    description: The last update date of the tool.
                    format: date-time
                variation:
                    $ref: '#/components/schemas/ToolVariation'
            description: A prompt template
            required:
                - id
                - history_id
                - name
                - prompt
                - engine
                - kind
                - tools_hint
                - tool_urn
                - created_at
                - updated_at
                - project_id
                - canonical_name
                - description
                - schema
        PromptTemplateEntry:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the prompt template
                kind:
                    type: string
                    description: The kind of the prompt template
                name:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            required:
                - id
                - name
        ProtectedResourceMetadata:
            type: object
            properties:
                authorization_servers:
                    type: array
                    items:
                        type: string
                    description: Authorization servers that can issue access tokens for this resource.
                bearer_methods_supported:
                    type: array
                    items:
                        type: string
                    description: Bearer token presentation methods accepted by the resource server.
                resource:
                    type: string
                    description: The resource server's identifier.
                resource_documentation:
                    type: string
                    description: URL of human-readable documentation for the resource server.
                scopes_supported:
                    type: array
                    items:
                        type: string
                    description: Scopes advertised by the resource server.
            description: RFC 9728 OAuth Protected Resource Metadata advertised by a remote MCP server. Only fields the dashboard renders are typed; the RFC allows additional members.
        ProtectedResourceMetadataDiscovery:
            type: object
            properties:
                available:
                    type: boolean
                    description: True when the upstream advertised an RFC 9728 document. False for any unavailability reason — see the unavailable field for the cause.
                discovery_warnings:
                    type: array
                    items:
                        type: string
                    description: Informational deviations from RFC 9728 detected on a successful probe (e.g. missing resource field, mismatched resource value). Empty when available is false.
                metadata:
                    $ref: '#/components/schemas/ProtectedResourceMetadata'
                unavailable:
                    $ref: '#/components/schemas/ProtectedResourceMetadataUnavailable'
            description: Outcome of an RFC 9728 protected resource metadata probe against a remote MCP server. available=true exposes the parsed metadata; available=false exposes a typed unavailability reason. Always returned with HTTP 200 — probe failures (including 404 from upstream) are not errors at this layer because non-OAuth resource servers are an expected, normal outcome.
            required:
                - available
                - discovery_warnings
        ProtectedResourceMetadataUnavailable:
            type: object
            properties:
                code:
                    type: string
                    description: Machine-readable failure code (e.g. not_found, http_error, transport_error, timeout, malformed, host_blocked, invalid_url). Intentionally a free-form string so adding new failure modes is not a breaking SDK change.
                message:
                    type: string
                    description: Human-readable summary of the unavailability reason, composed by the backend. Dashboards should render verbatim.
            description: Reason an RFC 9728 protected resource metadata probe was unavailable. Surfaced when available is false.
            required:
                - code
                - message
        PublishPackageForm:
            type: object
            properties:
                deployment_id:
                    type: string
                    description: The deployment ID to associate with the package version
                name:
                    type: string
                    description: The name of the package
                version:
                    type: string
                    description: The new semantic version of the package to publish
                visibility:
                    type: string
                    description: The visibility of the package version
                    enum:
                        - public
                        - private
            required:
                - name
                - version
                - deployment_id
                - visibility
        PublishPackageResult:
            type: object
            properties:
                package:
                    $ref: '#/components/schemas/Package'
                version:
                    $ref: '#/components/schemas/PackageVersion'
            required:
                - package
                - version
        PublishPluginsRequestBody:
            type: object
            properties:
                github_usernames:
                    type: array
                    items:
                        type: string
                    description: GitHub usernames to add as collaborators on the repo.
        PublishPluginsResult:
            type: object
            properties:
                repo_url:
                    type: string
                    description: The URL of the published GitHub repository.
            required:
                - repo_url
        PublishStatusResult:
            type: object
            properties:
                claude_observability_plugin:
                    type: string
                    description: Slug of the generated Claude Code observability plugin in the published marketplace — install as `<slug>@<marketplace name>`. Present when connected.
                codex_observability_plugin:
                    type: string
                    description: Slug of the generated Codex observability plugin in the published marketplace — install as `<slug>@<marketplace name>`. Present when connected.
                configured:
                    type: boolean
                    description: Whether GitHub publishing is configured on the server.
                connected:
                    type: boolean
                    description: Whether this project has a GitHub connection.
                has_collaborators:
                    type: boolean
                    description: Whether the repo has at least one directly-added GitHub collaborator (excludes access granted via org membership/teams). Absent when the project is not connected.
                last_published_at:
                    type: string
                    description: When the project was last published to GitHub. Absent when the project is not connected.
                    format: date-time
                live_version:
                    type: string
                    description: Version stamped into the currently published plugin.json manifests (e.g. 0.1.1783692954) — the version plugin clients such as Claude Code report for installed plugins. Absent when the project is not connected or the live version could not be determined.
                marketplace_url:
                    type: string
                    description: Git-based Claude Code marketplace URL — the value to pass to `/plugin marketplace add` or set as the source URL in `extraKnownMarketplaces`. Present once a marketplace token has been minted, which happens automatically on the first publish.
                repo_name:
                    type: string
                    description: GitHub repo name, if connected.
                repo_owner:
                    type: string
                    description: GitHub repo owner, if connected.
                repo_url:
                    type: string
                    description: Full GitHub repository URL, if connected.
                up_to_date:
                    type: boolean
                    description: Whether the project's current plugin state matches what was last published to GitHub. Absent when the project is not connected, or when the connection predates content fingerprinting (freshness can't be determined).
            required:
                - configured
                - connected
        QueryFilter:
            type: object
            properties:
                dimension:
                    type: string
                    description: Dimension to filter on
                    enum:
                        - department_name
                        - job_title
                        - employee_type
                        - division_name
                        - cost_center_name
                        - email
                        - hostname
                        - model
                        - hook_source
                        - account_type
                        - provider
                        - billing_mode
                        - query_source
                        - skill_name
                        - skill_version
                        - agent_name
                        - mcp_server_name
                        - mcp_tool_name
                        - role
                        - group
                        - project_id
                values:
                    type: array
                    items:
                        type: string
                    description: Match if the dimension equals any of these values (IN semantics; for multi-valued dimensions like role/group, matches if any element is present).
                    minItems: 1
            description: A single filter predicate on an allowlisted dimension
            required:
                - dimension
                - values
        QueryMeasures:
            type: object
            properties:
                cache_creation_input_tokens:
                    type: integer
                    description: Sum of cache creation input tokens
                    format: int64
                cache_read_input_tokens:
                    type: integer
                    description: Sum of cache read input tokens
                    format: int64
                scored_cost:
                    type: number
                    description: Total cost in USD of the sessions that carry a work-units score. Divide by total_work_units for cost per unit; using total_cost would overstate it whenever analysis coverage is partial.
                    format: double
                scored_tokens:
                    type: integer
                    description: Total tokens of the sessions that carry a work-units score. Divide by total_work_units for tokens per unit.
                    format: int64
                total_chats:
                    type: integer
                    description: Number of distinct chat sessions
                    format: int64
                total_cost:
                    type: number
                    description: Total cost in USD
                    format: double
                total_input_tokens:
                    type: integer
                    description: Sum of input tokens
                    format: int64
                total_output_tokens:
                    type: integer
                    description: Sum of output tokens
                    format: int64
                total_tokens:
                    type: integer
                    description: Sum of all tokens
                    format: int64
                total_tool_calls:
                    type: integer
                    description: Total number of tool calls
                    format: int64
                total_work_units:
                    type: number
                    description: Total work units delivered by scored sessions (work-units analysis)
                    format: double
            description: Aggregated measure values for a group or time bucket
            required:
                - total_cost
                - total_input_tokens
                - total_output_tokens
                - total_tokens
                - cache_read_input_tokens
                - cache_creation_input_tokens
                - total_tool_calls
                - total_chats
                - total_work_units
                - scored_cost
                - scored_tokens
        QueryPayload:
            type: object
            properties:
                filters:
                    type: array
                    items:
                        $ref: '#/components/schemas/QueryFilter'
                    description: Optional filters; all filters are ANDed together.
                from:
                    type: string
                    description: Start time in ISO 8601 format
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                granularity_seconds:
                    type: integer
                    description: Optional timeseries bucket size in seconds. Defaults to an interval derived from the time range and is floored to 3600 (the source data is bucketed hourly).
                    format: int64
                group_by:
                    type: string
                    description: Optional dimension to break results down by. When omitted, a single aggregate row/series for the whole slice is returned.
                    example: department_name
                    enum:
                        - department_name
                        - job_title
                        - employee_type
                        - division_name
                        - cost_center_name
                        - email
                        - hostname
                        - model
                        - hook_source
                        - account_type
                        - provider
                        - billing_mode
                        - query_source
                        - skill_name
                        - skill_version
                        - agent_name
                        - mcp_server_name
                        - mcp_tool_name
                        - role
                        - group
                        - project_id
                sort_by:
                    type: string
                    description: Measure used to rank groups for top_n. Defaults to total_cost.
                    default: total_cost
                    enum:
                        - total_cost
                        - total_tokens
                        - total_input_tokens
                        - total_output_tokens
                        - cache_read_input_tokens
                        - cache_creation_input_tokens
                        - total_tool_calls
                        - total_chats
                        - total_work_units
                        - scored_cost
                        - scored_tokens
                to:
                    type: string
                    description: End time in ISO 8601 format
                    example: "2025-12-26T10:00:00Z"
                    format: date-time
                top_n:
                    type: integer
                    description: When group_by is set, keep at most this many groups (ranked by sort_by); the remainder are rolled into an 'Other' group. Defaults to 10.
                    default: 10
                    format: int64
                    minimum: 1
            description: Payload for a generic org-scoped analytics query. Queries involving skill_version use raw telemetry retained for 90 days and attribute each whole session to every activated version; timeseries place the whole session in its start-time bucket.
            required:
                - from
                - to
        QueryPoint:
            type: object
            properties:
                bucket_time_unix_nano:
                    type: string
                    description: Bucket start time in Unix nanoseconds (string for JS precision)
                measures:
                    $ref: '#/components/schemas/QueryMeasures'
            description: A single time bucket within a series
            required:
                - bucket_time_unix_nano
                - measures
        QueryResult:
            type: object
            properties:
                group_by:
                    type: string
                    description: Echoes the requested group_by dimension; empty when none was requested.
                interval_seconds:
                    type: integer
                    description: The timeseries bucket interval in seconds.
                    format: int64
                table:
                    type: array
                    items:
                        $ref: '#/components/schemas/QueryRow'
                    description: Grouped totals over the full time range, ordered by sort_by descending.
                timeseries:
                    type: array
                    items:
                        $ref: '#/components/schemas/QuerySeries'
                    description: One series per group value (aligned with table rows), each gap-filled.
            description: 'Result of a generic analytics query: a grouped table and a matching per-group timeseries over the same data slice.'
            required:
                - group_by
                - interval_seconds
                - table
                - timeseries
        QueryRow:
            type: object
            properties:
                dimension_values:
                    type: object
                    description: 'Distinct values of every allowlisted dimension other than the group_by dimension, observed within this group. Keyed by dimension identifier (the same keys used for group_by/filters, e.g. when grouping by department_name: ''email'' -> [...], ''job_title'' -> [...], ''role'' -> [...]). Empty values are omitted and each list is capped.'
                    additionalProperties:
                        type: array
                        items:
                            type: string
                group_value:
                    type: string
                    description: The dimension value for this row. Empty string when no group_by was requested; 'Other' for the rolled-up remainder beyond top_n.
                measures:
                    $ref: '#/components/schemas/QueryMeasures'
            description: 'One row of the grouped table: measures aggregated over the full time range for a single group value.'
            required:
                - group_value
                - measures
                - dimension_values
        QuerySeries:
            type: object
            properties:
                group_value:
                    type: string
                    description: The dimension value for this series. Empty string when no group_by was requested; 'Other' for the rolled-up remainder beyond top_n.
                points:
                    type: array
                    items:
                        $ref: '#/components/schemas/QueryPoint'
                    description: Time buckets in ascending order, gap-filled with zeros.
            description: A gap-filled timeseries for a single group value (one line on the chart).
            required:
                - group_value
                - points
        RearmTrialRequestBody:
            type: object
            properties:
                days:
                    type: integer
                    description: Number of days the re-armed trial runs for, counted from now.
                    format: int64
                    minimum: 1
                    maximum: 365
                id:
                    type: string
                    description: Organization ID.
                    minLength: 1
            required:
                - id
                - days
        RecordDashboardCtaEventRequestBody:
            type: object
            properties:
                action:
                    type: string
                    description: CTA action.
                    enum:
                        - impression
                        - selected
                        - dismissed
                surface:
                    type: string
                    description: CTA surface.
                    enum:
                        - sidebar_footer
                        - sources_empty
                        - project_overview_zero_data
                        - organization_home
            required:
                - action
                - surface
        RecordDecisionRequestBody:
            type: object
            properties:
                decision:
                    type: string
                    description: Either approved or denied.
                    enum:
                        - approved
                        - denied
                granted_principal_urns:
                    type: array
                    items:
                        type: string
                    description: Principals the approval covers. Empty for a denial.
                id:
                    type: string
                    description: The approval request ID.
                rationale:
                    type: string
                    description: Why the decision was made. This is the artifact cited when explaining the decision to the requester, so it cannot be blank.
                research_report_id:
                    type: string
                    description: A research report this decision cites. Must belong to the request being decided.
            required:
                - id
                - decision
                - rationale
        RecordInstallIntentRequestBody:
            type: object
            properties:
                client_family:
                    type: string
                    description: Manual-install client family.
                    enum:
                        - claude_code
                        - claude_cowork
                        - codex
                        - cursor
                        - opencode
            required:
                - client_family
        RecordSkillResult:
            type: object
            properties:
                created_skill:
                    type: boolean
                    description: Whether this request created the skill.
                created_version:
                    type: boolean
                    description: Whether this request created a new immutable version rather than resolving to an existing canonical version.
                skill:
                    $ref: '#/components/schemas/Skill'
                version:
                    $ref: '#/components/schemas/SkillVersion'
            description: The result of recording an uploaded skill manifest, including whether the operation created either resource.
            required:
                - skill
                - version
                - created_skill
                - created_version
        RedeemRequestBody:
            type: object
            properties:
                code:
                    type: string
                    description: The opaque one-time code issued by authorize.
                code_verifier:
                    type: string
                    description: The PKCE code verifier whose base64url(sha256(...)) equals the stored code_challenge.
                    minLength: 43
                    maxLength: 128
            required:
                - code
                - code_verifier
        RedeemResponseBody:
            type: object
            properties:
                access_token:
                    type: string
                    description: The raw gram_ API key, carrying the [agent,hooks] scopes. Returned exactly once.
                project_slug:
                    type: string
                    description: Slug of the project the key is scoped to.
                user_email:
                    type: string
                    description: Email of the user the key was minted for.
            required:
                - access_token
                - user_email
                - project_slug
        RedeployRequestBody:
            type: object
            properties:
                deployment_id:
                    type: string
                    description: The ID of the deployment to redeploy.
            required:
                - deployment_id
        RedeployResult:
            type: object
            properties:
                deployment:
                    $ref: '#/components/schemas/Deployment'
        RegisterRequestBody:
            type: object
            properties:
                org_name:
                    type: string
                    description: The name of the org to register
            required:
                - org_name
        RemoteMcpServer:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the remote MCP server was created
                    format: date-time
                id:
                    type: string
                    description: The ID of the remote MCP server
                    format: uuid
                name:
                    type: string
                    description: Optional human-readable name for the remote MCP server
                project_id:
                    type: string
                    description: The project ID this remote MCP server belongs to
                    format: uuid
                slug:
                    type: string
                    description: URL-friendly slug derived from the URL and ID.
                transport_type:
                    type: string
                    description: The transport type for the remote MCP server
                updated_at:
                    type: string
                    description: When the remote MCP server was last updated
                    format: date-time
                url:
                    type: string
                    description: The URL of the remote MCP server
                    format: uri
            description: A remote MCP server configuration
            required:
                - id
                - project_id
                - url
                - transport_type
                - created_at
                - updated_at
        RemoteMcpServerHeader:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the header was created
                    format: date-time
                description:
                    type: string
                    description: Description of the header
                id:
                    type: string
                    description: The ID of the header
                    format: uuid
                is_required:
                    type: boolean
                    description: Whether the header is required
                is_secret:
                    type: boolean
                    description: Whether the header value is a secret
                name:
                    type: string
                    description: The header name
                updated_at:
                    type: string
                    description: When the header was last updated
                    format: date-time
                value:
                    type: string
                    description: The header value (redacted if secret)
                value_from_request_header:
                    type: string
                    description: Name of the inbound request header to pass through
            description: A header configured for a remote MCP server
            required:
                - id
                - name
                - is_required
                - is_secret
                - created_at
                - updated_at
        RemoteSession:
            type: object
            properties:
                access_expires_at:
                    type: string
                    description: Upstream access-token expiry. Independent of refresh_expires_at.
                    format: date-time
                created_at:
                    type: string
                    format: date-time
                has_refresh_token:
                    type: boolean
                    description: Whether the session holds an upstream refresh token. Gates the 'Refresh now' action; refresh_expires_at is insufficient because an upstream may issue a non-expiring refresh token. The token itself is never returned.
                id:
                    type: string
                    description: The remote_session id.
                    format: uuid
                refresh_expires_at:
                    type: string
                    description: Upstream refresh-token expiry. Null when the session has no refresh token.
                    format: date-time
                remote_session_client_id:
                    type: string
                    description: The remote_session_client this session was minted against.
                    format: uuid
                scopes:
                    type: array
                    items:
                        type: string
                    description: Scopes held by this session.
                subject_display_name:
                    type: string
                    description: Resolved display name when the subject is a Gram user. Absent for apikey/anonymous subjects or unresolved users.
                subject_email:
                    type: string
                    description: Resolved email when the subject is a Gram user. Absent for apikey/anonymous subjects or unresolved users.
                subject_urn:
                    type: string
                    description: The session's subject URN (user:<id> | apikey:<uuid> | anonymous:<mcp-session-id>).
                updated_at:
                    type: string
                    format: date-time
                user_session_issuer_id:
                    type: string
                    description: The user_session_issuer this session is bound to.
                    format: uuid
            description: A remote_session record — Gram's upstream OAuth session for a (principal, remote_session_client) pair. access_token_encrypted and refresh_token_encrypted are never returned.
            required:
                - id
                - subject_urn
                - user_session_issuer_id
                - remote_session_client_id
                - access_expires_at
                - has_refresh_token
                - scopes
                - created_at
                - updated_at
        RemoteSessionClient:
            type: object
            properties:
                audience:
                    type: string
                    description: Upstream OAuth audience sent on the authorize redirect and token exchange. Null omits the audience parameter.
                client_id:
                    type: string
                    description: The client_id used to identify this client at the issuer's token and authorization endpoints.
                client_id_issued_at:
                    type: string
                    format: date-time
                client_id_metadata_uri:
                    type: string
                    description: 'When set, the client is in Client ID Metadata Document (CIMD) mode: Gram hosts its OAuth client metadata document at this URL and uses it as the client_id. Null for non-CIMD clients.'
                client_secret_expires_at:
                    type: string
                    description: Null when the secret does not expire.
                    format: date-time
                created_at:
                    type: string
                    format: date-time
                id:
                    type: string
                    description: The remote_session_client id.
                    format: uuid
                organization_id:
                    type: string
                    description: The owning organization id. Empty for legacy rows not yet backfilled and global clients.
                project_id:
                    type: string
                    description: The owning project id. Empty for organization-level and global clients.
                remote_session_issuer_id:
                    type: string
                    description: The owning remote_session_issuer id.
                    format: uuid
                scope:
                    type: array
                    items:
                        type: string
                    description: Explicit upstream OAuth scopes the dance requests for this client. Null falls back to the issuer's scopes_supported.
                token_endpoint_auth_method:
                    type: string
                    description: How the client authenticates at the issuer's token endpoint. Null resolves to client_secret_basic at runtime.
                    enum:
                        - client_secret_basic
                        - client_secret_post
                        - none
                updated_at:
                    type: string
                    format: date-time
                user_session_issuer_ids:
                    type: array
                    items:
                        type: string
                        format: uuid
                    description: The user_session_issuers this client is attached to via the join table. Empty for a standalone client with no attachments.
            description: A remote_session_client record. client_secret_encrypted is never returned.
            required:
                - id
                - project_id
                - organization_id
                - remote_session_issuer_id
                - user_session_issuer_ids
                - client_id
                - client_id_issued_at
                - created_at
                - updated_at
        RemoteSessionIssuer:
            type: object
            properties:
                authorization_endpoint:
                    type: string
                    description: Upstream authorization endpoint.
                client_id_metadata_document_supported:
                    type: boolean
                    description: Whether the issuer accepts a Client ID Metadata Document URL as client_id (OAuth CIMD draft).
                client_setup_documentation_url:
                    type: string
                    description: URL of OAuth client setup documentation shown when creating clients. Manually set, not RFC 8414; null when unset.
                created_at:
                    type: string
                    format: date-time
                grant_types_supported:
                    type: array
                    items:
                        type: string
                id:
                    type: string
                    description: The remote_session_issuer id.
                    format: uuid
                issuer:
                    type: string
                    description: Issuer URL; matches the iss claim.
                jwks_uri:
                    type: string
                    description: Upstream JWKS URI; null when not advertised.
                logo_asset_id:
                    type: string
                    description: Optional logo asset id; null when unset.
                    format: uuid
                name:
                    type: string
                    description: Optional display name; null when unset.
                oidc:
                    type: boolean
                    description: When true, may unlock OIDC-aware behaviour.
                op_policy_uri:
                    type: string
                    description: RFC 8414 op_policy_uri; the issuer's client data-usage policy. Null when not advertised.
                op_tos_uri:
                    type: string
                    description: RFC 8414 op_tos_uri; the issuer's terms of service. Null when not advertised.
                organization_id:
                    type: string
                    description: The owning organization id. Empty for legacy rows not yet backfilled.
                passthrough:
                    type: boolean
                    description: When true, the MCP client registers and transacts directly with this issuer.
                project_id:
                    type: string
                    description: The owning project id. Empty for organization-level issuers.
                registration_endpoint:
                    type: string
                    description: Upstream RFC 7591 registration endpoint; null for issuers without DCR.
                response_types_supported:
                    type: array
                    items:
                        type: string
                revocation_endpoint:
                    type: string
                    description: Upstream RFC 7009 revocation endpoint; null when the issuer advertises none.
                scopes_supported:
                    type: array
                    items:
                        type: string
                service_documentation:
                    type: string
                    description: RFC 8414 service_documentation; developer documentation for the issuer. Null when not advertised.
                slug:
                    type: string
                    description: Project-unique slug.
                token_endpoint:
                    type: string
                    description: Upstream token endpoint.
                token_endpoint_auth_methods_supported:
                    type: array
                    items:
                        type: string
                updated_at:
                    type: string
                    format: date-time
            description: A remote_session_issuer record — upstream Authorization Server identity that Gram speaks OAuth to.
            required:
                - id
                - project_id
                - organization_id
                - slug
                - issuer
                - oidc
                - passthrough
                - client_id_metadata_document_supported
                - created_at
                - updated_at
        RemoteSessionIssuerDraft:
            type: object
            properties:
                authorization_endpoint:
                    type: string
                    description: Upstream authorization endpoint.
                client_id_metadata_document_supported:
                    type: boolean
                    description: Whether the issuer advertises support for a Client ID Metadata Document URL as client_id (OAuth CIMD draft), parsed from the discovery document.
                discovery_warnings:
                    type: array
                    items:
                        type: string
                    description: Warnings describing any RFC 8414 deviations encountered during discovery.
                grant_types_supported:
                    type: array
                    items:
                        type: string
                issuer:
                    type: string
                    description: Issuer URL; matches the iss claim.
                jwks_uri:
                    type: string
                    description: Upstream JWKS URI; null when not advertised.
                oidc:
                    type: boolean
                    description: When true, may unlock OIDC-aware behaviour.
                op_policy_uri:
                    type: string
                    description: RFC 8414 op_policy_uri; the issuer's client data-usage policy. Null when not advertised or when the advertised value is not an absolute http(s) URL.
                op_tos_uri:
                    type: string
                    description: RFC 8414 op_tos_uri; the issuer's terms of service. Null when not advertised or when the advertised value is not an absolute http(s) URL.
                passthrough:
                    type: boolean
                    description: When true, the MCP client registers and transacts directly with this issuer.
                registration_endpoint:
                    type: string
                    description: Upstream RFC 7591 registration endpoint; null for issuers without DCR.
                response_types_supported:
                    type: array
                    items:
                        type: string
                revocation_endpoint:
                    type: string
                    description: Upstream RFC 7009 revocation endpoint; null when the issuer advertises none.
                scopes_supported:
                    type: array
                    items:
                        type: string
                service_documentation:
                    type: string
                    description: RFC 8414 service_documentation; developer documentation for the issuer. Null when not advertised or when the advertised value is not an absolute http(s) URL.
                token_endpoint:
                    type: string
                    description: Upstream token endpoint.
                token_endpoint_auth_methods_supported:
                    type: array
                    items:
                        type: string
            description: A draft remote_session_issuer returned by discover. Same shape as RemoteSessionIssuer minus id/project_id/timestamps, plus discovery_warnings describing any RFC 8414 deviations.
            required:
                - issuer
                - oidc
                - passthrough
                - client_id_metadata_document_supported
                - discovery_warnings
        RemoteSessionIssuerDuplicateMatch:
            type: object
            properties:
                id:
                    type: string
                    description: The matching remote_session_issuer id.
                    format: uuid
                issuer:
                    type: string
                    description: The matching issuer's stored upstream URL. May differ in spelling from the URL that was looked up, since canonicalization is applied to the supplied URL only.
                name:
                    type: string
                    description: The matching issuer's display name. Empty when it has none, in which case a caller should fall back to the slug.
                project_name:
                    type: string
                    description: The owning project's name, for a project-specific match an organization administrator may not otherwise be able to place. Empty for organization-level and platform-level matches, and for project-specific matches returned to a caller already scoped to that project.
                slug:
                    type: string
                    description: The matching issuer's slug.
                tier:
                    type: string
                    description: 'Which tenancy tier owns the match: project-specific, organization-level, or platform-level.'
                    enum:
                        - project-specific
                        - organization-level
                        - platform-level
            description: An existing remote_session_issuer that already describes the upstream authorization server a caller is about to add.
            required:
                - id
                - slug
                - name
                - issuer
                - tier
                - project_name
        RemoteSessionIssuerDuplicatePreflight:
            type: object
            properties:
                matches:
                    type: array
                    items:
                        $ref: '#/components/schemas/RemoteSessionIssuerDuplicateMatch'
                    description: 'The matching issuers in resolution order: project-specific first, then organization-level, then platform-level, and oldest first within a tier. The first entry is therefore the issuer this caller would resolve the URL to today. Empty when nothing describes the URL yet, and empty when the supplied URL is not a usable issuer identifier. Truncated to a fixed cap, since a warning only has to establish that duplicates exist and name a few.'
            description: 'Existing remote_session_issuers that already describe an upstream issuer URL. Advisory: a non-empty result never blocks a create or an update.'
            required:
                - matches
        RemoteSessionIssuerRefresh:
            type: object
            properties:
                discovery_warnings:
                    type: array
                    items:
                        type: string
                    description: Warnings describing any RFC 8414 deviations encountered while re-reading the issuer's metadata document. A refresh that returns warnings still persisted its result; deviations severe enough to distrust the document abort the refresh with an error instead.
                issuer:
                    $ref: '#/components/schemas/RemoteSessionIssuer'
            description: 'Result of refreshMetadata: the stored remote_session_issuer as it now stands, plus any warnings raised while re-reading the upstream RFC 8414 document. Distinct from RemoteSessionIssuerDraft, which describes an issuer that may not exist yet and is never persisted.'
            required:
                - issuer
                - discovery_warnings
        RemoveClientFromMcpServerRequestBody:
            type: object
            properties:
                client_id:
                    type: string
                    description: The remote_session_client id.
                    format: uuid
                mcp_server_id:
                    type: string
                    description: The mcp_server id to detach from.
                    format: uuid
            required:
                - client_id
                - mcp_server_id
        RenderTemplateByIDRequestBody:
            type: object
            properties:
                arguments:
                    type: object
                    description: The input data to render the template with
                    additionalProperties: true
            required:
                - arguments
        RenderTemplateRequestBody:
            type: object
            properties:
                arguments:
                    type: object
                    description: The input data to render the template with
                    additionalProperties: true
                engine:
                    type: string
                    description: The template engine
                    enum:
                        - mustache
                kind:
                    type: string
                    description: The kind of prompt the template is used for
                    enum:
                        - prompt
                        - higher_order_tool
                prompt:
                    type: string
                    description: The template content to render
            required:
                - prompt
                - arguments
                - engine
                - kind
        RenderTemplateResult:
            type: object
            properties:
                prompt:
                    type: string
                    description: The rendered prompt
            required:
                - prompt
        ReportSessionMovedRequestBody:
            type: object
            properties:
                email:
                    type: string
                    description: Email of the enrolled user. Authoritative when authenticating with an org-scoped agent install key (the MDM zero-touch path); ignored for a per-user key, whose owner is the enrolled user.
                session_id:
                    type: string
                    description: Native harness session identifier of the moved session. Gram derives its chat id from this the same way hook ingest does; the move is recorded even if the session has not been captured yet.
                    maxLength: 256
                source_surface:
                    type: string
                    description: Harness the session originated in, as detected by the agent (e.g. claude-code, codex).
                    maxLength: 64
                target_harness:
                    type: string
                    description: Harness the session was moved to (e.g. cursor, codex, claude-code).
                    maxLength: 64
            required:
                - session_id
                - target_harness
        RequestAccessForm:
            type: object
            properties:
                message:
                    type: string
                    description: Optional message from the requester explaining why they need access.
                    maxLength: 1000
                resource_id:
                    type: string
                    description: Optional resource ID the scope applies to.
                resource_name:
                    type: string
                    description: Optional human-readable name for the resource (e.g. project name, MCP server name).
                scope:
                    type: string
                    description: The scope being requested.
                    enum:
                        - org:read
                        - org:admin
                        - project:read
                        - project:write
                        - mcp:read
                        - mcp:write
                        - mcp:connect
                        - environment:read
                        - environment:write
                        - skill:read
                        - skill:write
                        - risk_policy:evaluate
                        - risk_policy:bypass
                        - chat:read
                        - chat:write
            description: Form for requesting access to a scope.
            required:
                - scope
        RequestAccessResult:
            type: object
            properties:
                sent_to_count:
                    type: integer
                    description: Number of administrators who were notified.
                    format: int64
            required:
                - sent_to_count
        ResearchReport:
            type: object
            properties:
                completed_at:
                    type: string
                    description: When the run finished.
                    format: date-time
                created_at:
                    type: string
                    description: When the run was requested.
                    format: date-time
                error:
                    type: string
                    description: Why the run failed, when it did.
                id:
                    type: string
                    description: The report ID.
                model:
                    type: string
                    description: The model that produced the report.
                prompt_version:
                    type: string
                    description: The prompt version the run used, so reports stay distinguishable across prompt changes.
                report:
                    description: The structured findings. Every claim carries a provenance tier and its citations.
                report_version:
                    type: integer
                    description: Shape version of the report payload.
                    format: int64
                requested_by:
                    type: string
                    description: Who asked for the research run.
                started_at:
                    type: string
                    description: When the run started.
                    format: date-time
                status:
                    type: string
                    description: The run's lifecycle state, such as running, completed, or failed.
            description: One research-agent run over a request's server. Findings are gathered and cited, never adjudicated — and web-sourced claims may be inaccurate, incomplete, or deliberately seeded.
            required:
                - id
                - status
                - report_version
                - created_at
        ResolveChallengeForm:
            type: object
            properties:
                challenge_ids:
                    type: array
                    items:
                        type: string
                    description: IDs of the challenges in ClickHouse to resolve.
                principal_urn:
                    type: string
                    description: Principal that was denied.
                resolution_type:
                    type: string
                    description: How the challenge is being resolved.
                    enum:
                        - role_assigned
                        - dismissed
                resource_id:
                    type: string
                    description: Resource ID from the challenge.
                resource_kind:
                    type: string
                    description: Resource kind from the challenge.
                role_slug:
                    type: string
                    description: Role slug to assign (required when resolution_type=role_assigned).
                scope:
                    type: string
                    description: Scope that was denied.
            required:
                - challenge_ids
                - principal_urn
                - scope
                - resolution_type
        ResolveChallengesResult:
            type: object
            properties:
                resolutions:
                    type: array
                    items:
                        $ref: '#/components/schemas/ChallengeResolution'
                    description: The created resolution records.
            required:
                - resolutions
        ResolveShadowMCPInventoryRequestForm:
            type: object
            properties:
                decision:
                    type: string
                    description: Decision used when resolving a Shadow MCP inventory request.
                    enum:
                        - allow
                        - deny
                policy_ids:
                    type: array
                    items:
                        type: string
                        format: uuid
                project_id:
                    type: string
                    format: uuid
                server_url:
                    type: string
                    format: uri
            required:
                - project_id
                - server_url
                - decision
        Resource:
            type: object
            properties:
                function_resource_definition:
                    $ref: '#/components/schemas/FunctionResourceDefinition'
            description: A polymorphic resource - currently only function resources are supported
        ResourceEntry:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the resource
                name:
                    type: string
                    description: The name of the resource
                resource_urn:
                    type: string
                    description: The URN of the resource
                type:
                    type: string
                    enum:
                        - function
                uri:
                    type: string
                    description: The uri of the resource
            required:
                - type
                - id
                - name
                - uri
                - resource_urn
        ResponseFilter:
            type: object
            properties:
                content_types:
                    type: array
                    items:
                        type: string
                    description: Content types to filter for
                status_codes:
                    type: array
                    items:
                        type: string
                    description: Status codes to filter for
                type:
                    type: string
                    description: Response filter type for the tool
            description: Response filter metadata for the tool
            required:
                - type
                - status_codes
                - content_types
        RestoreSkillVersionRequestBody:
            type: object
            properties:
                id:
                    type: string
                    description: The skill ID.
                    format: uuid
                version_id:
                    type: string
                    description: The historical version to restore.
                    format: uuid
            required:
                - id
                - version_id
        RetryScheduleRequestBody:
            type: object
            properties:
                provider:
                    type: string
                    description: AI provider identifier. Supported values include cursor, anthropic_compliance, codex_compliance, and chatgpt_compliance.
                schedule:
                    type: string
                    description: Schedule identifier (e.g. cursor, anthropic_compliance, anthropic_analytics_usage).
            required:
                - provider
                - schedule
        RevokeAllRemoteSessionsResult:
            type: object
            properties:
                revoked_count:
                    type: integer
                    description: Number of remote_sessions revoked.
                    format: int64
            description: Result type for revoking all of a client's remote_sessions.
            required:
                - revoked_count
        RiskBlock:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the block occurred.
                    format: date-time
                feedback:
                    type: string
                    description: Existing feedback sentiment recorded for this block, when any.
                    enum:
                        - up
                        - down
                id:
                    type: string
                    description: The block ID (the underlying risk result ID).
                    format: uuid
                policy_name:
                    type: string
                    description: Name of the risk policy that blocked the call.
                project_id:
                    type: string
                    description: The project the block belongs to.
                    format: uuid
                reason:
                    type: string
                    description: Human-readable reason the tool call was blocked.
                tool_name:
                    type: string
                    description: Name of the tool that was blocked, when known.
            required:
                - id
                - project_id
                - reason
                - policy_name
                - created_at
        RiskCategoriesResult:
            type: object
            properties:
                categories:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskCategoryDefinition'
                    description: Categories in classification-priority order. The last entry is the 'custom' fallback for findings that match none of the others.
                recommended_scopes_version:
                    type: integer
                    description: Version of the recommended-scope registry; bumps when any recommendation changes.
                    format: int64
            description: Canonical risk category definitions used to classify findings, in classification-priority order. Consumers should iterate in order and pick the first match.
            required:
                - categories
                - recommended_scopes_version
        RiskCategoryDefinition:
            type: object
            properties:
                description:
                    type: string
                    description: Plain-English description of what this category covers.
                icon:
                    type: string
                    description: Lucide icon name suggested for this category.
                key:
                    type: string
                    description: Canonical category key (e.g. 'secrets', 'pii', 'shadow_mcp').
                label:
                    type: string
                    description: Human-readable category label for UI rendering.
                recommended_scope_applicable:
                    type: boolean
                    description: False when the category is session-scoped and message scoping does not apply (e.g. account_identity).
                recommended_scope_exempt:
                    type: string
                    description: Centrally recommended CEL exemption predicate; empty = no exemption.
                recommended_scope_include:
                    type: string
                    description: Centrally recommended CEL scope predicate for this category; empty = no include restriction.
                recommended_scope_rationale:
                    type: string
                    description: User-facing explanation of the recommended scope and the consequences of disabling it. Empty when the category has no recommendation.
                rule_id_prefix:
                    type: string
                    description: When non-empty, findings whose rule_id starts with this prefix belong to this category. The catch-all for a family (e.g. 'pii.').
                rule_ids:
                    type: array
                    items:
                        type: string
                    description: When non-empty, findings whose rule_id is in this exact list belong to this category. Checked before rule_id_prefix.
                source:
                    type: string
                    description: When non-empty, findings whose source equals this value belong to this category.
            description: One canonical risk category and how findings are classified into it.
            required:
                - key
                - label
                - description
                - icon
                - source
                - rule_ids
                - rule_id_prefix
                - recommended_scope_include
                - recommended_scope_exempt
                - recommended_scope_rationale
                - recommended_scope_applicable
        RiskChatSummary:
            type: object
            properties:
                chat_id:
                    type: string
                    description: The chat session ID.
                    format: uuid
                chat_title:
                    type: string
                    description: Title of the chat session.
                findings_count:
                    type: integer
                    description: Number of findings in this chat.
                    format: int64
                latest_detected:
                    type: string
                    description: When the most recent finding was detected.
                    format: date-time
                user_id:
                    type: string
                    description: The user who owns the chat session.
            required:
                - chat_id
                - findings_count
                - latest_detected
        RiskCustomDetectionRule:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the custom detection rule was created.
                    format: date-time
                description:
                    type: string
                    description: Description of what the rule detects.
                detection_expr:
                    type: string
                    description: 'CEL detection predicate: a boolean expression over message fields whose true verdict produces a finding. Supersedes regex.'
                id:
                    type: string
                    description: The custom detection rule ID.
                    format: uuid
                regex:
                    type: string
                    description: Legacy RE2-compatible regex pattern (read-only). Live for existing rules; evaluated as content.match(regex) when detection_expr is empty. New rules author detection_expr instead.
                rule_id:
                    type: string
                    description: Stable rule identifier, prefixed with `custom.`.
                severity:
                    type: string
                    description: Severity level for findings produced by this rule.
                    enum:
                        - info
                        - low
                        - medium
                        - high
                        - critical
                title:
                    type: string
                    description: Human-readable title for the rule.
                updated_at:
                    type: string
                    description: When the custom detection rule was last updated.
                    format: date-time
            required:
                - id
                - rule_id
                - title
                - description
                - regex
                - severity
                - created_at
                - updated_at
        RiskDetectionScope:
            type: object
            properties:
                category:
                    type: string
                    description: Risk category key this detection scope applies to.
                scope_exempt:
                    type: string
                    description: 'CEL exemption predicate: the category skips a message when this boolean expression is true. Empty means no exemption.'
                scope_include:
                    type: string
                    description: 'CEL scope predicate: the category detects on a message only when this boolean expression is true. Empty means every message surface is included.'
            required:
                - category
        RiskExclusion:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the exclusion was created.
                    format: date-time
                enabled:
                    type: boolean
                    description: Whether the exclusion is active.
                id:
                    type: string
                    description: The exclusion ID.
                    format: uuid
                match_type:
                    type: string
                    description: 'How match_value is interpreted: exact (finding text), regex (RE2 pattern over finding text), rule_id, source, or entity_type (presidio entity, matched as rule_id ''pii.<entity>'').'
                    enum:
                        - exact
                        - regex
                        - rule_id
                        - source
                        - entity_type
                match_value:
                    type: string
                    description: The value matched against findings, interpreted per match_type.
                project_id:
                    type: string
                    description: The project ID.
                    format: uuid
                risk_policy_id:
                    type: string
                    description: 'The policy this exclusion is bound to. Null/omitted means global: the exclusion applies to every policy in the project.'
                    format: uuid
                rule_id_filter:
                    type: string
                    description: 'Optional narrowing: an exact/regex/source exclusion only applies to findings with this rule_id. Empty means any.'
                source_filter:
                    type: string
                    description: 'Optional narrowing: an exact/regex/rule_id exclusion only applies to findings from this source. Empty means any.'
                updated_at:
                    type: string
                    description: When the exclusion was last updated.
                    format: date-time
            required:
                - id
                - project_id
                - match_type
                - match_value
                - rule_id_filter
                - source_filter
                - enabled
                - created_at
                - updated_at
        RiskExposureSlice:
            type: object
            properties:
                category:
                    type: string
                    description: Canonical risk category key.
                findings:
                    type: integer
                    description: Deduplicated finding count for this category in the window.
                    format: int64
                share:
                    type: number
                    description: Fraction of the window's findings in this category (0-1).
                    format: double
            required:
                - category
                - findings
                - share
        RiskIDRequestBody:
            type: object
            properties:
                id:
                    type: string
                    description: The resource ID.
                    format: uuid
            required:
                - id
        RiskOverviewCategory:
            type: object
            properties:
                category:
                    type: string
                    description: Policy category key.
                findings:
                    type: integer
                    description: Finding count for this category.
                    format: int64
            required:
                - category
                - findings
        RiskOverviewResult:
            type: object
            properties:
                active_policies:
                    type: integer
                    description: Enabled risk policies for the current project.
                    format: int64
                findings:
                    type: integer
                    description: Policy findings in the window.
                    format: int64
                flagged_sessions:
                    type: integer
                    description: Chat sessions with at least one finding in the window.
                    format: int64
                from:
                    type: string
                    description: Inclusive start of the overview window.
                    format: date-time
                messages_scanned:
                    type: integer
                    description: Messages analyzed by risk policies in the window.
                    format: int64
                time_series_findings:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskOverviewTimeSeriesFinding'
                    description: Time-series finding counts by category in the window.
                to:
                    type: string
                    description: Exclusive end of the overview window.
                    format: date-time
                top_categories:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskOverviewCategory'
                    description: Top policy categories by finding count.
                top_rules:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskRuleBreakdownEntry'
                    description: Top rule_ids by finding count.
                top_users:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskOverviewUser'
                    description: Top users by finding count.
            required:
                - from
                - to
                - messages_scanned
                - findings
                - flagged_sessions
                - active_policies
                - top_categories
                - top_users
                - top_rules
                - time_series_findings
        RiskOverviewTimeSeriesFinding:
            type: object
            properties:
                bucket_start:
                    type: string
                    description: Time bucket start.
                    format: date-time
                category:
                    type: string
                    description: Policy category key.
                findings:
                    type: integer
                    description: Finding count for this category and time bucket.
                    format: int64
            required:
                - bucket_start
                - category
                - findings
        RiskOverviewUser:
            type: object
            properties:
                email:
                    type: string
                    description: User email, or Unknown user when unavailable.
                external_user_id:
                    type: string
                    description: External user identifier as recorded on chats, when known. Empty when the finding cannot be attributed to an external user.
                findings:
                    type: integer
                    description: Finding count for this user.
                    format: int64
            required:
                - email
                - external_user_id
                - findings
        RiskPolicy:
            type: object
            properties:
                action:
                    type: string
                    description: 'Policy action: flag (log only), warn (challenge: warn the user and require acknowledgement to proceed), or block (deny in real-time).'
                    default: flag
                    enum:
                        - flag
                        - warn
                        - block
                approved_email_domains:
                    type: array
                    items:
                        type: string
                    description: 'For the account_identity source: corporate email domains considered approved. Sessions whose AI-account email domain is not listed are flagged. Empty means the domain rule is inert.'
                audience_principal_urns:
                    type: array
                    items:
                        type: string
                    description: Principal URNs the policy applies to. Contains user:all when audience_type is everyone.
                audience_type:
                    type: string
                    description: 'Policy audience type: everyone or targeted.'
                    default: everyone
                    enum:
                        - everyone
                        - targeted
                auto_name:
                    type: boolean
                    description: Whether the policy name is auto-generated. When true, the name is regenerated on each update.
                created_at:
                    type: string
                    description: When the policy was created.
                    format: date-time
                custom_rule_ids:
                    type: array
                    items:
                        type: string
                    description: 'Custom detection rule ids attached as detectors: a match produces a finding. Custom rules are pure detectors.'
                detection_scopes:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskDetectionScope'
                    description: Per-category detection scopes specified for this policy. The scan surface merges these with the recommended scopes, the specified scope winning on category conflict. Empty means every recommendation applies unchanged.
                disabled_rules:
                    type: array
                    items:
                        type: string
                    description: Canonical rule_ids (e.g. 'secret.aws_access_token', 'pii.credit_card') the policy author has unchecked within an otherwise-enabled category. Empty means every rule in the selected categories runs; matching findings are dropped at scan time.
                enabled:
                    type: boolean
                    description: Whether the policy is active.
                id:
                    type: string
                    description: The risk policy ID.
                    format: uuid
                message_types:
                    type: array
                    items:
                        type: string
                    description: 'Message types this policy applies to. When empty or omitted, applies to all types. Valid values: user_message, tool_request, tool_response, assistant_message, prompt_attachment.'
                model_config:
                    $ref: '#/components/schemas/RiskPolicyModelConfig'
                name:
                    type: string
                    description: The policy name.
                pending_messages:
                    type: integer
                    description: Number of messages not yet analyzed at the current policy version. Populated on single-policy reads; omitted from list responses (use riskPoliciesStatus for progress).
                    format: int64
                policy_type:
                    type: string
                    description: 'Policy type: standard (regex/presidio/custom detection) or prompt_based (LLM-judge).'
                    default: standard
                    enum:
                        - standard
                        - prompt_based
                presidio_entities:
                    type: array
                    items:
                        type: string
                    description: Presidio entity types to scan for. When empty, scans all entities.
                presidio_score_threshold:
                    type: number
                    description: Minimum Presidio confidence (0.0-1.0) a PII match must clear to surface. Omit/null applies the default (0.5).
                    example: 0.75
                    format: double
                    minimum: 0
                    maximum: 1
                project_id:
                    type: string
                    description: The project ID.
                    format: uuid
                prompt:
                    type: string
                    description: 'For prompt_based policies: the guardrail prompt the LLM judge evaluates each in-scope message against. Null for standard policies.'
                prompt_injection_rules:
                    type: array
                    items:
                        type: string
                    description: Prompt-injection detection rule ids enabled in addition to the heuristic baseline. When empty, only heuristics run.
                scope_exempt:
                    type: string
                    description: 'CEL exemption predicate: the policy is skipped for a message when this boolean expression is true. Null/empty means no inline exemption.'
                scope_include:
                    type: string
                    description: 'CEL scope predicate: the policy evaluates a message only when this boolean expression is true (in addition to message_types). Null/empty means all messages are in scope.'
                score:
                    type: number
                    description: CVSS-style severity (0.1-10) the author assigns to findings this policy produces. Descriptive only; changing it does not re-scan messages. Defaults to 5.
                    default: 5
                    example: 5
                    format: double
                    minimum: 0.1
                    maximum: 10
                shadow_mcp_disposition:
                    type: string
                    description: 'Default disposition for shadow MCP blocking policies: block_all blocks every non-Gram-hosted server unless allowed, allow_all permits every server unless blocked. Blocked URLs are stored as risk_policy:block grants, not on the policy. Immutable after create. Only present on policies with the shadow_mcp source and block action.'
                    enum:
                        - block_all
                        - allow_all
                sources:
                    type: array
                    items:
                        type: string
                    description: Detection sources enabled for this policy.
                total_messages:
                    type: integer
                    description: Total number of messages in the project. Populated on single-policy reads; omitted from list responses.
                    format: int64
                updated_at:
                    type: string
                    description: When the policy was last updated.
                    format: date-time
                user_message:
                    type: string
                    description: Optional message shown to the end user when this policy blocks an action or surfaces a flagged finding. When unset, a default message is rendered.
                version:
                    type: integer
                    description: Policy version, incremented on each update.
                    format: int64
            required:
                - id
                - project_id
                - name
                - policy_type
                - sources
                - enabled
                - action
                - audience_type
                - audience_principal_urns
                - auto_name
                - score
                - version
                - created_at
                - updated_at
        RiskPolicyBypassApprovalRequestBody:
            type: object
            properties:
                granted_principal_urns:
                    type: array
                    items:
                        type: string
                    description: Principal URNs to grant bypass access to. Use user:all for every user in the organization.
                id:
                    type: string
                    description: The bypass request ID.
                    format: uuid
            required:
                - id
        RiskPolicyBypassRequest:
            type: object
            properties:
                created_at:
                    type: string
                    description: Creation timestamp.
                    format: date-time
                decided_at:
                    type: string
                    description: Decision timestamp.
                    format: date-time
                decided_by:
                    type: string
                    description: User ID that approved, denied, or revoked the request.
                granted_principal_urns:
                    type: array
                    items:
                        type: string
                    description: Principal URNs granted when approved.
                id:
                    type: string
                    description: The bypass request ID.
                    format: uuid
                note:
                    type: string
                    description: Requester note.
                policy_id:
                    type: string
                    description: The risk policy ID.
                    format: uuid
                requester_email:
                    type: string
                    description: Requester email when known.
                requester_user_id:
                    type: string
                    description: Requester user ID.
                status:
                    type: string
                    description: Current request status.
                    enum:
                        - requested
                        - approved
                        - denied
                        - revoked
                target_dimensions:
                    type: object
                    description: Selector dimensions for the request target.
                    additionalProperties:
                        type: string
                target_key:
                    type: string
                    description: Canonical key for the target.
                target_kind:
                    type: string
                    description: Optional target namespace for the request, such as server_url.
                target_label:
                    type: string
                    description: Optional display label for the target.
                updated_at:
                    type: string
                    description: Last update timestamp.
                    format: date-time
            required:
                - id
                - policy_id
                - target_dimensions
                - requester_user_id
                - status
                - granted_principal_urns
                - created_at
                - updated_at
        RiskPolicyEvalReview:
            type: object
            properties:
                chat_id:
                    type: string
                    description: The chat session being judged.
                    format: uuid
                created_at:
                    type: string
                    description: When the verdict was first recorded.
                    format: date-time
                id:
                    type: string
                    description: The review ID.
                    format: uuid
                policy_id:
                    type: string
                    description: The prompt-based policy the verdict belongs to.
                    format: uuid
                policy_version:
                    type: integer
                    description: The policy version in effect when the verdict was recorded (provenance).
                    format: int64
                reviewed_by:
                    type: string
                    description: User id of the reviewer who recorded the verdict.
                updated_at:
                    type: string
                    description: When the verdict was last updated.
                    format: date-time
                verdict:
                    type: string
                    description: The reviewer's ground-truth verdict.
                    enum:
                        - correct
                        - false_positive
                        - missed
            required:
                - id
                - policy_id
                - policy_version
                - chat_id
                - verdict
                - reviewed_by
                - created_at
                - updated_at
        RiskPolicyModelConfig:
            type: object
            properties:
                fail_open:
                    type: boolean
                    description: 'When the judge errors or times out: true allows the message (fail-open), false blocks it (fail-closed). Defaults to fail-open.'
                model:
                    type: string
                    description: OpenRouter model id the judge should use. Empty selects the default judge model.
                temperature:
                    type: number
                    description: Sampling temperature for the judge. Defaults to a low value for deterministic verdicts.
                    format: double
        RiskPolicyStatus:
            type: object
            properties:
                analyzed_messages:
                    type: integer
                    description: Messages analyzed at the current policy version.
                    format: int64
                findings_count:
                    type: integer
                    description: Number of findings at the current policy version.
                    format: int64
                pending_messages:
                    type: integer
                    description: Messages not yet analyzed.
                    format: int64
                policy_id:
                    type: string
                    description: The risk policy ID.
                    format: uuid
                policy_version:
                    type: integer
                    description: Current policy version.
                    format: int64
                total_messages:
                    type: integer
                    description: Total messages in the project.
                    format: int64
                workflow_status:
                    type: string
                    description: 'Workflow state: running, sleeping, or not_started.'
                    enum:
                        - running
                        - sleeping
                        - not_started
            required:
                - policy_id
                - policy_version
                - total_messages
                - analyzed_messages
                - pending_messages
                - findings_count
                - workflow_status
        RiskResult:
            type: object
            properties:
                block_id:
                    type: string
                    description: ID of the durable tool call block recorded for this finding's message, when one exists. Links to the block page at /blocks/:id.
                    format: uuid
                chat_content_part_id:
                    type: string
                    description: The chat content part that was scanned, when the finding is anchored to a content part.
                    format: uuid
                chat_id:
                    type: string
                    description: The chat session containing the message.
                    format: uuid
                chat_message_id:
                    type: string
                    description: The chat message that was scanned, when the finding is anchored to a message.
                    format: uuid
                chat_title:
                    type: string
                    description: Title of the chat session.
                confidence:
                    type: number
                    description: Confidence score for this finding.
                    format: double
                created_at:
                    type: string
                    description: When this result was created.
                    format: date-time
                description:
                    type: string
                    description: Human-readable description of the finding.
                end_pos:
                    type: integer
                    description: End byte position within the message content.
                    format: int64
                false_positive_at:
                    type: string
                    description: When this result was manually marked as a false positive. Null when not dismissed.
                    format: date-time
                id:
                    type: string
                    description: The result ID.
                    format: uuid
                match:
                    type: string
                    description: The matched secret or sensitive data. Null when the caller isn't authorized to see raw match content for this result's chat (see match_redacted).
                match_redacted:
                    type: string
                    description: Opaque fingerprint of match, in the same `<redacted len=N sha=XXXXXXXX>` form as RiskResultRedacted.match_redacted. Populated whenever match is null so callers without raw access still get a stable, non-reversible correlation token. For shadow_mcp findings this is the original match value passed through verbatim (a non-sensitive server URL or command identifier).
                policy_id:
                    type: string
                    description: The risk policy ID.
                    format: uuid
                policy_version:
                    type: integer
                    description: Policy version when this result was produced.
                    format: int64
                rule_id:
                    type: string
                    description: The matched rule identifier.
                source:
                    type: string
                    description: Detection source (e.g. gitleaks).
                spans:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskSpan'
                    description: All matched spans attributed to this finding. A finding may carry several correlated spans (e.g. a custom rule matching a tool's function name and its arguments on the same call). The top-level match/start_pos/end_pos mirror the primary (first) span. Null alongside match when the result is redacted.
                start_pos:
                    type: integer
                    description: Start byte position within the message content.
                    format: int64
                tags:
                    type: array
                    items:
                        type: string
                    description: Tags from the detection rule.
                user_id:
                    type: string
                    description: The user who owns the chat session.
            required:
                - id
                - policy_id
                - policy_version
                - source
                - created_at
        RiskResultRedacted:
            type: object
            properties:
                chat_content_part_id:
                    type: string
                    description: The chat content part that was scanned, when the finding is anchored to a content part.
                    format: uuid
                chat_id:
                    type: string
                    description: The chat session containing the message.
                    format: uuid
                chat_message_id:
                    type: string
                    description: The chat message that was scanned, when the finding is anchored to a message.
                    format: uuid
                chat_title:
                    type: string
                    description: Title of the chat session.
                confidence:
                    type: number
                    description: Confidence score for this finding.
                    format: double
                created_at:
                    type: string
                    description: When this result was created.
                    format: date-time
                description:
                    type: string
                    description: Human-readable description of the finding.
                id:
                    type: string
                    description: The result ID.
                    format: uuid
                match_redacted:
                    type: string
                    description: Opaque fingerprint of the original match in the form `<redacted len=N sha=XXXXXXXX>` where N is the byte length of the original match and XXXXXXXX is the first 8 hex characters of sha256(match). For shadow_mcp findings the original match value (a non-sensitive server URL or command identifier) is passed through verbatim.
                policy_id:
                    type: string
                    description: The risk policy ID.
                    format: uuid
                policy_version:
                    type: integer
                    description: Policy version when this result was produced.
                    format: int64
                position_known:
                    type: boolean
                    description: Whether the original finding carried byte-position information within the source message. Exact positions are intentionally not exposed to avoid reconstruction attacks.
                rule_id:
                    type: string
                    description: The matched rule identifier.
                source:
                    type: string
                    description: Detection source (e.g. gitleaks, presidio, shadow_mcp).
                spans_redacted:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskSpanRedacted'
                    description: All matched spans attributed to this finding, each with its match replaced by an opaque fingerprint.
                tags:
                    type: array
                    items:
                        type: string
                    description: Tags from the detection rule.
                user_id:
                    type: string
                    description: The user who owns the chat session.
            required:
                - id
                - policy_id
                - policy_version
                - source
                - created_at
                - match_redacted
                - position_known
        RiskRuleBreakdownEntry:
            type: object
            properties:
                findings:
                    type: integer
                    description: Finding count for this rule within the window.
                    format: int64
                rule_id:
                    type: string
                    description: Rule identifier (e.g. 'secret.aws-access-key'). Empty when the finding has no rule_id (treat as 'unspecified').
                source:
                    type: string
                    description: Source bucket the rule belongs to (gitleaks, presidio, etc.) for label/icon resolution on the dashboard.
            required:
                - rule_id
                - source
                - findings
        RiskRuleBreakdownResult:
            type: object
            properties:
                category:
                    type: string
                    description: Category the breakdown is scoped to.
                from:
                    type: string
                    description: Inclusive start of the window used.
                    format: date-time
                rules:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskRuleBreakdownEntry'
                    description: Rules in this category, ordered by finding count descending.
                to:
                    type: string
                    description: Exclusive end of the window used.
                    format: date-time
                total:
                    type: integer
                    description: Total findings across all rules in this category and window.
                    format: int64
            required:
                - from
                - to
                - category
                - rules
                - total
        RiskSegment:
            type: object
            properties:
                first_seq:
                    type: integer
                    description: The `seq` of the first (oldest) message in this segment.
                    format: int64
                has_more_after:
                    type: boolean
                    description: Whether messages exist after this segment within the generation. Expand with an `after_seq` request using `last_seq`.
                has_more_before:
                    type: boolean
                    description: Whether messages exist before this segment within the generation. Expand with a `before_seq` request using `first_seq`.
                last_seq:
                    type: integer
                    description: The `seq` of the last (newest) message in this segment.
                    format: int64
            description: A contiguous run of messages in a windowed view (`risk_only` via `risk_segments`, or `query` via `match_segments`), covering one or more matches plus their surrounding context. Messages for a segment are the entries of `Chat.messages` whose `seq` falls within `[first_seq, last_seq]`.
            required:
                - first_seq
                - last_seq
                - has_more_before
                - has_more_after
        RiskSignal:
            type: object
            properties:
                apps:
                    type: array
                    items:
                        type: string
                    description: Source apps (chat surfaces) the findings were observed in. Empty until app attribution is recorded on findings.
                category:
                    type: string
                    description: Canonical risk category of the rule (secrets, pii, ...).
                description:
                    type: string
                    description: Representative finding description for this rule. Empty when findings carry no description.
                detection_sources:
                    type: array
                    items:
                        type: string
                    description: Detector sources that produced findings in this signal (gitleaks, presidio, prompt_injection, ...).
                findings:
                    type: integer
                    description: Deduplicated finding count in the window.
                    format: int64
                first_seen:
                    type: string
                    description: Event time of the earliest finding in the window.
                    format: date-time
                key:
                    type: string
                    description: Stable client identity for the signal. Currently 'rule:<rule_id>'.
                last_seen:
                    type: string
                    description: Event time of the latest finding in the window.
                    format: date-time
                previous_findings:
                    type: integer
                    description: Finding count in the equal-length window immediately before from.
                    format: int64
                risk_score:
                    type: number
                    description: Heuristic severity score on the 0.1-10 scale used across risk surfaces.
                    format: double
                rule_id:
                    type: string
                    description: Rule identifier the signal clusters on (e.g. 'secret.aws_access_token', 'pii.email_address').
                severity:
                    type: string
                    description: Severity rating derived from the risk score.
                    enum:
                        - low
                        - medium
                        - high
                        - critical
                sparkline:
                    type: array
                    items:
                        type: integer
                        format: int64
                    description: Deduplicated finding counts per equal-width time bucket across the window, oldest bucket first. Powers the per-signal trend sparkline.
                teams:
                    type: integer
                    description: Distinct teams with at least one finding in the window. Zero until team attribution is recorded on findings.
                    format: int64
                top_users:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskSignalTopUser'
                    description: Top users by finding count within the signal.
                users:
                    type: integer
                    description: Distinct users with at least one finding in the window.
                    format: int64
            description: 'One clustered risk signal: all live findings for a single rule in the window, with a heuristic severity score and trend/spread stats.'
            required:
                - key
                - rule_id
                - category
                - description
                - detection_sources
                - apps
                - severity
                - risk_score
                - findings
                - previous_findings
                - users
                - teams
                - first_seen
                - last_seen
                - top_users
                - sparkline
        RiskSignalTopUser:
            type: object
            properties:
                email:
                    type: string
                    description: User email, or Unknown user when unavailable.
                external_user_id:
                    type: string
                    description: External user identifier as recorded on chats, when known. Empty when the finding cannot be attributed to an external user.
                findings:
                    type: integer
                    description: Finding count for this user within the signal and window.
                    format: int64
                team:
                    type: string
                    description: WorkOS directory department of the user when known; empty otherwise.
            required:
                - email
                - external_user_id
                - team
                - findings
        RiskSignalsResult:
            type: object
            properties:
                critical_signals:
                    type: integer
                    description: Signals rated critical in the window.
                    format: int64
                exposure:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskExposureSlice'
                    description: Finding counts by category, largest first.
                findings:
                    type: integer
                    description: Deduplicated live findings in the window.
                    format: int64
                from:
                    type: string
                    description: Inclusive start of the signals window.
                    format: date-time
                open_signals:
                    type: integer
                    description: Signals with at least one live finding in the window.
                    format: int64
                org_risk_score:
                    type: number
                    description: Heuristic organization risk score on the 0.1-10 scale, blended from the top signal scores and finding volume. Zero when the window has no findings.
                    format: double
                previous_findings:
                    type: integer
                    description: Deduplicated live findings in the equal-length window immediately before from.
                    format: int64
                previous_org_risk_score:
                    type: number
                    description: Organization risk score computed the same way over the equal-length window immediately before from.
                    format: double
                previous_users_exposed:
                    type: integer
                    description: Distinct users with at least one finding in the equal-length window immediately before from.
                    format: int64
                signals:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskSignal'
                    description: Signals ranked by risk score, highest first.
                to:
                    type: string
                    description: Exclusive end of the signals window.
                    format: date-time
                users_exposed:
                    type: integer
                    description: Distinct users with at least one finding in the window.
                    format: int64
            required:
                - from
                - to
                - org_risk_score
                - previous_org_risk_score
                - findings
                - previous_findings
                - open_signals
                - critical_signals
                - users_exposed
                - previous_users_exposed
                - exposure
                - signals
        RiskSpan:
            type: object
            properties:
                end_pos:
                    type: integer
                    description: End byte position within the message content.
                    format: int64
                field:
                    type: string
                    description: The message field this span matched, in author-facing form (content, prompt, assistant, tool_result, or tool.name/tool.server/tool.function/tool.args). Empty for detectors that don't attribute a field (e.g. gitleaks, presidio).
                match:
                    type: string
                    description: The matched secret or sensitive data for this span.
                path:
                    type: string
                    description: The JSON sub-path within the field for a `.get(...)` match (e.g. 'command', 'payload.sql'). Empty when the whole field value matched.
                start_pos:
                    type: integer
                    description: Start byte position within the message content.
                    format: int64
            required:
                - match
        RiskSpanRedacted:
            type: object
            properties:
                field:
                    type: string
                    description: The message field this span matched (see RiskSpan.field).
                match_redacted:
                    type: string
                    description: Opaque fingerprint of this span's match, in the same form as RiskResultRedacted.match_redacted.
                path:
                    type: string
                    description: The JSON sub-path within the field for a `.get(...)` match (see RiskSpan.path).
                position_known:
                    type: boolean
                    description: Whether this span carried byte-position information.
            required:
                - match_redacted
                - position_known
        RiskUnmaskResultResult:
            type: object
            properties:
                id:
                    type: string
                    description: The risk result ID.
                    format: uuid
                match:
                    type: string
                    description: The plaintext matched secret or sensitive data for this result. Empty string when the finding has no top-level match (e.g. a spans-only finding).
            required:
                - id
                - match
        RiskUserBreakdownResult:
            type: object
            properties:
                categories:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskOverviewCategory'
                    description: Category breakdown for this user, ordered by finding count descending.
                external_user_id:
                    type: string
                    description: External user the breakdown is scoped to.
                findings:
                    type: integer
                    description: Total findings for this user in the window.
                    format: int64
                from:
                    type: string
                    description: Inclusive start of the window used.
                    format: date-time
                rules:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskRuleBreakdownEntry'
                    description: Rule_id breakdown for this user, ordered by finding count descending.
                to:
                    type: string
                    description: Exclusive end of the window used.
                    format: date-time
            required:
                - from
                - to
                - external_user_id
                - findings
                - categories
                - rules
        Role:
            type: object
            properties:
                created_at:
                    type: string
                    format: date-time
                description:
                    type: string
                    description: Human-readable description.
                grants:
                    type: array
                    items:
                        $ref: '#/components/schemas/RoleGrant'
                    description: Scope grants assigned to this role.
                id:
                    type: string
                    description: Unique role identifier.
                is_system:
                    type: boolean
                    description: Whether this is a built-in system role that cannot be deleted.
                member_count:
                    type: integer
                    description: Number of members assigned to this role.
                    format: int64
                name:
                    type: string
                    description: Display name of the role.
                principal_urn:
                    type: string
                    description: Canonical principal URN for this role.
                slug:
                    type: string
                    description: Stable WorkOS role slug.
                updated_at:
                    type: string
                    format: date-time
            required:
                - id
                - principal_urn
                - name
                - slug
                - description
                - is_system
                - grants
                - member_count
                - created_at
                - updated_at
        RoleGrant:
            type: object
            properties:
                scope:
                    type: string
                    description: The scope slug this grant applies to.
                    enum:
                        - org:read
                        - org:blocked_read
                        - org:admin
                        - org:blocked_admin
                        - project:read
                        - project:blocked_read
                        - project:write
                        - project:blocked_write
                        - mcp:read
                        - mcp:blocked_read
                        - mcp:write
                        - mcp:blocked_write
                        - mcp:connect
                        - mcp:blocked_connect
                        - environment:read
                        - environment:blocked_read
                        - environment:write
                        - environment:blocked_write
                        - skill:read
                        - skill:blocked_read
                        - skill:write
                        - skill:blocked_write
                        - risk_policy:evaluate
                        - risk_policy:bypass
                        - risk_policy:block
                        - chat:read
                        - chat:write
                selectors:
                    type: array
                    items:
                        $ref: '#/components/schemas/Selector'
                    description: Selector constraints. Null means unrestricted.
            required:
                - scope
        RoleSummary:
            type: object
            properties:
                cost_per_user:
                    type: number
                    description: Average cost per user (total_cost / user_count)
                    format: double
                role_id:
                    type: string
                    description: Role identifier extracted from role URN
                role_name:
                    type: string
                    description: Human-readable role name
                total_chats:
                    type: integer
                    description: Total chat sessions across all users
                    format: int64
                total_cost:
                    type: number
                    description: Total cost across all users with this role
                    format: double
                total_input_tokens:
                    type: integer
                    description: Sum of input tokens across all users
                    format: int64
                total_output_tokens:
                    type: integer
                    description: Sum of output tokens across all users
                    format: int64
                total_tokens:
                    type: integer
                    description: Sum of all tokens across all users
                    format: int64
                user_count:
                    type: integer
                    description: Number of users with this role
                    format: int64
            description: Aggregated usage summary for a role
            required:
                - role_id
                - role_name
                - user_count
                - total_cost
                - cost_per_user
                - total_input_tokens
                - total_output_tokens
                - total_tokens
                - total_chats
        RotateTunneledMcpServerKeyForm:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the tunneled MCP server
                    format: uuid
            description: Form for rotating a tunneled MCP server source key
            required:
                - id
        RotateTunneledMcpServerKeyResult:
            type: object
            properties:
                server:
                    $ref: '#/components/schemas/TunneledMcpServer'
                tunnel_key:
                    type: string
                    description: Plaintext tunnel key. Only returned after rotation.
            description: Rotated tunneled MCP server plus the one-time replacement tunnel key
            required:
                - server
                - tunnel_key
        SaveRiskEvalReviewRequestBody:
            type: object
            properties:
                chat_id:
                    type: string
                    description: The chat session being judged.
                    format: uuid
                policy_id:
                    type: string
                    description: The prompt-based policy the verdict belongs to.
                    format: uuid
                verdict:
                    type: string
                    description: The reviewer's ground-truth verdict for this session.
                    enum:
                        - correct
                        - false_positive
                        - missed
            required:
                - policy_id
                - chat_id
                - verdict
        ScopeDefinition:
            type: object
            properties:
                description:
                    type: string
                    description: What this scope protects.
                exclusion_scope:
                    type: string
                    description: The scope used to store exception rules for this scope.
                    enum:
                        - org:blocked_read
                        - org:blocked_admin
                        - project:blocked_read
                        - project:blocked_write
                        - mcp:blocked_read
                        - mcp:blocked_write
                        - mcp:blocked_connect
                        - environment:blocked_read
                        - environment:blocked_write
                        - skill:blocked_read
                        - skill:blocked_write
                        - risk_policy:bypass
                resource_type:
                    type: string
                    description: The type of resource this scope applies to.
                    enum:
                        - org
                        - project
                        - mcp
                        - environment
                        - skill
                        - risk_policy
                        - chat
                slug:
                    type: string
                    description: Unique scope identifier.
                    enum:
                        - org:read
                        - org:blocked_read
                        - org:admin
                        - org:blocked_admin
                        - project:read
                        - project:blocked_read
                        - project:write
                        - project:blocked_write
                        - mcp:read
                        - mcp:blocked_read
                        - mcp:write
                        - mcp:blocked_write
                        - mcp:connect
                        - mcp:blocked_connect
                        - environment:read
                        - environment:blocked_read
                        - environment:write
                        - environment:blocked_write
                        - skill:read
                        - skill:blocked_read
                        - skill:write
                        - skill:blocked_write
                        - risk_policy:evaluate
                        - risk_policy:bypass
                        - risk_policy:block
                        - chat:read
                        - chat:write
                visibility:
                    type: string
                    description: Whether this scope is a first-class permission or an internal storage/evaluation scope.
                    enum:
                        - user_visible
                        - internal
            required:
                - slug
                - description
                - resource_type
                - visibility
        SearchBusinessMemoriesRequestBody:
            type: object
            properties:
                content_scope:
                    type: string
                    description: Exact content-scope tag to match.
                    pattern: ^[a-z0-9][a-z0-9:_-]{0,127}$
                content_scope_namespace:
                    type: string
                    description: Content-scope namespace to match.
                    pattern: ^[a-z0-9][a-z0-9_-]{0,127}$
                limit:
                    type: integer
                    description: Maximum search results.
                    default: 20
                    format: int64
                    minimum: 1
                    maximum: 100
                query:
                    type: string
                    description: Natural-language semantic search query.
                    minLength: 1
                    maxLength: 2000
            required:
                - query
        SearchBusinessMemoriesResponseBody:
            type: object
            properties:
                memories:
                    type: array
                    items:
                        $ref: '#/components/schemas/BusinessMemory'
            required:
                - memories
        SearchChatsFilter:
            type: object
            properties:
                deployment_id:
                    type: string
                    description: Deployment ID filter
                    format: uuid
                external_user_id:
                    type: string
                    description: External user ID filter
                from:
                    type: string
                    description: Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                gram_urn:
                    type: string
                    description: Gram URN filter (single URN, use gram_urns for multiple)
                to:
                    type: string
                    description: End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
                user_id:
                    type: string
                    description: User ID filter
            description: Filter criteria for searching chat sessions
        SearchChatsPayload:
            type: object
            properties:
                cursor:
                    type: string
                    description: Cursor for pagination
                filter:
                    $ref: '#/components/schemas/SearchChatsFilter'
                limit:
                    type: integer
                    description: Number of items to return (1-1000)
                    default: 50
                    format: int64
                    minimum: 1
                    maximum: 1000
                sort:
                    type: string
                    description: Sort order
                    default: desc
                    enum:
                        - asc
                        - desc
            description: Payload for searching chat session summaries
        SearchChatsResult:
            type: object
            properties:
                chats:
                    type: array
                    items:
                        $ref: '#/components/schemas/ChatSummary'
                    description: List of chat session summaries
                next_cursor:
                    type: string
                    description: Cursor for next page
            description: Result of searching chat session summaries
            required:
                - chats
        SearchLogsFilter:
            type: object
            properties:
                deployment_id:
                    type: string
                    description: Deployment ID filter
                    format: uuid
                event_source:
                    type: string
                    description: Event source filter (e.g., 'hook', 'tool_call', 'chat_completion')
                external_user_id:
                    type: string
                    description: External user ID filter
                from:
                    type: string
                    description: Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                function_id:
                    type: string
                    description: Function ID filter
                    format: uuid
                gram_chat_id:
                    type: string
                    description: Chat ID filter
                gram_urn:
                    type: string
                    description: Gram URN filter (single URN, use gram_urns for multiple)
                gram_urns:
                    type: array
                    items:
                        type: string
                    description: Gram URN filter (one or more URNs)
                http_method:
                    type: string
                    description: HTTP method filter
                    enum:
                        - GET
                        - POST
                        - PUT
                        - PATCH
                        - DELETE
                        - HEAD
                        - OPTIONS
                http_route:
                    type: string
                    description: HTTP route filter
                http_status_code:
                    type: integer
                    description: HTTP status code filter
                    format: int32
                service_name:
                    type: string
                    description: Service name filter
                severity_text:
                    type: string
                    description: Severity level filter
                    enum:
                        - DEBUG
                        - INFO
                        - WARN
                        - ERROR
                        - FATAL
                to:
                    type: string
                    description: End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
                trace_id:
                    type: string
                    description: Trace ID filter (32 hex characters)
                    pattern: ^[a-f0-9]{32}$
                user_id:
                    type: string
                    description: User ID filter
            description: Filter criteria for searching logs
        SearchLogsPayload:
            type: object
            properties:
                cursor:
                    type: string
                    description: Cursor for pagination
                filter:
                    $ref: '#/components/schemas/SearchLogsFilter'
                filters:
                    type: array
                    items:
                        $ref: '#/components/schemas/LogFilter'
                    description: Filter conditions for the search query
                from:
                    type: string
                    description: Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                limit:
                    type: integer
                    description: Number of items to return (1-1000)
                    default: 50
                    format: int64
                    minimum: 1
                    maximum: 1000
                sort:
                    type: string
                    description: Sort order
                    default: desc
                    enum:
                        - asc
                        - desc
                to:
                    type: string
                    description: End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
            description: Payload for searching telemetry logs
        SearchLogsResult:
            type: object
            properties:
                logs:
                    type: array
                    items:
                        $ref: '#/components/schemas/TelemetryLogRecord'
                    description: List of telemetry log records
                next_cursor:
                    type: string
                    description: Cursor for next page
            description: Result of searching telemetry logs
            required:
                - logs
        SearchToolCallsFilter:
            type: object
            properties:
                deployment_id:
                    type: string
                    description: Deployment ID filter
                    format: uuid
                event_source:
                    type: string
                    description: Event source filter (e.g., 'hook', 'tool_call', 'chat_completion')
                from:
                    type: string
                    description: Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                function_id:
                    type: string
                    description: Function ID filter
                    format: uuid
                gram_urn:
                    type: string
                    description: Gram URN filter (single URN, use gram_urns for multiple)
                to:
                    type: string
                    description: End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
            description: Filter criteria for searching tool calls
        SearchToolCallsPayload:
            type: object
            properties:
                cursor:
                    type: string
                    description: Cursor for pagination
                filter:
                    $ref: '#/components/schemas/SearchToolCallsFilter'
                limit:
                    type: integer
                    description: Number of items to return (1-1000)
                    default: 50
                    format: int64
                    minimum: 1
                    maximum: 1000
                sort:
                    type: string
                    description: Sort order
                    default: desc
                    enum:
                        - asc
                        - desc
            description: Payload for searching tool call summaries
        SearchToolCallsResult:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: Cursor for next page
                tool_calls:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolCallSummary'
                    description: List of tool call summaries
            description: Result of searching tool call summaries
            required:
                - tool_calls
        SearchUsersFilter:
            type: object
            properties:
                account_type:
                    type: string
                    description: Optional account type filter ('team' or 'personal').
                deployment_id:
                    type: string
                    description: Deployment ID filter
                    format: uuid
                event_source:
                    type: string
                    description: Optional event source filter (e.g. 'hook'). When set, only rows with a matching event_source are included.
                external_org_id:
                    type: string
                    description: Optional filter to a single AI account by its provider org id (the per-account discriminator); scopes results to that one account.
                from:
                    type: string
                    description: Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                hook_source:
                    type: string
                    description: Optional hook source filter (e.g. 'cursor', 'claude-code').
                to:
                    type: string
                    description: End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
                user_ids:
                    type: array
                    items:
                        type: string
                    description: Optional list of user identifiers to include. Matches user_id for internal searches and external_user_id for external searches.
            description: Filter criteria for searching user usage summaries
            required:
                - from
                - to
        SearchUsersPayload:
            type: object
            properties:
                cursor:
                    type: string
                    description: Cursor for pagination (user identifier from last item)
                filter:
                    $ref: '#/components/schemas/SearchUsersFilter'
                group_by:
                    type: string
                    description: Grouping dimension for results
                    default: employee
                    enum:
                        - employee
                        - role
                limit:
                    type: integer
                    description: Number of items to return (1-1000)
                    default: 50
                    format: int64
                    minimum: 1
                    maximum: 1000
                metrics:
                    type: string
                    description: 'Level of usage metrics to compute per user. ''full'' (default) returns the complete set: chat counts, cost, cache tokens, tool-call totals, and the per-tool and per-hook-source breakdowns. ''basic'' computes only user identity, first/last activity, and input/output token sums — a much cheaper aggregation for large orgs (e.g. the employee enrollment list, which renders only those fields). The remaining fields are zero/empty under ''basic''. Ignored when source=''agent_metrics''.'
                    default: full
                    enum:
                        - full
                        - basic
                sort:
                    type: string
                    description: Sort order
                    default: desc
                    enum:
                        - asc
                        - desc
                source:
                    type: string
                    description: Where per-user summaries are read from (internal employee grouping only). 'logs' (default) scans raw telemetry_logs and computes the metrics selected by 'metrics'. 'agent_metrics' reads the pre-aggregated attribute_metrics_summaries view — canonical observed agent usage (Claude Code, Codex, Cursor, Claude Chat, LiteLLM), keyed by email — which is far cheaper but returns only identity, last activity (hourly), and input/output/total token sums; users without an email in the window are surfaced separately from raw logs with activity but no token counts.
                    default: logs
                    enum:
                        - logs
                        - agent_metrics
                user_type:
                    type: string
                    description: Type of user identifier to group by
                    enum:
                        - internal
                        - external
            description: Payload for searching user usage summaries
            required:
                - filter
                - user_type
        SearchUsersResult:
            type: object
            properties:
                next_cursor:
                    type: string
                    description: Cursor for next page
                roles:
                    type: array
                    items:
                        $ref: '#/components/schemas/RoleSummary'
                    description: List of role usage summaries (populated when group_by=role)
                users:
                    type: array
                    items:
                        $ref: '#/components/schemas/UserSummary'
                    description: List of user usage summaries (populated when group_by=employee)
            description: Result of searching user usage summaries
            required:
                - users
        SecurityVariable:
            type: object
            properties:
                bearer_format:
                    type: string
                    description: The bearer format
                display_name:
                    type: string
                    description: User-friendly display name for the security variable (defaults to name if not set)
                env_variables:
                    type: array
                    items:
                        type: string
                    description: The environment variables
                id:
                    type: string
                    description: The unique identifier of the security variable
                in_placement:
                    type: string
                    description: Where the security token is placed
                name:
                    type: string
                    description: The name of the security scheme (actual header/parameter name)
                oauth_flows:
                    type: string
                    description: The OAuth flows
                    format: binary
                oauth_types:
                    type: array
                    items:
                        type: string
                    description: The OAuth types
                scheme:
                    type: string
                    description: The security scheme
                type:
                    type: string
                    description: The type of security
            required:
                - id
                - name
                - in_placement
                - scheme
                - env_variables
        Selector:
            type: object
            properties:
                disposition:
                    type: string
                    description: Tool disposition filter (MCP scopes only).
                    enum:
                        - read_only
                        - destructive
                        - idempotent
                        - open_world
                project_id:
                    type: string
                    description: Project filter (MCP scopes only). When set with resource_id='*', grants access to all servers in the project.
                resource_id:
                    type: string
                    description: The resource identifier, or '*' for all resources of this kind.
                resource_kind:
                    type: string
                    description: The kind of resource this selector targets.
                    enum:
                        - project
                        - mcp
                        - org
                        - environment
                        - skill
                        - risk_policy
                        - chat
                        - '*'
                server_url:
                    type: string
                    description: Server URL filter (risk policy scopes only). Include the URI scheme, for example https://api.example.com.
                    format: uri
                tool:
                    type: string
                    description: Specific tool name filter (MCP scopes only).
            description: A constraint that narrows which resources a grant applies to.
            required:
                - resource_kind
                - resource_id
        SendEnterpriseAdminOnboardingEmailRequestBody:
            type: object
            properties:
                recipients:
                    type: array
                    items:
                        type: string
                        format: email
                    description: Recipient email addresses.
                    minItems: 1
            required:
                - recipients
        SendEnterpriseAdminOnboardingEmailResult:
            type: object
            properties:
                sent_count:
                    type: integer
                    description: Number of recipients the email was dispatched to.
                    format: int64
                setup_link:
                    type: string
                    description: The setup link embedded in the dispatched email.
            required:
                - sent_count
                - setup_link
        SendInviteRequestBody:
            type: object
            properties:
                email:
                    type: string
                    description: Email address to invite.
                role_id:
                    type: string
                    description: Optional role ID for the invitee.
            required:
                - email
        SendMessageAttachment:
            type: object
            properties:
                asset_id:
                    type: string
                    description: The chat attachment asset returned by assets.uploadChatAttachment.
                    format: uuid
                name:
                    type: string
                    description: The file name to show the assistant. Falls back to the stored asset name.
                    maxLength: 255
            required:
                - asset_id
        SendMessageRequestBody:
            type: object
            properties:
                assistant_id:
                    type: string
                    description: The assistant to send the message to.
                    format: uuid
                attachments:
                    type: array
                    items:
                        $ref: '#/components/schemas/SendMessageAttachment'
                    description: Files uploaded through assets.uploadChatAttachment that this turn carries.
                    maxItems: 5
                chat_id:
                    type: string
                    description: The conversation to continue (from listChats or a prior sendMessage). Omit to start a new conversation; the server mints and returns a fresh chat id.
                    format: uuid
                idempotency_key:
                    type: string
                    description: Stable key the client mints once per message so retries dedupe instead of enqueuing twice. A new key is generated server-side when omitted.
                    maxLength: 255
                message:
                    type: string
                    description: The user's message text. May be empty when the turn carries attachments.
                    maxLength: 10000
                skill_ids:
                    type: array
                    items:
                        type: string
                        format: uuid
                    description: Project skills to make available for this turn.
                    maxItems: 10
            required:
                - assistant_id
                - message
        SendMessageResult:
            type: object
            properties:
                accepted:
                    type: boolean
                    description: Whether the message was accepted and enqueued for processing.
                chat_id:
                    type: string
                    description: The chat to poll for the assistant's reply.
                    format: uuid
                thread_id:
                    type: string
                    description: The assistant thread the message was enqueued on, when the ingest produced one.
                    format: uuid
            required:
                - chat_id
                - accepted
        ServeChatAttachmentForm:
            type: object
            properties:
                apikey_token:
                    type: string
                chat_sessions_token:
                    type: string
                id:
                    type: string
                    description: The ID of the attachment to serve
                project_id:
                    type: string
                    description: The project ID that the attachment belongs to
                session_token:
                    type: string
            required:
                - id
                - project_id
        ServeChatAttachmentResult:
            type: object
            properties:
                content_length:
                    type: integer
                    format: int64
                content_type:
                    type: string
                last_modified:
                    type: string
            required:
                - content_type
                - content_length
                - last_modified
        ServeChatAttachmentSignedForm:
            type: object
            properties:
                token:
                    type: string
                    description: The signed JWT token
            required:
                - token
        ServeChatAttachmentSignedResult:
            type: object
            properties:
                access_control_allow_origin:
                    type: string
                content_length:
                    type: integer
                    format: int64
                content_type:
                    type: string
                last_modified:
                    type: string
            required:
                - content_type
                - content_length
                - last_modified
        ServeFunctionForm:
            type: object
            properties:
                apikey_token:
                    type: string
                id:
                    type: string
                    description: The ID of the asset to serve
                project_id:
                    type: string
                    description: The procect ID that the asset belongs to
                session_token:
                    type: string
            required:
                - id
                - project_id
        ServeFunctionResult:
            type: object
            properties:
                content_length:
                    type: integer
                    format: int64
                content_type:
                    type: string
                last_modified:
                    type: string
            required:
                - content_type
                - content_length
                - last_modified
        ServeImageForm:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the asset to serve
            required:
                - id
        ServeImageResult:
            type: object
            properties:
                access_control_allow_origin:
                    type: string
                content_length:
                    type: integer
                    format: int64
                content_type:
                    type: string
                last_modified:
                    type: string
            required:
                - content_type
                - content_length
                - last_modified
        ServeOpenAPIv3Form:
            type: object
            properties:
                apikey_token:
                    type: string
                id:
                    type: string
                    description: The ID of the asset to serve
                project_id:
                    type: string
                    description: The procect ID that the asset belongs to
                session_token:
                    type: string
            required:
                - id
                - project_id
        ServeOpenAPIv3Result:
            type: object
            properties:
                content_length:
                    type: integer
                    format: int64
                content_type:
                    type: string
                last_modified:
                    type: string
            required:
                - content_type
                - content_length
                - last_modified
        ServerNameOverride:
            type: object
            properties:
                display_name:
                    type: string
                    description: User-friendly display name
                id:
                    type: string
                    description: Override ID
                raw_server_name:
                    type: string
                    description: Original server name from hooks
            description: User-defined display name for a hooks server
            required:
                - id
                - raw_server_name
                - display_name
        ServerVariable:
            type: object
            properties:
                description:
                    type: string
                    description: Description of the server variable
                env_variables:
                    type: array
                    items:
                        type: string
                    description: The environment variables
            required:
                - description
                - env_variables
        ServiceInfo:
            type: object
            properties:
                name:
                    type: string
                    description: Service name
                version:
                    type: string
                    description: Service version
            description: Service information
            required:
                - name
        SessionSummary:
            type: object
            properties:
                duration_seconds:
                    type: number
                    description: Chat session duration in seconds
                    format: double
                end_time_unix_nano:
                    type: string
                    description: Latest log timestamp in Unix nanoseconds (string for JS int64 precision)
                gram_chat_id:
                    type: string
                    description: Chat session ID
                hook_source:
                    type: string
                    description: Client or agent surface associated with this chat session
                message_count:
                    type: integer
                    description: Number of LLM completion messages in this chat session
                    format: int64
                model:
                    type: string
                    description: LLM model used in this chat session
                project_id:
                    type: string
                    description: Project ID that emitted this chat session
                start_time_unix_nano:
                    type: string
                    description: Earliest log timestamp in Unix nanoseconds (string for JS int64 precision)
                status:
                    type: string
                    description: Chat session status
                    enum:
                        - success
                        - error
                title:
                    type: string
                    description: Chat title, when the session resolves to a named chat
                tool_call_count:
                    type: integer
                    description: Number of tool calls in this chat session
                    format: int64
                total_cost:
                    type: number
                    description: Total cost in USD
                    format: double
                total_input_tokens:
                    type: integer
                    description: Total input tokens used
                    format: int64
                total_output_tokens:
                    type: integer
                    description: Total output tokens used
                    format: int64
                total_tokens:
                    type: integer
                    description: Total tokens used
                    format: int64
                user_email:
                    type: string
                    description: User email associated with this chat session
            description: Org-scoped summary information for a chat session
            required:
                - gram_chat_id
                - project_id
                - start_time_unix_nano
                - end_time_unix_nano
                - duration_seconds
                - message_count
                - tool_call_count
                - total_input_tokens
                - total_output_tokens
                - total_tokens
                - total_cost
                - status
        SetBillingMetadataRequestBody:
            type: object
            properties:
                alert_email:
                    type: string
                    description: Email address to notify on TUM threshold events. Omit to clear.
                    format: email
                billing_cycle_anchor_day:
                    type: integer
                    description: Day of month (1-31) the billing cycle starts, at 00:00 UTC
                    format: int64
                    minimum: 1
                    maximum: 31
                monthly_token_limit:
                    type: integer
                    description: The contracted monthly tokens under management limit. Omit to clear.
                    format: int64
                    minimum: 0
                tunneled_mcp_server_limit:
                    type: integer
                    description: The contracted tunneled MCP server source cap. Omit to leave the configured value unchanged; never-configured orgs use the plan default.
                    format: int64
                    minimum: 0
            required:
                - billing_cycle_anchor_day
        SetKeyEnabledRequestBody:
            type: object
            properties:
                enabled:
                    type: boolean
                    description: Whether the key participates in key resolution.
                id:
                    type: string
                    description: The ID of the key to update.
                    format: uuid
            required:
                - id
                - enabled
        SetMcpMetadataRequestBody:
            type: object
            properties:
                default_environment_id:
                    type: string
                    description: The default environment to load variables from. Not supported when mcp_server_id is provided.
                    format: uuid
                environment_configs:
                    type: array
                    items:
                        $ref: '#/components/schemas/McpEnvironmentConfigInput'
                    description: The list of environment variables to configure for this MCP
                external_documentation_text:
                    type: string
                    description: A blob of text for the button on the MCP server page
                external_documentation_url:
                    type: string
                    description: A link to external documentation for the MCP install page
                installation_override_url:
                    type: string
                    description: URL to redirect to instead of showing the default installation page
                    format: uri
                instructions:
                    type: string
                    description: Server instructions returned in the MCP initialize response
                logo_asset_id:
                    type: string
                    description: The asset ID for the MCP install page logo
                mcp_server_id:
                    type: string
                    description: The ID of the MCP server associated with this install page metadata. Mutually exclusive with toolset_slug.
                    format: uuid
                toolset_slug:
                    type: string
                    description: The slug of the toolset associated with this install page metadata. Mutually exclusive with mcp_server_id.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
        SetOrganizationWhitelistRequestBody:
            type: object
            properties:
                organization_id:
                    type: string
                    description: The ID of the organization to update
                whitelisted:
                    type: boolean
                    description: Whether the organization should be whitelisted
            required:
                - organization_id
                - whitelisted
        SetPinnedRequestBody:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the chat to pin or unpin
                pinned:
                    type: boolean
                    description: True to pin the chat, false to unpin it
            required:
                - id
                - pinned
        SetPluginAssignmentsForm:
            type: object
            properties:
                plugin_id:
                    type: string
                    format: uuid
                principal_urns:
                    type: array
                    items:
                        type: string
                    description: List of principal URNs to assign.
            required:
                - plugin_id
                - principal_urns
        SetPluginAssignmentsResponseBody:
            type: object
            properties:
                assignments:
                    type: array
                    items:
                        $ref: '#/components/schemas/PluginAssignment'
                    description: The updated assignments.
            required:
                - assignments
        SetProductFeatureRequestBody:
            type: object
            properties:
                enabled:
                    type: boolean
                    description: Whether the feature should be enabled
                feature_name:
                    type: string
                    description: Name of the feature to update
                    enum:
                        - logs
                        - tool_io_logs
                        - session_capture
                        - authz_challenge_logging
                        - sso
                        - scim
                        - hooks_browser_login
                        - hooks_fail_open
                        - custom_model_keys
                        - skills
                        - skill_capture_metadata_only
                        - ai_platform_push_integrations
                        - platform_mcp
                        - customer_managed_encryption_keys
                        - remote_session_auto_refresh
                        - remote_session_auto_refresh_enforced
                    maxLength: 60
            required:
                - feature_name
                - enabled
        SetProjectLogoForm:
            type: object
            properties:
                asset_id:
                    type: string
                    description: The ID of the asset
            required:
                - asset_id
        SetProjectLogoResult:
            type: object
            properties:
                project:
                    $ref: '#/components/schemas/Project'
            required:
                - project
        SetRemoteSessionAutoRefreshPolicyRequestBody:
            type: object
            properties:
                policy:
                    type: string
                    description: Organization policy for automatic remote-session refresh
                    enum:
                        - disabled
                        - user_controlled
                        - enforced
            required:
                - policy
        SetRootMcpEndpointRequestBody:
            type: object
            properties:
                custom_domain_id:
                    type: string
                    description: The custom domain whose root mapping to change
                    format: uuid
                mcp_endpoint_id:
                    type: string
                    description: The MCP endpoint to map to the domain root. Omit to clear the mapping.
                    format: uuid
            required:
                - custom_domain_id
        SetScheduleEnabledRequestBody:
            type: object
            properties:
                enabled:
                    type: boolean
                    description: Whether the schedule should be polled.
                provider:
                    type: string
                    description: AI provider identifier. Supported values include cursor, anthropic_compliance, codex_compliance, and chatgpt_compliance.
                schedule:
                    type: string
                    description: Schedule identifier (e.g. cursor, anthropic_compliance, anthropic_analytics_usage).
            required:
                - provider
                - schedule
                - enabled
        SetSourceEnvironmentLinkRequestBody:
            type: object
            properties:
                environment_id:
                    type: string
                    description: The ID of the environment to link
                    format: uuid
                source_kind:
                    type: string
                    description: The kind of source (http or function)
                    enum:
                        - http
                        - function
                source_slug:
                    type: string
                    description: The slug of the source
            required:
                - source_kind
                - source_slug
                - environment_id
        SetSpendCapRequestBody:
            type: object
            properties:
                key_type:
                    type: string
                    description: The platform-managed inference key to update. Defaults to chat for compatibility.
                    enum:
                        - chat
                        - internal
                monthly_credits:
                    type: integer
                    description: The monthly inference spend cap in USD
                    format: int64
                    minimum: 1
                    maximum: 10000
            required:
                - monthly_credits
        SetToolMetadataBatchRequestBody:
            type: object
            properties:
                mcp_server_id:
                    type: string
                    description: The ID of the MCP server the tool metadata belongs to
                    format: uuid
                tools:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolMetadataForm'
                    description: The authoritative set of tools for the MCP server. Stored tools absent from this list are soft-deleted.
            required:
                - mcp_server_id
                - tools
        SetToolMetadataBatchResult:
            type: object
            properties:
                deleted:
                    type: integer
                    description: The number of stored tools soft-deleted because they were absent from the payload
                    format: int64
                tools:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolMetadata'
                    description: The stored tool metadata after the upsert
            description: Result of an authoritative tool metadata batch upsert.
            required:
                - tools
                - deleted
        SetToolMetadataRequestBody:
            type: object
            properties:
                destructive_hint:
                    type: boolean
                    description: Hint that the tool may perform destructive updates to its environment
                idempotent_hint:
                    type: boolean
                    description: Hint that calling the tool repeatedly with the same arguments has no additional effect
                mcp_server_id:
                    type: string
                    description: The ID of the MCP server the tool metadata belongs to
                    format: uuid
                open_world_hint:
                    type: boolean
                    description: Hint that the tool may interact with an open world of external entities
                read_only_hint:
                    type: boolean
                    description: Hint that the tool does not modify its environment
                title:
                    type: string
                    description: A human-readable title for the tool
                tool_name:
                    type: string
                    description: The name of the tool to update
            required:
                - mcp_server_id
                - tool_name
        SetToolVariationsGroupForm:
            type: object
            properties:
                project_slug_input:
                    type: string
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                tool_variations_group_id:
                    type: string
                    description: The tool variations group id to assign, or null to disable filtering.
                    format: uuid
            required:
                - slug
        SetToolVariationsGroupRequestBody:
            type: object
            properties:
                tool_variations_group_id:
                    type: string
                    description: The tool variations group id to assign, or null to disable filtering.
                    format: uuid
        SetToolsetEnvironmentLinkRequestBody:
            type: object
            properties:
                environment_id:
                    type: string
                    description: The ID of the environment to link
                    format: uuid
                toolset_id:
                    type: string
                    description: The ID of the toolset
                    format: uuid
            required:
                - toolset_id
                - environment_id
        SetUserSessionIssuerForm:
            type: object
            properties:
                project_slug_input:
                    type: string
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                user_session_issuer_id:
                    type: string
                    description: The user_session_issuer id to link, or null to unlink.
                    format: uuid
            required:
                - slug
        SetUserSessionIssuerRequestBody:
            type: object
            properties:
                user_session_issuer_id:
                    type: string
                    description: The user_session_issuer id to link, or null to unlink.
                    format: uuid
        ShadowMCPInventoryApprovalRequest:
            type: object
            properties:
                id:
                    type: string
                    format: uuid
                requester_count:
                    type: integer
                    description: How many distinct people have asked for this server.
                    format: int64
                status:
                    type: string
                    enum:
                        - unreviewed
                        - requested
                        - approved
                        - denied
            description: The MCP approval request tracking review status for a server. Status records the review outcome, which may cover only selected principals; the server's access field reports enforcement state.
            required:
                - id
                - status
                - requester_count
        ShadowMCPInventoryPolicyBypassForm:
            type: object
            properties:
                policy_ids:
                    type: array
                    items:
                        type: string
                        format: uuid
                project_id:
                    type: string
                    format: uuid
                server_url:
                    type: string
                    format: uri
            required:
                - project_id
                - server_url
                - policy_ids
        ShadowMCPInventoryRequestSummary:
            type: object
            properties:
                id:
                    type: string
                    format: uuid
                policy_id:
                    type: string
                    format: uuid
                requested_at:
                    type: string
                    format: date-time
                requester_email:
                    type: string
                requester_user_id:
                    type: string
            required:
                - id
                - policy_id
                - requester_user_id
                - requester_email
                - requested_at
        ShadowMCPInventoryServer:
            type: object
            properties:
                access:
                    type: string
                    enum:
                        - none
                        - allowed
                        - blocked
                allowed_policy_ids:
                    type: array
                    items:
                        type: string
                approval_request:
                    $ref: '#/components/schemas/ShadowMCPInventoryApprovalRequest'
                blocked_policy_ids:
                    type: array
                    items:
                        type: string
                    description: Enabled blocking policies that block this server via a risk_policy:block grant (allow_all policies only).
                canonical_server_url:
                    type: string
                first_seen:
                    type: string
                    format: date-time
                last_called:
                    type: string
                    format: date-time
                last_seen:
                    type: string
                    format: date-time
                latest_request:
                    $ref: '#/components/schemas/ShadowMCPInventoryRequestSummary'
                observed_use_count:
                    type: integer
                    format: int64
                request_count:
                    type: integer
                    format: int64
                server_name:
                    type: string
                server_slug:
                    type: string
                target_kind:
                    type: string
                    description: 'What the row identifies: a server URL observed or requested, or a local stdio command known only through its review. Absent means server_url.'
                    enum:
                        - server_url
                        - stdio_command
                top_users:
                    type: array
                    items:
                        type: string
                url_host:
                    type: string
                user_count:
                    type: integer
                    format: int64
            required:
                - canonical_server_url
                - server_slug
                - url_host
                - first_seen
                - last_seen
                - observed_use_count
                - user_count
                - top_users
                - access
                - request_count
                - allowed_policy_ids
                - blocked_policy_ids
        ShadowMCPInventoryURLState:
            type: object
            properties:
                access:
                    type: string
                allowed_policy_ids:
                    type: array
                    items:
                        type: string
                approval_request:
                    $ref: '#/components/schemas/ShadowMCPInventoryApprovalRequest'
                blocked_policy_ids:
                    type: array
                    items:
                        type: string
                    description: Enabled blocking policies that block this server via a risk_policy:block grant (allow_all policies only).
                latest_request:
                    $ref: '#/components/schemas/ShadowMCPInventoryRequestSummary'
                request_count:
                    type: integer
                    format: int64
            required:
                - access
                - request_count
                - allowed_policy_ids
                - blocked_policy_ids
        ShadowMCPInventoryUser:
            type: object
            properties:
                email:
                    type: string
                last_called:
                    type: string
                    format: date-time
                name:
                    type: string
                observed_use_count:
                    type: integer
                    format: int64
                sources:
                    type: array
                    items:
                        $ref: '#/components/schemas/ShadowMCPInventoryUserSource'
                user_key:
                    type: string
            required:
                - user_key
                - last_called
                - observed_use_count
        ShadowMCPInventoryUserSource:
            type: object
            properties:
                observed_use_count:
                    type: integer
                    format: int64
                source:
                    type: string
            required:
                - source
                - observed_use_count
        ShareSkillRequestBody:
            type: object
            properties:
                skill_id:
                    type: string
                    description: The skill ID.
                    format: uuid
            required:
                - skill_id
        SharedSkill:
            type: object
            properties:
                cache_control:
                    type: string
                    description: The Cache-Control response header.
                content:
                    type: string
                    description: The latest SKILL.md content.
                display_name:
                    type: string
                    description: The user-facing skill name.
                name:
                    type: string
                    description: The normalized skill name.
                referrer_policy:
                    type: string
                    description: The Referrer-Policy response header.
                summary:
                    type: string
                    description: The optional skill summary.
                updated_at:
                    type: string
                    description: When the shared content was last updated.
                    format: date-time
                x_robots_tag:
                    type: string
                    description: The X-Robots-Tag response header.
            description: The public view of a shared skill. It deliberately carries no project, organization, or user identifiers.
            required:
                - name
                - display_name
                - content
                - updated_at
        SharedSkill2:
            type: object
            properties:
                content:
                    type: string
                    description: The latest SKILL.md content.
                display_name:
                    type: string
                    description: The user-facing skill name.
                name:
                    type: string
                    description: The normalized skill name.
                summary:
                    type: string
                    description: The optional skill summary.
                updated_at:
                    type: string
                    description: When the shared content was last updated.
                    format: date-time
            required:
                - name
                - display_name
                - content
                - updated_at
        Skill:
            type: object
            properties:
                classification:
                    type: string
                    description: The skill classification.
                created_at:
                    type: string
                    description: When the skill was created.
                    format: date-time
                display_name:
                    type: string
                    description: The user-facing registry name.
                first_seen_at:
                    type: string
                    description: When this skill was first activated.
                    format: date-time
                has_valid_version:
                    type: boolean
                    description: Whether the skill has at least one valid version available to distribute.
                id:
                    type: string
                    description: The skill ID.
                    format: uuid
                last_seen_at:
                    type: string
                    description: When this skill was most recently activated.
                    format: date-time
                latest_version_id:
                    type: string
                    description: The current version ID, selected by effective promotion time.
                    format: uuid
                name:
                    type: string
                    description: The normalized project-unique skill name.
                project_id:
                    type: string
                    description: The project that owns the skill.
                    format: uuid
                seen_count:
                    type: integer
                    description: The number of reconciled activations observed for this skill.
                    format: int64
                share_token:
                    type: string
                    description: The active public share token, absent when the skill is not shared.
                source_kind:
                    type: string
                    description: How the skill entered the registry.
                summary:
                    type: string
                    description: The optional registry summary.
                tags:
                    type: array
                    items:
                        type: string
                    description: Registry tags for categorizing the skill.
                updated_at:
                    type: string
                    description: When the skill was last updated.
                    format: date-time
                version_count:
                    type: integer
                    description: The number of immutable versions recorded for the skill.
                    format: int64
            description: An active project skill. All API reads return active skills, and archive returns an empty response.
            required:
                - id
                - project_id
                - name
                - display_name
                - source_kind
                - classification
                - tags
                - version_count
                - has_valid_version
                - seen_count
                - created_at
                - updated_at
        SkillAdoption:
            type: object
            properties:
                activations_in_window:
                    type: integer
                    description: Activations observed during the rolling window.
                    format: int64
                distinct_hostnames:
                    type: integer
                    description: Distinct non-empty hostnames that activated the skill during the rolling window.
                    format: int64
                window_end:
                    type: string
                    description: End of the rolling adoption window.
                    format: date-time
                window_start:
                    type: string
                    description: Start of the rolling adoption window.
                    format: date-time
            description: Activation adoption metrics for a skill.
            required:
                - window_start
                - window_end
                - distinct_hostnames
                - activations_in_window
        SkillBreakdownRow:
            type: object
            properties:
                skill_name:
                    type: string
                    description: Skill name
                use_count:
                    type: integer
                    description: Use count for this skill/user combination
                    format: int64
                user_email:
                    type: string
                    description: User email address
            description: Per-(skill, user) aggregated counts
            required:
                - skill_name
                - user_email
                - use_count
        SkillDistribution:
            type: object
            properties:
                assistant_id:
                    type: string
                    description: The assistant that carries the skill.
                    format: uuid
                assistant_name:
                    type: string
                    description: The name of the assistant that carries the skill.
                channel:
                    type: string
                    description: The distribution channel.
                    enum:
                        - plugin
                        - assistant
                created_at:
                    type: string
                    description: When the distribution was created.
                    format: date-time
                created_by_user_id:
                    type: string
                    description: The user that created the distribution.
                id:
                    type: string
                    description: The distribution ID.
                    format: uuid
                pinned_version_id:
                    type: string
                    description: The pinned version, absent when tracking the latest valid version.
                    format: uuid
                plugin_id:
                    type: string
                    description: The plugin that carries the skill.
                    format: uuid
                plugin_name:
                    type: string
                    description: The name of the plugin that carries the skill.
                project_id:
                    type: string
                    description: The project that owns the distribution.
                    format: uuid
                resolved_version_id:
                    type: string
                    description: The version currently targeted by this distribution.
                    format: uuid
                skill_display_name:
                    type: string
                    description: The display name of the distributed skill.
                skill_id:
                    type: string
                    description: The distributed skill ID.
                    format: uuid
                skill_name:
                    type: string
                    description: The canonical name of the distributed skill.
                updated_at:
                    type: string
                    description: When the distribution configuration last changed.
                    format: date-time
            description: An active plugin or assistant distribution of a project skill.
            required:
                - id
                - project_id
                - skill_id
                - skill_name
                - skill_display_name
                - resolved_version_id
                - channel
                - created_by_user_id
                - created_at
                - updated_at
        SkillDrift:
            type: object
            properties:
                active_machines:
                    type: integer
                    description: Machines that activated the skill during the window.
                    format: int64
                drifted_machines:
                    type: integer
                    description: Active machines whose latest attributed activation used another version.
                    format: int64
                indeterminate_machines:
                    type: integer
                    description: Active machines without a version or without one unambiguous target.
                    format: int64
                on_target_machines:
                    type: integer
                    description: Active machines whose latest activation used the target version.
                    format: int64
                target_state:
                    type: string
                    description: Whether the skill has no distribution target, one target, or conflicting targets.
                    enum:
                        - not_distributed
                        - single
                        - ambiguous
                target_version_ids:
                    type: array
                    items:
                        type: string
                        format: uuid
                    description: Distinct versions targeted by active plugin distributions.
                window_end:
                    type: string
                    description: End of the active-machine window.
                    format: date-time
                window_start:
                    type: string
                    description: Start of the active-machine window.
                    format: date-time
            description: Active-machine convergence against the skill's plugin distribution target.
            required:
                - window_start
                - window_end
                - target_state
                - target_version_ids
                - active_machines
                - on_target_machines
                - drifted_machines
                - indeterminate_machines
        SkillEditSuggestion:
            type: object
            properties:
                applies_cleanly:
                    type: boolean
                    description: Whether every proposed change still applies to the base version.
                approved_at:
                    type: string
                    description: When the suggestion was approved, when present.
                    format: date-time
                approved_by_user_id:
                    type: string
                    description: The user that approved the suggestion, when present.
                base_version_id:
                    type: string
                    description: The version the suggestion was generated from.
                    format: uuid
                changes:
                    type: array
                    items:
                        $ref: '#/components/schemas/SkillEditSuggestionChange'
                    description: The separate changes proposed, each reviewable on its own.
                created_at:
                    type: string
                    description: When the suggestion was created.
                    format: date-time
                feedback_count:
                    type: integer
                    description: Feedback records the suggestion was generated from.
                    format: int64
                feedback_session_count:
                    type: integer
                    description: Distinct sessions that reported the feedback behind the suggestion.
                    format: int64
                id:
                    type: string
                    description: The suggestion ID.
                    format: uuid
                proposed_content:
                    type: string
                    description: The complete SKILL.md content produced by taking every proposed change.
                rationale:
                    type: string
                    description: Why the edit was proposed, covering the suggestion as a whole.
                scored_session_count:
                    type: integer
                    description: Scored sessions considered by the suggestion.
                    format: int64
                skill_display_name:
                    type: string
                    description: The user-facing skill name.
                skill_id:
                    type: string
                    description: The skill targeted by the suggestion.
                    format: uuid
                skill_name:
                    type: string
                    description: The canonical skill name.
                status:
                    type: string
                    description: The suggestion state.
                    enum:
                        - open
                        - approved
                        - dismissed
                        - superseded
                updated_at:
                    type: string
                    description: When the suggestion was last updated.
                    format: date-time
            description: A proposed edit to an existing project skill.
            required:
                - id
                - skill_id
                - skill_name
                - skill_display_name
                - base_version_id
                - changes
                - proposed_content
                - applies_cleanly
                - rationale
                - status
                - feedback_count
                - feedback_session_count
                - scored_session_count
                - created_at
                - updated_at
        SkillEditSuggestionChange:
            type: object
            properties:
                applies_cleanly:
                    type: boolean
                    description: Whether the change still applies.
                created_at:
                    type: string
                    description: When the change was recorded.
                    format: date-time
                feedback_count:
                    type: integer
                    description: Feedback records cited as the reason for this change.
                    format: int64
                feedback_session_count:
                    type: integer
                    description: Distinct sessions that reported the feedback behind this change.
                    format: int64
                id:
                    type: string
                    description: The change ID.
                    format: uuid
                proposed_diff:
                    type: string
                    description: The change as a unified diff against the content the changes before it produce.
                rationale:
                    type: string
                    description: Why this change alone was proposed.
                suggestion_id:
                    type: string
                    description: The suggestion the change belongs to.
                    format: uuid
            description: One self-contained edit proposed by a suggestion, applied and reviewed on its own.
            required:
                - id
                - suggestion_id
                - proposed_diff
                - rationale
                - applies_cleanly
                - feedback_count
                - feedback_session_count
                - created_at
        SkillEfficacyInsight:
            type: object
            properties:
                metrics:
                    $ref: '#/components/schemas/SkillInsightMetrics'
                regression_signal:
                    $ref: '#/components/schemas/SkillEfficacyRegressionSignal'
                skill_id:
                    type: string
                    format: uuid
                versions:
                    type: array
                    items:
                        $ref: '#/components/schemas/SkillVersionInsight'
            required:
                - skill_id
                - metrics
                - versions
        SkillEfficacyInsightsResult:
            type: object
            properties:
                from:
                    type: string
                    format: date-time
                insights:
                    type: array
                    items:
                        $ref: '#/components/schemas/SkillEfficacyInsight'
                interval_seconds:
                    type: integer
                    format: int64
                next_cursor:
                    type: string
                    description: Cursor for the next page of scored sessions; absent when exhausted.
                scored_sessions:
                    type: array
                    items:
                        $ref: '#/components/schemas/SkillEfficacyScoredSession'
                scores_available:
                    type: boolean
                to:
                    type: string
                    format: date-time
            required:
                - from
                - to
                - interval_seconds
                - scores_available
                - insights
                - scored_sessions
        SkillEfficacyMetrics:
            type: object
            properties:
                average_score:
                    type: number
                    format: double
                estimated_minutes_saved_average:
                    type: number
                    format: double
                estimated_minutes_saved_samples:
                    type: integer
                    format: int64
                estimated_minutes_saved_total:
                    type: number
                    format: double
                estimated_turns_saved_average:
                    type: number
                    format: double
                estimated_turns_saved_samples:
                    type: integer
                    format: int64
                estimated_turns_saved_total:
                    type: number
                    format: double
                flag_counts:
                    type: object
                    additionalProperties:
                        type: integer
                        format: int64
                roi_confidence_counts:
                    type: object
                    additionalProperties:
                        type: integer
                        format: int64
                scored_sessions:
                    type: integer
                    format: int64
            required:
                - scored_sessions
                - average_score
                - estimated_turns_saved_total
                - estimated_turns_saved_samples
                - estimated_minutes_saved_total
                - estimated_minutes_saved_samples
                - roi_confidence_counts
                - flag_counts
        SkillEfficacyRegressionSignal:
            type: object
            properties:
                comparable:
                    type: boolean
                current_average_score:
                    type: number
                    format: double
                current_scored_sessions:
                    type: integer
                    format: int64
                current_version_id:
                    type: string
                    format: uuid
                predecessor_average_score:
                    type: number
                    format: double
                predecessor_scored_sessions:
                    type: integer
                    format: int64
                predecessor_version_id:
                    type: string
                    format: uuid
                regression:
                    type: boolean
                window_end:
                    type: string
                    format: date-time
                window_start:
                    type: string
                    format: date-time
            description: The current skill version's efficacy comparison using the server suggestion policy.
            required:
                - comparable
                - regression
                - current_version_id
                - current_average_score
                - current_scored_sessions
                - predecessor_average_score
                - predecessor_scored_sessions
                - window_start
                - window_end
        SkillEfficacyScoredSession:
            type: object
            properties:
                activated_at:
                    type: string
                    format: date-time
                estimated_minutes_saved:
                    type: number
                    format: double
                estimated_turns_saved:
                    type: number
                    format: double
                flags:
                    type: array
                    items:
                        type: string
                gram_chat_id:
                    type: string
                    format: uuid
                id:
                    type: string
                    format: uuid
                rationale:
                    type: string
                roi_confidence:
                    type: string
                    enum:
                        - low
                        - med
                        - high
                score:
                    type: number
                    format: double
                scored_at:
                    type: string
                    format: date-time
                skill_id:
                    type: string
                    format: uuid
                skill_version_id:
                    type: string
                    format: uuid
                surface:
                    type: string
                    enum:
                        - dev
                        - assistant
            required:
                - id
                - skill_id
                - skill_version_id
                - surface
                - activated_at
                - scored_at
                - score
                - rationale
                - flags
        SkillEfficacySettings:
            type: object
            properties:
                enabled:
                    type: boolean
                    description: Whether skill efficacy scoring is enabled.
                is_default:
                    type: boolean
                    description: Whether these values are platform defaults rather than stored organization settings.
                new_version_burst:
                    type: integer
                    description: Lifetime evaluations a new skill version may reserve before the per-skill daily cap applies.
                    format: int64
                    minimum: 0
                    maximum: 10000
                org_daily_cap:
                    type: integer
                    description: Maximum evaluations reserved across the organization each UTC day.
                    format: int64
                    minimum: 0
                    maximum: 10000
                organization_id:
                    type: string
                    description: Organization these settings apply to.
                per_skill_daily_cap:
                    type: integer
                    description: Maximum evaluations reserved per skill each UTC day.
                    format: int64
                    minimum: 0
                    maximum: 10000
            description: Per-organization sampling settings for skill efficacy scoring.
            required:
                - organization_id
                - enabled
                - per_skill_daily_cap
                - org_daily_cap
                - new_version_burst
                - is_default
        SkillFeedback:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the feedback was recorded.
                    format: date-time
                id:
                    type: string
                    description: The feedback ID.
                    format: uuid
                note:
                    type: string
                    description: An optional feedback note.
                outcome:
                    type: string
                    description: The reported skill feedback outcome.
                    enum:
                        - helped
                        - partially_helped
                        - did_not_help
                        - misleading
                        - harmful
                reviewed_at:
                    type: string
                    description: When automated suggestion analysis reviewed this feedback.
                    format: date-time
                skill_version_id:
                    type: string
                    description: The attributed skill version, when known.
                    format: uuid
                source:
                    type: string
                    description: Where skill feedback was recorded.
            description: A privacy-minimized feedback row for a skill.
            required:
                - id
                - source
                - outcome
                - created_at
        SkillFeedbackCounts:
            type: object
            properties:
                did_not_help:
                    type: integer
                    format: int64
                harmful:
                    type: integer
                    format: int64
                helped:
                    type: integer
                    format: int64
                misleading:
                    type: integer
                    format: int64
                partially_helped:
                    type: integer
                    format: int64
                total:
                    type: integer
                    format: int64
            description: All-time outcome counts for resolved feedback on a skill.
            required:
                - total
                - helped
                - partially_helped
                - did_not_help
                - misleading
                - harmful
        SkillFeedbackMetrics:
            type: object
            properties:
                activations_in_window:
                    type: integer
                    description: Resolved skill activations during the collection window.
                    format: int64
                converted:
                    type: integer
                    description: All-time feedback linked to a generated suggestion.
                    format: int64
                feedback_activations_in_window:
                    type: integer
                    description: Resolved activations paired to feedback during the collection window.
                    format: int64
                feedback_in_window:
                    type: integer
                    description: Feedback recorded during the collection window.
                    format: int64
                unreviewed:
                    type: integer
                    description: Feedback not yet reviewed by suggestion analysis.
                    format: int64
                window_end:
                    type: string
                    description: The end of the rolling collection window.
                    format: date-time
                window_start:
                    type: string
                    description: The start of the rolling collection window.
                    format: date-time
            description: Feedback collection and suggestion conversion metrics for a skill.
            required:
                - window_start
                - window_end
                - feedback_in_window
                - activations_in_window
                - feedback_activations_in_window
                - unreviewed
                - converted
        SkillFeedbackPayload:
            type: object
            properties:
                note:
                    type: string
                    description: Optional concise context about the outcome.
                    maxLength: 4000
                outcome:
                    type: string
                    description: How the skill affected the task.
                    enum:
                        - helped
                        - partially_helped
                        - did_not_help
                        - misleading
                        - harmful
                schema_version:
                    type: string
                    description: Contract version.
                    enum:
                        - hook.skill-feedback.v1
                skill:
                    type: string
                    description: Canonical name of the skill that was used.
                    pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
                    minLength: 1
                    maxLength: 64
            description: Agent-volunteered feedback about a distributed skill.
            required:
                - schema_version
                - skill
                - outcome
        SkillFeedbackTimelinePoint:
            type: object
            properties:
                bucket_start:
                    type: string
                    description: The start of the UTC day.
                    format: date-time
                feedback_count:
                    type: integer
                    format: int64
            description: Feedback volume for one UTC day.
            required:
                - bucket_start
                - feedback_count
        SkillInsightMetrics:
            type: object
            properties:
                activated_sessions:
                    type: integer
                    format: int64
                activations:
                    type: integer
                    format: int64
                average_session_cost_usd:
                    type: number
                    format: double
                efficacy:
                    $ref: '#/components/schemas/SkillEfficacyMetrics'
                session_cost_usd:
                    type: number
                    format: double
            required:
                - activations
                - activated_sessions
                - session_cost_usd
        SkillInsightPoint:
            type: object
            properties:
                activated_sessions:
                    type: integer
                    format: int64
                activations:
                    type: integer
                    format: int64
                average_score:
                    type: number
                    format: double
                bucket_start:
                    type: string
                    format: date-time
                estimated_minutes_saved:
                    type: number
                    format: double
                scored_sessions:
                    type: integer
                    format: int64
                session_cost_usd:
                    type: number
                    format: double
            required:
                - bucket_start
                - activations
                - activated_sessions
                - session_cost_usd
                - scored_sessions
                - estimated_minutes_saved
        SkillPromptInjectionFinding:
            type: object
            properties:
                confidence:
                    type: number
                    description: The classifier confidence from 0 to 1.
                    format: double
                    minimum: 0
                    maximum: 1
                description:
                    type: string
                    description: Why the current skill version was flagged.
                rule_id:
                    type: string
                    description: The rule that produced the finding.
            description: A prompt-injection finding for the current skill version. Raw matched content is intentionally omitted.
            required:
                - rule_id
                - description
                - confidence
        SkillShareLink:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the share link was created.
                    format: date-time
                token:
                    type: string
                    description: The public share token.
            description: An active public share link for a skill.
            required:
                - token
                - created_at
        SkillSightingTimelinePoint:
            type: object
            properties:
                activation_count:
                    type: integer
                    description: Activations observed during the day.
                    format: int64
                bucket_start:
                    type: string
                    description: Start of the UTC day.
                    format: date-time
                skill_version_id:
                    type: string
                    description: The attributed skill version, absent when the observation could not be resolved to a version.
                    format: uuid
            description: A UTC-day activation bucket for one attributed skill version.
            required:
                - bucket_start
                - activation_count
        SkillSuggestionApprovalItem:
            type: object
            properties:
                message:
                    type: string
                    description: A safe explanation for a conflict or failure.
                outcome:
                    type: string
                    description: The item's processing outcome.
                    enum:
                        - applied
                        - superseded
                        - conflict
                        - failed
                resulting_version_id:
                    type: string
                    description: The created version for an applied item.
                    format: uuid
                skill_display_name:
                    type: string
                    description: The user-facing skill name.
                skill_id:
                    type: string
                    description: The targeted skill ID.
                    format: uuid
                skill_name:
                    type: string
                    description: The canonical skill name.
                suggestion_id:
                    type: string
                    description: The suggestion ID.
                    format: uuid
            description: The result of one item in a bulk suggestion approval.
            required:
                - suggestion_id
                - skill_id
                - skill_name
                - skill_display_name
                - outcome
        SkillSummary:
            type: object
            properties:
                skill_name:
                    type: string
                    description: Skill name (extracted from tool name)
                unique_users:
                    type: integer
                    description: Number of unique users who used this skill
                    format: int64
                use_count:
                    type: integer
                    description: Total number of times this skill was used
                    format: int64
            description: Aggregated skills metrics for a single skill
            required:
                - skill_name
                - use_count
                - unique_users
        SkillTimeSeriesPoint:
            type: object
            properties:
                bucket_start_ns:
                    type: string
                    description: Bucket start time in Unix nanoseconds (string for JS int64 precision)
                event_count:
                    type: integer
                    description: Number of skill use events in this bucket
                    format: int64
                skill_name:
                    type: string
                    description: Skill name
            description: A single time-series bucket for skill usage activity
            required:
                - bucket_start_ns
                - skill_name
                - event_count
        SkillValidationError:
            type: object
            properties:
                code:
                    type: string
                    description: A stable validation error code.
                field:
                    type: string
                    description: The manifest field associated with the problem.
                message:
                    type: string
                    description: A human-readable explanation of the problem.
            description: A validation problem found in an uploaded skill manifest.
            required:
                - code
                - field
                - message
        SkillVersion:
            type: object
            properties:
                canonical_sha256:
                    type: string
                    description: The SHA-256 manifest digest derived from canonicalized SKILL.md content.
                content:
                    type: string
                    description: The exact uploaded SKILL.md content.
                created_at:
                    type: string
                    description: When this immutable version was recorded.
                    format: date-time
                created_by_user_id:
                    type: string
                    description: The user that recorded this version.
                derived_from_version_id:
                    type: string
                    description: The source version this version was derived from.
                    format: uuid
                description:
                    type: string
                    description: The optional description from this manifest version.
                first_seen_at:
                    type: string
                    description: When this exact version was first activated.
                    format: date-time
                frontmatter:
                    type: object
                    description: All top-level frontmatter fields parsed from this manifest version.
                    additionalProperties: true
                id:
                    type: string
                    description: The skill version ID.
                    format: uuid
                last_seen_at:
                    type: string
                    description: When this exact version was most recently activated.
                    format: date-time
                metadata:
                    type: object
                    description: Metadata parsed from this manifest version.
                    additionalProperties: true
                raw_sha256:
                    type: string
                    description: The SHA-256 digest of the exact uploaded SKILL.md content.
                seen_count:
                    type: integer
                    description: The number of activations attributed to this exact version.
                    format: int64
                skill_id:
                    type: string
                    description: The skill that owns this version.
                    format: uuid
                spec_valid:
                    type: boolean
                    description: Whether this manifest version conforms to the Agent Skills specification.
                validation_errors:
                    type: array
                    items:
                        $ref: '#/components/schemas/SkillValidationError'
                    description: Specification validation problems recorded for this manifest version.
            description: An immutable version of a skill manifest.
            required:
                - id
                - skill_id
                - content
                - canonical_sha256
                - raw_sha256
                - metadata
                - frontmatter
                - spec_valid
                - validation_errors
                - created_at
                - created_by_user_id
                - seen_count
        SkillVersionInsight:
            type: object
            properties:
                metrics:
                    $ref: '#/components/schemas/SkillInsightMetrics'
                skill_version_id:
                    type: string
                    format: uuid
                trend:
                    type: array
                    items:
                        $ref: '#/components/schemas/SkillInsightPoint'
            required:
                - skill_version_id
                - metrics
                - trend
        SourceEnvironmentLink:
            type: object
            properties:
                environment_id:
                    type: string
                    description: The ID of the environment
                    format: uuid
                id:
                    type: string
                    description: The ID of the source environment link
                    format: uuid
                source_kind:
                    type: string
                    description: The kind of source that can be linked to an environment
                    enum:
                        - http
                        - function
                source_slug:
                    type: string
                    description: The slug of the source
            description: A link between a source and an environment
            required:
                - id
                - source_kind
                - source_slug
                - environment_id
        SpendCap:
            type: object
            properties:
                key_type:
                    type: string
                    description: The platform-managed inference key whose cap is reported
                    enum:
                        - chat
                        - internal
                monthly_credits:
                    type: integer
                    description: The monthly inference spend cap in USD
                    format: int64
                    minimum: 1
                    maximum: 10000
            required:
                - key_type
                - monthly_credits
        SpendRule:
            type: object
            properties:
                action:
                    type: string
                    description: 'Rule action: flag (record events only) or block (deny agent traffic on breach).'
                    enum:
                        - flag
                        - block
                created_at:
                    type: string
                    description: When the rule was created.
                    format: date-time
                description:
                    type: string
                    description: Description of what the rule covers. Empty when unset.
                enabled:
                    type: boolean
                    description: Whether the rule is active.
                id:
                    type: string
                    description: 'The budget rule ID. Identifies one immutable version row: edits produce a successor row with a fresh ID.'
                    format: uuid
                limit_usd:
                    type: number
                    description: Per-person budget in USD for one window.
                    format: double
                name:
                    type: string
                    description: The rule name.
                organization_id:
                    type: string
                    description: The organization ID.
                rule_expr:
                    type: string
                    description: CEL boolean expression over actor usage that identifies a budget breach for matched members.
                slug:
                    type: string
                    description: URL-safe identifier derived from the name at creation time. Unique per organization and immutable; the rule URN embeds it.
                target:
                    $ref: '#/components/schemas/SpendRuleTargetCondition'
                target_expr:
                    type: string
                    description: CEL boolean expression over member attributes (email, directory attributes, groups, roles) selecting who the rule applies to.
                updated_at:
                    type: string
                    description: When the rule was last updated.
                    format: date-time
                urn:
                    type: string
                    description: Versioned rule URN, e.g. spend_rule:eng-monthly-cap:v3. Pins the exact rule configuration that produced an event.
                version:
                    type: integer
                    description: Position of this row in its slug lineage; every edit archives the current row and creates version + 1.
                    format: int64
                warn_at_pct:
                    type: integer
                    description: Percentage of the limit at which a warning event is emitted.
                    format: int64
                window_kind:
                    type: string
                    description: UTC calendar window the budget covers.
                    enum:
                        - daily
                        - weekly
                        - monthly
            required:
                - id
                - urn
                - organization_id
                - name
                - slug
                - description
                - target
                - target_expr
                - rule_expr
                - limit_usd
                - window_kind
                - warn_at_pct
                - action
                - enabled
                - version
                - created_at
                - updated_at
        SpendRuleActorUsage:
            type: object
            properties:
                breached:
                    type: boolean
                    description: Whether the rule expression currently matches this actor usage.
                display_name:
                    type: string
                    description: Actor display name, when known.
                email:
                    type: string
                    description: Actor email.
                limit_usd:
                    type: number
                    description: Per-person budget in USD.
                    format: double
                spend_usd:
                    type: number
                    description: Actor spend in USD within the current window.
                    format: double
                used_pct:
                    type: number
                    description: Spend as a percentage of the limit (may exceed 100).
                    format: double
                user_id:
                    type: string
                    description: Gram user ID of the actor, when linked.
            required:
                - email
                - spend_usd
                - limit_usd
                - used_pct
                - breached
        SpendRuleEvent:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the event was recorded.
                    format: date-time
                display_name:
                    type: string
                    description: Actor display name, when known.
                email:
                    type: string
                    description: Actor email.
                event_type:
                    type: string
                    description: Event type.
                    enum:
                        - warning
                        - breach
                id:
                    type: string
                    description: The event ID.
                    format: uuid
                limit_usd:
                    type: number
                    description: Per-person budget in USD the rule granted at the pinned version.
                    format: double
                rule_id:
                    type: string
                    description: ID of the exact rule version row that produced the event.
                    format: uuid
                rule_name:
                    type: string
                    description: Name of the rule as of the version that fired.
                rule_urn:
                    type: string
                    description: Versioned rule URN pinning the config that produced the event.
                spend_usd:
                    type: number
                    description: Actor spend in USD at evaluation time.
                    format: double
                user_id:
                    type: string
                    description: Gram user ID of the actor, when linked.
                window_end:
                    type: string
                    description: Exclusive end of the budget window; the budget resets at this instant.
                    format: date-time
                window_start:
                    type: string
                    description: Inclusive start of the budget window.
                    format: date-time
            required:
                - id
                - rule_id
                - rule_urn
                - rule_name
                - event_type
                - email
                - spend_usd
                - limit_usd
                - window_start
                - window_end
                - created_at
        SpendRuleTargetCondition:
            type: object
            properties:
                attribute:
                    type: string
                    description: Member attribute name.
                operator:
                    type: string
                    description: 'Comparison operator: equals, not_equals, starts_with, ends_with, contains, matches, or includes.'
                value:
                    type: string
                    description: Comparison value.
            required:
                - attribute
                - operator
                - value
        SpendRuleUsage:
            type: object
            properties:
                budget_usd:
                    type: number
                    description: Total budgeted spend in USD (per-person limit times matched users).
                    format: double
                matched_users:
                    type: integer
                    description: Number of organization members the rule currently matches.
                    format: int64
                rule_id:
                    type: string
                    description: The budget rule ID.
                    format: uuid
                spend_usd:
                    type: number
                    description: Total spend in USD across matched users within the current window.
                    format: double
                status:
                    type: string
                    description: Derived rule status from the worst matched actor.
                    enum:
                        - healthy
                        - approaching
                        - flagging
                        - blocking
                users_breached:
                    type: integer
                    description: Matched users at or past the limit.
                    format: int64
                users_warned:
                    type: integer
                    description: Matched users at or past the warning threshold but under the limit.
                    format: int64
                worst_used_pct:
                    type: number
                    description: Highest per-actor usage percentage across matched users (may exceed 100).
                    format: double
            required:
                - rule_id
                - matched_users
                - users_warned
                - users_breached
                - spend_usd
                - budget_usd
                - worst_used_pct
                - status
        SpendRulesOverviewResult:
            type: object
            properties:
                rules:
                    type: array
                    items:
                        $ref: '#/components/schemas/SpendRuleUsage'
                    description: Current-window usage per enabled rule.
                rules_total:
                    type: integer
                    description: Total enabled rules.
                    format: int64
                rules_unhealthy:
                    type: integer
                    description: Enabled rules whose status is not healthy.
                    format: int64
                spend_over_budget_usd:
                    type: number
                    description: Current spend over planned budget in USD, summed across actors over their per-person limits.
                    format: double
                total_budget_usd:
                    type: number
                    description: Total budgeted spend in USD across enabled rules (per-person limits times matched users).
                    format: double
                total_spend_usd:
                    type: number
                    description: Spend in USD across all users matched by enabled rules, in each rule's current window.
                    format: double
                users_breached:
                    type: integer
                    description: Distinct users at or past the limit of at least one enabled rule.
                    format: int64
                users_total:
                    type: integer
                    description: Distinct users matched by at least one enabled rule.
                    format: int64
            required:
                - total_spend_usd
                - total_budget_usd
                - users_breached
                - users_total
                - rules_unhealthy
                - rules_total
                - spend_over_budget_usd
                - rules
        StartOnboardingRequestBody:
            type: object
            properties:
                source_surface:
                    type: string
                    description: Bounded dashboard surface that opened setup.
                    enum:
                        - platform_mcp_settings
                        - organization_setup
                        - platform_plugins
                        - sidebar_footer
                        - sources_empty
                        - project_overview_zero_data
                        - organization_home
        StripeSubscription:
            type: object
            properties:
                cancel_at:
                    type: string
                    description: Scheduled cancellation time, when present
                    format: date-time
                cancel_at_period_end:
                    type: boolean
                    description: Whether Stripe will cancel the subscription at the end of the current period
                canceled_at:
                    type: string
                    description: Time cancellation was requested or completed, when present
                    format: date-time
                current_period_end:
                    type: string
                    description: End of the current Stripe service period (exclusive)
                    format: date-time
                current_period_start:
                    type: string
                    description: Start of the current Stripe service period
                    format: date-time
                payment_failed:
                    type: boolean
                    description: Whether a past-due subscription has an open latest invoice with an unpaid balance
                status:
                    type: string
                    description: The live Stripe subscription status
                    enum:
                        - incomplete
                        - incomplete_expired
                        - trialing
                        - active
                        - past_due
                        - canceled
                        - unpaid
                        - paused
                trial_end:
                    type: string
                    description: End of the Stripe trial, when one is configured
                    format: date-time
                trial_start:
                    type: string
                    description: Start of the Stripe trial, when the subscription is trialing
                    format: date-time
            required:
                - status
                - current_period_start
                - current_period_end
                - cancel_at_period_end
                - payment_failed
        SubmitFeedbackRequestBody:
            type: object
            properties:
                feedback:
                    type: string
                    description: 'User feedback: success or failure'
                    enum:
                        - success
                        - failure
                id:
                    type: string
                    description: The ID of the chat
            required:
                - id
                - feedback
        SubmitRiskBlockFeedbackRequestBody:
            type: object
            properties:
                id:
                    type: string
                    description: The block ID (the underlying risk result ID).
                    format: uuid
                sentiment:
                    type: string
                    description: Feedback sentiment.
                    enum:
                        - up
                        - down
            required:
                - id
                - sentiment
        SuggestCustomDetectionRuleRequestBody:
            type: object
            properties:
                existing_rule_ids:
                    type: array
                    items:
                        type: string
                    description: Existing built-in and custom rule ids the suggested id must avoid colliding with.
                prompt:
                    type: string
                    description: Natural-language description of what the rule should detect.
                    minLength: 3
                    maxLength: 500
            required:
                - prompt
        SuggestCustomDetectionRuleResult:
            type: object
            properties:
                description:
                    type: string
                    description: Description of what the rule detects and why it matters.
                detection_expr:
                    type: string
                    description: Suggested CEL detection predicate.
                regex:
                    type: string
                    description: Deprecated legacy regex suggestion; superseded by detection_expr. Present for backward compatibility.
                rule_id:
                    type: string
                    description: Suggested stable identifier, prefixed with `custom.`.
                severity:
                    type: string
                    description: Suggested severity level.
                    enum:
                        - info
                        - low
                        - medium
                        - high
                        - critical
                title:
                    type: string
                    description: Short, human-friendly title for the rule.
            required:
                - rule_id
                - title
                - description
                - regex
                - severity
        SuggestExclusionRequestBody:
            type: object
            properties:
                finding_ids:
                    type: array
                    items:
                        type: string
                    description: IDs of example findings (e.g. a multiselect batch) to derive a suggestion from. Looked up server-side rather than trusted from the client, but only rule_id/source cross into the suggestion — a finding's matched value (a detected secret/PII value the caller hasn't reviewed) is never read for this, so batch-derived suggestions are rule_id/source scoped rather than exact-value. Optional when prompt is provided.
                    maxItems: 50
                known_rule_ids:
                    type: array
                    items:
                        type: string
                    description: Built-in and custom rule ids the suggestion may reference in rule_id filters.
                prompt:
                    type: string
                    description: Natural-language description of the findings to stop flagging. Optional when finding_ids is provided.
                    minLength: 3
                    maxLength: 500
        SuggestExclusionResult:
            type: object
            properties:
                match_type:
                    type: string
                    description: How match_value is interpreted (exact, regex, rule_id, source, entity_type).
                match_value:
                    type: string
                    description: The value matched against findings, interpreted per match_type.
                rule_id_filter:
                    type: string
                    description: Only apply within this rule_id. Empty means any.
                source_filter:
                    type: string
                    description: Only apply within this source. Empty means any.
            required:
                - match_type
                - match_value
        SummarizeChatResult:
            type: object
            properties:
                cached:
                    type: boolean
                    description: True when an existing summary was returned without regenerating
                summary:
                    type: string
                    description: The session summary text
                summary_generated_at:
                    type: string
                    description: When the summary was last generated.
                    format: date-time
            required:
                - summary
                - summary_generated_at
                - cached
        SummarizeRequestBody:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the chat to summarize
                    format: uuid
                regenerate:
                    type: boolean
                    description: When true, regenerate and overwrite any existing summary. Defaults to false.
                    default: false
            required:
                - id
        SummarizeToolCallRequestBody:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the chat containing the tool call
                    format: uuid
                message_id:
                    type: string
                    description: The ID of the assistant message containing the tool call
                    format: uuid
                tool_call_id:
                    type: string
                    description: The provider-assigned ID of the tool call
            required:
                - id
                - message_id
                - tool_call_id
        SummarizeToolCallResult:
            type: object
            properties:
                cached:
                    type: boolean
                    description: True when a stored summary was returned without calling the model
                impact:
                    type: string
                    description: Whether the tool call only read data or could change state
                    enum:
                        - read_only
                        - destructive
                summary:
                    type: string
                    description: A concise two-sentence description of the tool call and its effect
            required:
                - summary
                - impact
                - cached
        SyncedAgentUser:
            type: object
            properties:
                email:
                    type: string
                    description: Email the device agent reported on sync. Resolve against org members for display.
                    example: dev@acme.corp
                first_seen_at:
                    type: string
                    description: First time this email was seen syncing the device agent.
                    format: date-time
                last_seen_at:
                    type: string
                    description: Most recent time this email was seen syncing the device agent.
                    format: date-time
            required:
                - email
                - first_seen_at
                - last_seen_at
        TUMPeriod:
            type: object
            properties:
                days:
                    type: array
                    items:
                        $ref: '#/components/schemas/TUMPeriodDay'
                    description: Daily breakdown of TUM within the cycle. Days without usage are omitted.
                period_end:
                    type: string
                    description: End of the billing cycle (exclusive)
                    format: date-time
                period_start:
                    type: string
                    description: Start of the billing cycle
                    format: date-time
                tokens:
                    type: integer
                    description: Tokens under management consumed during the cycle
                    format: int64
            required:
                - period_start
                - period_end
                - tokens
                - days
        TUMPeriodDay:
            type: object
            properties:
                date:
                    type: string
                    description: The UTC day
                    format: date
                tokens:
                    type: integer
                    description: Tokens under management consumed on this day
                    format: int64
            required:
                - date
                - tokens
        TelemetryFilter:
            type: object
            properties:
                deployment_id:
                    type: string
                    description: Deployment ID filter
                    format: uuid
                from:
                    type: string
                    description: Start time in ISO 8601 format (e.g., '2025-12-19T10:00:00Z')
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                function_id:
                    type: string
                    description: Function ID filter
                    format: uuid
                gram_urn:
                    type: string
                    description: Gram URN filter (single URN, use gram_urns for multiple)
                to:
                    type: string
                    description: End time in ISO 8601 format (e.g., '2025-12-19T11:00:00Z')
                    example: "2025-12-19T11:00:00Z"
                    format: date-time
            description: Filter criteria for telemetry queries
        TelemetryLogRecord:
            type: object
            properties:
                attributes:
                    description: Log attributes as JSON object
                body:
                    type: string
                    description: The primary log message
                id:
                    type: string
                    description: Log record ID
                    format: uuid
                observed_time_unix_nano:
                    type: string
                    description: Unix time in nanoseconds when event was observed (string for JS int64 precision)
                resource_attributes:
                    description: Resource attributes as JSON object
                service:
                    $ref: '#/components/schemas/ServiceInfo'
                severity_text:
                    type: string
                    description: Text representation of severity
                span_id:
                    type: string
                    description: W3C span ID (16 hex characters)
                time_unix_nano:
                    type: string
                    description: Unix time in nanoseconds when event occurred (string for JS int64 precision)
                trace_id:
                    type: string
                    description: W3C trace ID (32 hex characters)
            description: OpenTelemetry log record
            required:
                - id
                - time_unix_nano
                - observed_time_unix_nano
                - body
                - attributes
                - resource_attributes
                - service
        TelemetryWindowPayload:
            type: object
            properties:
                from:
                    type: string
                    description: Start time in ISO 8601 format
                    example: "2025-12-19T10:00:00Z"
                    format: date-time
                project_id:
                    type: string
                    description: Optional project to scope to; defaults to every project in the organization.
                    format: uuid
                to:
                    type: string
                    description: End time in ISO 8601 format
                    example: "2025-12-26T10:00:00Z"
                    format: date-time
            description: An org-scoped time window, optionally narrowed to one project
            required:
                - from
                - to
        TestDetectionRuleMatch:
            type: object
            properties:
                confidence:
                    type: number
                    description: Confidence score in the range 0.0 to 1.0.
                    format: double
                description:
                    type: string
                    description: Human-readable description of why this match was flagged.
                end_pos:
                    type: integer
                    description: Exclusive end byte offset of the match in the sample.
                    format: int64
                match:
                    type: string
                    description: Matched substring of the sample.
                rule_id:
                    type: string
                    description: Canonical rule id of the match (may differ from the requested rule id when one input matches multiple rules).
                source:
                    type: string
                    description: Detection source (e.g. `gitleaks`, `presidio`, `prompt_injection`, `custom`).
                start_pos:
                    type: integer
                    description: Inclusive start byte offset of the match in the sample.
                    format: int64
                tags:
                    type: array
                    items:
                        type: string
                    description: Tags from the underlying rule.
            required:
                - rule_id
                - match
                - start_pos
                - end_pos
                - source
                - confidence
        TestDetectionRuleRequestBody:
            type: object
            properties:
                detection_expr:
                    type: string
                    description: CEL detection predicate for `custom.*` rule ids, evaluated against the sample message.
                rule_id:
                    type: string
                    description: Rule identifier to evaluate (e.g. `secret.aws_access_token`, `pii.email_address`, `custom.acme_token`).
                    minLength: 1
                    maxLength: 200
                text:
                    type: string
                    description: Sample text to scan.
                    minLength: 1
                    maxLength: 50000
            required:
                - rule_id
                - text
        TestDetectionRuleResult:
            type: object
            properties:
                matches:
                    type: array
                    items:
                        $ref: '#/components/schemas/TestDetectionRuleMatch'
                    description: Matches the rule found in the sample.
                reason:
                    type: string
                    description: Why the rule isn't supported when `supported` is false.
                supported:
                    type: boolean
                    description: False when the rule has no text-only detector (e.g. `shadow_mcp`, `destructive_tool`).
            required:
                - matches
                - supported
        TierLimits:
            type: object
            properties:
                add_on_bullets:
                    type: array
                    items:
                        type: string
                    description: Add-on items bullets of the tier (optional)
                base_price:
                    type: number
                    description: The base price for the tier
                    format: double
                feature_bullets:
                    type: array
                    items:
                        type: string
                    description: Key feature bullets of the tier
                included_bullets:
                    type: array
                    items:
                        type: string
                    description: Included items bullets of the tier
                included_credits:
                    type: integer
                    description: The number of credits included in the tier for playground and other dashboard activities
                    format: int64
                included_servers:
                    type: integer
                    description: The number of servers included in the tier
                    format: int64
                included_tool_calls:
                    type: integer
                    description: The number of tool calls included in the tier
                    format: int64
                price_per_additional_server:
                    type: number
                    description: The price per additional server
                    format: double
                price_per_additional_tool_call:
                    type: number
                    description: The price per additional tool call
                    format: double
                tum_price_per_million_usd:
                    type: string
                    description: Exact USD list price per million tokens under management (optional)
            required:
                - base_price
                - included_tool_calls
                - included_servers
                - included_credits
                - price_per_additional_tool_call
                - price_per_additional_server
                - feature_bullets
                - included_bullets
        TimeSeriesBucket:
            type: object
            properties:
                abandoned_chats:
                    type: integer
                    description: Abandoned chat sessions in this bucket
                    format: int64
                avg_session_duration_ms:
                    type: number
                    description: Average session duration in milliseconds
                    format: double
                avg_tool_latency_ms:
                    type: number
                    description: Average tool latency in milliseconds
                    format: double
                bucket_time_unix_nano:
                    type: string
                    description: Bucket start time in Unix nanoseconds (string for JS precision)
                cache_creation_input_tokens:
                    type: integer
                    description: Sum of cache creation input tokens in this bucket
                    format: int64
                cache_read_input_tokens:
                    type: integer
                    description: Sum of cache read input tokens in this bucket
                    format: int64
                failed_chats:
                    type: integer
                    description: Failed chat sessions in this bucket
                    format: int64
                failed_tool_calls:
                    type: integer
                    description: Failed tool calls in this bucket
                    format: int64
                partial_chats:
                    type: integer
                    description: Partially resolved chat sessions in this bucket
                    format: int64
                resolved_chats:
                    type: integer
                    description: Resolved chat sessions in this bucket
                    format: int64
                total_chats:
                    type: integer
                    description: Total chat sessions in this bucket
                    format: int64
                total_cost:
                    type: number
                    description: Total cost in this bucket
                    format: double
                total_input_tokens:
                    type: integer
                    description: Sum of input tokens in this bucket
                    format: int64
                total_output_tokens:
                    type: integer
                    description: Sum of output tokens in this bucket
                    format: int64
                total_tokens:
                    type: integer
                    description: Sum of all tokens in this bucket
                    format: int64
                total_tool_calls:
                    type: integer
                    description: Total tool calls in this bucket
                    format: int64
            description: A single time bucket for time series metrics
            required:
                - bucket_time_unix_nano
                - total_chats
                - resolved_chats
                - failed_chats
                - partial_chats
                - abandoned_chats
                - total_input_tokens
                - total_output_tokens
                - total_tokens
                - cache_read_input_tokens
                - cache_creation_input_tokens
                - total_cost
                - total_tool_calls
                - failed_tool_calls
                - avg_tool_latency_ms
                - avg_session_duration_ms
        TokenResult:
            type: object
            properties:
                access_token:
                    type: string
                    description: The raw per-user API key (carries the `agent_user` scope). Returned exactly once; store it securely. Presented as the Gram-Key on downstream user-scoped endpoints.
                expires_in:
                    type: integer
                    description: Always zero. The minted key has no expiry (api_keys has no TTL).
                    format: int64
                refresh_token:
                    type: string
                    description: Always empty. The minted key is long-lived and does not refresh; its lifecycle lever is revocation.
                user_email:
                    type: string
                    description: Email the key was minted for.
            description: A minted per-user API key for the device agent.
            required:
                - access_token
                - refresh_token
                - expires_in
                - user_email
        TokensUnderManagement:
            type: object
            properties:
                alert_email:
                    type: string
                    description: Email address to notify on TUM threshold events. Only populated for platform admins.
                billing_cycle_anchor_day:
                    type: integer
                    description: Day of month (1-31) the billing cycle starts, at 00:00 UTC
                    format: int64
                history:
                    type: array
                    items:
                        $ref: '#/components/schemas/TUMPeriod'
                    description: TUM usage per billing cycle for the trailing cycles, oldest first. The last entry is the active cycle.
                monthly_token_limit:
                    type: integer
                    description: The contracted monthly tokens under management limit, if one has been configured
                    format: int64
                period_end:
                    type: string
                    description: End of the active billing cycle (exclusive)
                    format: date-time
                period_start:
                    type: string
                    description: Start of the active billing cycle
                    format: date-time
                tokens:
                    type: integer
                    description: Tokens under management consumed during the active billing cycle
                    format: int64
                tunneled_mcp_server_limit:
                    type: integer
                    description: The contracted tunneled MCP server source cap, if one has been configured
                    format: int64
            required:
                - period_start
                - period_end
                - tokens
                - billing_cycle_anchor_day
                - history
        Tool:
            type: object
            properties:
                external_mcp_tool_definition:
                    $ref: '#/components/schemas/ExternalMCPToolDefinition'
                function_tool_definition:
                    $ref: '#/components/schemas/FunctionToolDefinition'
                http_tool_definition:
                    $ref: '#/components/schemas/HTTPToolDefinition'
                platform_tool_definition:
                    $ref: '#/components/schemas/PlatformToolDefinition'
                prompt_template:
                    $ref: '#/components/schemas/PromptTemplate'
            description: A polymorphic tool - can be an HTTP tool, function tool, prompt template, or external MCP proxy
        ToolAnnotations:
            type: object
            properties:
                destructive_hint:
                    type: boolean
                    description: If true, the tool may perform destructive updates (only meaningful when read_only_hint is false)
                idempotent_hint:
                    type: boolean
                    description: If true, repeated calls with same arguments have no additional effect (only meaningful when read_only_hint is false)
                open_world_hint:
                    type: boolean
                    description: If true, the tool interacts with external entities beyond its local environment
                read_only_hint:
                    type: boolean
                    description: If true, the tool does not modify its environment
                title:
                    type: string
                    description: Human-readable display name for the tool
            description: Tool annotations providing behavioral hints about the tool
        ToolCallSummary:
            type: object
            properties:
                event_source:
                    type: string
                    description: Event source (from attributes.gram.event.source)
                gram_urn:
                    type: string
                    description: Gram URN associated with this tool call
                http_status_code:
                    type: integer
                    description: HTTP status code (if applicable)
                    format: int32
                log_count:
                    type: integer
                    description: Total number of logs in this tool call
                    format: int64
                start_time_unix_nano:
                    type: string
                    description: Earliest log timestamp in Unix nanoseconds (string for JS int64 precision)
                tool_name:
                    type: string
                    description: Tool name (from attributes.gram.tool.name)
                tool_source:
                    type: string
                    description: Tool call source (from attributes.gram.tool_call.source)
                trace_id:
                    type: string
                    description: Trace ID (32 hex characters)
                    pattern: ^[a-f0-9]{32}$
            description: Summary information for a tool call
            required:
                - trace_id
                - start_time_unix_nano
                - log_count
                - gram_urn
        ToolEntry:
            type: object
            properties:
                annotations:
                    $ref: '#/components/schemas/ToolAnnotations'
                http_method:
                    type: string
                    description: HTTP method for HTTP tools (GET, POST, PUT, PATCH, DELETE)
                id:
                    type: string
                    description: The ID of the tool
                name:
                    type: string
                    description: The name of the tool
                tool_urn:
                    type: string
                    description: The URN of the tool
                type:
                    type: string
                    description: The type of tool
                    enum:
                        - http
                        - prompt
                        - function
                        - platform
                        - externalmcp
            required:
                - type
                - id
                - name
                - tool_urn
        ToolFilterScope:
            type: object
            properties:
                tag:
                    type: string
                    description: The filter tag
                tool_count:
                    type: integer
                    description: The number of tools under this scope
                    format: int64
                tools:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolFilterTool'
                    description: The tools under this scope
            description: A filter tag ("scope") and the tools reachable when filtering by it via the runtime ?tags= parameter.
            required:
                - tag
                - tool_count
                - tools
        ToolFilterTool:
            type: object
            properties:
                name:
                    type: string
                    description: The display name of the tool, with any variation rename from the resolved group applied (matching the runtime wire)
                tool_urn:
                    type: string
                    description: The URN of the tool
            description: A tool referenced by a tool filter scope, identified by URN and display name.
            required:
                - tool_urn
                - name
        ToolMetadata:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the tool metadata entry was created
                    format: date-time
                deleted_at:
                    type: string
                    description: When the tool metadata entry was deleted. Only present on deleted entries returned by listToolMetadata with include_deleted.
                    format: date-time
                destructive_hint:
                    type: boolean
                    description: Hint that the tool may perform destructive updates to its environment
                idempotent_hint:
                    type: boolean
                    description: Hint that calling the tool repeatedly with the same arguments has no additional effect
                mcp_server_id:
                    type: string
                    description: The ID of the MCP server the tool metadata belongs to
                    format: uuid
                open_world_hint:
                    type: boolean
                    description: Hint that the tool may interact with an open world of external entities
                read_only_hint:
                    type: boolean
                    description: Hint that the tool does not modify its environment
                title:
                    type: string
                    description: A human-readable title for the tool
                tool_name:
                    type: string
                    description: The name of the tool
                updated_at:
                    type: string
                    description: When the tool metadata entry was last updated
                    format: date-time
            description: Stored metadata about a tool exposed by an MCP server. The annotation hints mirror MCP tool annotations and drive annotation-aware authorization.
            required:
                - mcp_server_id
                - tool_name
                - created_at
                - updated_at
        ToolMetadataForm:
            type: object
            properties:
                destructive_hint:
                    type: boolean
                    description: Hint that the tool may perform destructive updates to its environment
                idempotent_hint:
                    type: boolean
                    description: Hint that calling the tool repeatedly with the same arguments has no additional effect
                open_world_hint:
                    type: boolean
                    description: Hint that the tool may interact with an open world of external entities
                read_only_hint:
                    type: boolean
                    description: Hint that the tool does not modify its environment
                title:
                    type: string
                    description: A human-readable title for the tool
                tool_name:
                    type: string
                    description: The name of the tool
            description: A single tool entry in a tool metadata batch.
            required:
                - tool_name
        ToolMetric:
            type: object
            properties:
                avg_latency_ms:
                    type: number
                    description: Average latency in milliseconds
                    format: double
                call_count:
                    type: integer
                    description: Total number of calls
                    format: int64
                failure_count:
                    type: integer
                    description: Number of failed calls
                    format: int64
                failure_rate:
                    type: number
                    description: Failure rate (0.0 to 1.0)
                    format: double
                gram_urn:
                    type: string
                    description: Tool URN
                success_count:
                    type: integer
                    description: Number of successful calls
                    format: int64
            description: Aggregated metrics for a single tool
            required:
                - gram_urn
                - call_count
                - success_count
                - failure_count
                - avg_latency_ms
                - failure_rate
        ToolUsage:
            type: object
            properties:
                count:
                    type: integer
                    description: Total call count
                    format: int64
                failure_count:
                    type: integer
                    description: Failed calls (4xx/5xx status)
                    format: int64
                success_count:
                    type: integer
                    description: Successful calls (2xx status)
                    format: int64
                urn:
                    type: string
                    description: Tool URN
            description: Tool usage statistics
            required:
                - urn
                - count
                - success_count
                - failure_count
        ToolUsageHostedServerFilterOption:
            type: object
            properties:
                event_count:
                    type: integer
                    description: Number of tool usage events observed for the hosted MCP server
                    format: int64
                toolset_name:
                    type: string
                    description: Hosted MCP toolset display name
                toolset_slug:
                    type: string
                    description: Hosted MCP toolset slug
            description: Hosted MCP server filter option with usage in the selected time window
            required:
                - toolset_slug
                - toolset_name
                - event_count
        ToolUsageShadowServerFilterOption:
            type: object
            properties:
                event_count:
                    type: integer
                    description: Number of tool usage events observed for the Shadow MCP server
                    format: int64
                server_name:
                    type: string
                    description: Observed Shadow MCP server name
            description: Shadow MCP server filter option with usage in the selected time window
            required:
                - server_name
                - event_count
        ToolUsageTargetSummary:
            type: object
            properties:
                event_count:
                    type: integer
                    description: Total number of tool usage events for the target
                    format: int64
                failure_count:
                    type: integer
                    description: Number of failed tool usage events for the target
                    format: int64
                failure_rate:
                    type: number
                    description: Fraction of completed tool usage events for the target that failed
                    format: double
                success_count:
                    type: integer
                    description: Number of successful tool usage events for the target
                    format: int64
                target_id:
                    type: string
                    description: Stable target identifier used by filters and chart grouping
                target_kind:
                    type: string
                    description: Tool usage aggregation target kind
                    enum:
                        - server
                        - local_tools
                        - skill
                target_label:
                    type: string
                    description: User-facing label for the target
                target_type:
                    type: string
                    description: Tool usage target type
                    enum:
                        - hosted_mcp_server
                        - tunneled_mcp_server
                        - shadow_mcp_server
                        - local_tool
                        - skill
                unique_tools:
                    type: integer
                    description: Number of distinct tools observed for the target
                    format: int64
            description: Aggregated tool usage metrics for one target
            required:
                - target_type
                - target_kind
                - target_id
                - target_label
                - event_count
                - unique_tools
                - success_count
                - failure_count
                - failure_rate
        ToolUsageTargetTimeSeriesPoint:
            type: object
            properties:
                bucket_start_ns:
                    type: string
                    description: Bucket start time in Unix nanoseconds as a string for JavaScript integer safety
                event_count:
                    type: integer
                    description: Number of tool usage events in the bucket
                    format: int64
                failure_count:
                    type: integer
                    description: Number of failed tool usage events in the bucket
                    format: int64
                target_id:
                    type: string
                    description: Stable target identifier used by filters and chart grouping
                target_kind:
                    type: string
                    description: Tool usage aggregation target kind
                    enum:
                        - server
                        - local_tools
                        - skill
                target_label:
                    type: string
                    description: User-facing label for the target
                target_type:
                    type: string
                    description: Tool usage target type
                    enum:
                        - hosted_mcp_server
                        - tunneled_mcp_server
                        - shadow_mcp_server
                        - local_tool
                        - skill
            description: A time-series bucket for one tool usage target
            required:
                - bucket_start_ns
                - target_type
                - target_kind
                - target_id
                - target_label
                - event_count
                - failure_count
        ToolUsageTargetToolBreakdownRow:
            type: object
            properties:
                event_count:
                    type: integer
                    description: Total number of tool usage events for the target and tool
                    format: int64
                failure_count:
                    type: integer
                    description: Number of failed tool usage events for the target and tool
                    format: int64
                failure_rate:
                    type: number
                    description: Fraction of completed tool usage events for the target and tool that failed
                    format: double
                success_count:
                    type: integer
                    description: Number of successful tool usage events for the target and tool
                    format: int64
                target_id:
                    type: string
                    description: Stable target identifier used by filters and chart grouping
                target_kind:
                    type: string
                    description: Tool usage aggregation target kind
                    enum:
                        - server
                        - local_tools
                        - skill
                target_label:
                    type: string
                    description: User-facing label for the target
                target_type:
                    type: string
                    description: Tool usage target type
                    enum:
                        - hosted_mcp_server
                        - tunneled_mcp_server
                        - shadow_mcp_server
                        - local_tool
                        - skill
                tool_name:
                    type: string
                    description: Observed tool name
            description: Aggregated tool usage metrics for one target and tool
            required:
                - target_type
                - target_kind
                - target_id
                - target_label
                - tool_name
                - event_count
                - success_count
                - failure_count
                - failure_rate
        ToolUsageTotals:
            type: object
            properties:
                event_count:
                    type: integer
                    description: Total number of tool usage events
                    format: int64
                failure_count:
                    type: integer
                    description: Number of failed tool usage events
                    format: int64
                failure_rate:
                    type: number
                    description: Fraction of completed tool usage events that failed
                    format: double
                success_count:
                    type: integer
                    description: Number of successful tool usage events
                    format: int64
                unique_targets:
                    type: integer
                    description: Number of distinct usage targets observed
                    format: int64
                unique_tools:
                    type: integer
                    description: Number of distinct tools observed
                    format: int64
                unique_users:
                    type: integer
                    description: Number of distinct user identities observed
                    format: int64
            description: Target-aware MCP and tool usage totals
            required:
                - event_count
                - success_count
                - failure_count
                - failure_rate
                - unique_tools
                - unique_users
                - unique_targets
        ToolUsageTraceLogGroup:
            type: object
            properties:
                kind:
                    type: string
                    description: Child-log lookup strategy for a tool usage trace row
                    enum:
                        - trace_id
                        - correlation_id
                        - trigger_event_id
                        - log_id
                value:
                    type: string
                    description: Lookup value
            description: Descriptor used by the dashboard to fetch child logs for a trace row
            required:
                - kind
                - value
        ToolUsageTraceSummary:
            type: object
            properties:
                account_type:
                    type: string
                    description: AI account classification ('team' or 'personal'); empty/absent when unclassified
                block_reason:
                    type: string
                    description: Hook block reason when hook_status is blocked
                event_source:
                    type: string
                    description: Telemetry event source
                gram_urn:
                    type: string
                    description: Gram URN associated with the trace
                hook_source:
                    type: string
                    description: Hook plugin source when the row came from hook telemetry
                hook_status:
                    type: string
                    description: Hook execution status when the row came from hook telemetry
                    enum:
                        - success
                        - failure
                        - blocked
                        - pending
                http_status_code:
                    type: integer
                    description: HTTP status code when available
                    format: int32
                id:
                    type: string
                    description: Stable row identity for React keys and expansion state
                log_count:
                    type: integer
                    description: Number of logs in the trace
                    format: int64
                log_group:
                    $ref: '#/components/schemas/ToolUsageTraceLogGroup'
                start_time_unix_nano:
                    type: string
                    description: Earliest log timestamp in Unix nanoseconds as a string for JavaScript integer safety
                target_id:
                    type: string
                    description: Stable target identifier used by filters
                target_kind:
                    type: string
                    description: Tool usage aggregation target kind
                    enum:
                        - server
                        - local_tools
                        - skill
                target_label:
                    type: string
                    description: User-facing target label
                target_type:
                    type: string
                    description: Tool usage target type
                    enum:
                        - hosted_mcp_server
                        - tunneled_mcp_server
                        - shadow_mcp_server
                        - local_tool
                        - skill
                tool_name:
                    type: string
                    description: Tool name shown in the row
                trace_id:
                    type: string
                    description: Real OTel trace ID when the grouped logs have one
                user_key:
                    type: string
                    description: Stable user identity value
                user_kind:
                    type: string
                    description: Tool usage user identity kind
                    enum:
                        - email
                        - external_user_id
                        - user_id
                        - unknown
                user_label:
                    type: string
                    description: User-facing user identity label
            description: A single target-aware tool usage trace row
            required:
                - id
                - log_group
                - start_time_unix_nano
                - log_count
                - gram_urn
                - tool_name
                - target_type
                - target_kind
                - target_id
                - target_label
                - user_key
                - user_label
                - user_kind
                - event_source
        ToolUsageUserFilter:
            type: object
            properties:
                key:
                    type: string
                    description: User identity value to include
                kind:
                    type: string
                    description: Tool usage user identity kind
                    enum:
                        - email
                        - external_user_id
                        - user_id
                        - unknown
            description: Typed user identity filter
            required:
                - kind
                - key
        ToolUsageUserFilterOption:
            type: object
            properties:
                event_count:
                    type: integer
                    description: Number of tool usage events observed for the user identity
                    format: int64
                user_key:
                    type: string
                    description: Stable user identity value used by filters
                user_kind:
                    type: string
                    description: Tool usage user identity kind
                    enum:
                        - email
                        - external_user_id
                        - user_id
                        - unknown
                user_label:
                    type: string
                    description: User-facing label for the user identity
            description: Tool usage user filter option with usage in the selected time window
            required:
                - user_key
                - user_label
                - user_kind
                - event_count
        ToolUsageUserSummary:
            type: object
            properties:
                event_count:
                    type: integer
                    description: Total number of tool usage events for the user identity
                    format: int64
                failure_count:
                    type: integer
                    description: Number of failed tool usage events for the user identity
                    format: int64
                failure_rate:
                    type: number
                    description: Fraction of completed tool usage events for the user identity that failed
                    format: double
                success_count:
                    type: integer
                    description: Number of successful tool usage events for the user identity
                    format: int64
                unique_tools:
                    type: integer
                    description: Number of distinct tools observed for the user identity
                    format: int64
                user_key:
                    type: string
                    description: Stable user identity value used by filters and chart grouping
                user_kind:
                    type: string
                    description: Tool usage user identity kind
                    enum:
                        - email
                        - external_user_id
                        - user_id
                        - unknown
                user_label:
                    type: string
                    description: User-facing label for the user identity
            description: Aggregated tool usage metrics for one user identity
            required:
                - user_key
                - user_label
                - user_kind
                - event_count
                - unique_tools
                - success_count
                - failure_count
                - failure_rate
        ToolUsageUserTimeSeriesPoint:
            type: object
            properties:
                bucket_start_ns:
                    type: string
                    description: Bucket start time in Unix nanoseconds as a string for JavaScript integer safety
                event_count:
                    type: integer
                    description: Number of tool usage events in the bucket
                    format: int64
                failure_count:
                    type: integer
                    description: Number of failed tool usage events in the bucket
                    format: int64
                user_key:
                    type: string
                    description: Stable user identity value used by filters and chart grouping
                user_kind:
                    type: string
                    description: Tool usage user identity kind
                    enum:
                        - email
                        - external_user_id
                        - user_id
                        - unknown
                user_label:
                    type: string
                    description: User-facing label for the user identity
            description: A time-series bucket for one tool usage user identity
            required:
                - bucket_start_ns
                - user_key
                - user_label
                - user_kind
                - event_count
                - failure_count
        ToolUsageUsersByTargetRow:
            type: object
            properties:
                event_count:
                    type: integer
                    description: Total number of tool usage events for the target and user identity
                    format: int64
                failure_count:
                    type: integer
                    description: Number of failed tool usage events for the target and user identity
                    format: int64
                target_id:
                    type: string
                    description: Stable target identifier used by filters and chart grouping
                target_kind:
                    type: string
                    description: Tool usage aggregation target kind
                    enum:
                        - server
                        - local_tools
                        - skill
                target_label:
                    type: string
                    description: User-facing label for the target
                target_type:
                    type: string
                    description: Tool usage target type
                    enum:
                        - hosted_mcp_server
                        - tunneled_mcp_server
                        - shadow_mcp_server
                        - local_tool
                        - skill
                user_key:
                    type: string
                    description: Stable user identity value used by filters and chart grouping
                user_kind:
                    type: string
                    description: Tool usage user identity kind
                    enum:
                        - email
                        - external_user_id
                        - user_id
                        - unknown
                user_label:
                    type: string
                    description: User-facing label for the user identity
            description: Aggregated tool usage metrics for one target and user identity
            required:
                - target_type
                - target_kind
                - target_id
                - target_label
                - user_key
                - user_label
                - user_kind
                - event_count
                - failure_count
        ToolVariation:
            type: object
            properties:
                confirm:
                    type: string
                    description: The confirmation mode for the tool variation
                confirm_prompt:
                    type: string
                    description: The confirmation prompt for the tool variation
                created_at:
                    type: string
                    description: The creation date of the tool variation
                description:
                    type: string
                    description: The description of the tool variation
                destructive_hint:
                    type: boolean
                    description: 'Override: if true, the tool may perform destructive updates'
                group_id:
                    type: string
                    description: The ID of the tool variation group
                id:
                    type: string
                    description: The ID of the tool variation
                idempotent_hint:
                    type: boolean
                    description: 'Override: if true, repeated calls have no additional effect'
                name:
                    type: string
                    description: The name of the tool variation
                open_world_hint:
                    type: boolean
                    description: 'Override: if true, the tool interacts with external entities'
                read_only_hint:
                    type: boolean
                    description: 'Override: if true, the tool does not modify its environment'
                src_tool_name:
                    type: string
                    description: The name of the source tool
                src_tool_urn:
                    type: string
                    description: The URN of the source tool
                summarizer:
                    type: string
                    description: The summarizer of the tool variation
                tags:
                    type: array
                    items:
                        type: string
                    description: The tags of the tool variation
                title:
                    type: string
                    description: Display name override for the tool
                updated_at:
                    type: string
                    description: The last update date of the tool variation
            required:
                - id
                - group_id
                - src_tool_name
                - src_tool_urn
                - created_at
                - updated_at
        ToolVariationGroup:
            type: object
            properties:
                created_at:
                    type: string
                    description: The creation date of the tool variation group
                description:
                    type: string
                    description: The description of the tool variation group
                id:
                    type: string
                    description: The ID of the tool variation group
                name:
                    type: string
                    description: The name of the tool variation group
                updated_at:
                    type: string
                    description: The last update date of the tool variation group
            required:
                - id
                - name
                - created_at
                - updated_at
        ToolVariationGroupResult:
            type: object
            properties:
                group:
                    $ref: '#/components/schemas/ToolVariationGroup'
            required:
                - group
        Toolset:
            type: object
            properties:
                account_type:
                    type: string
                    description: The account type of the organization
                created_at:
                    type: string
                    description: When the toolset was created.
                    format: date-time
                custom_domain_id:
                    type: string
                    description: The ID of the custom domain to use for the toolset
                default_environment_slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                description:
                    type: string
                    description: Description of the toolset
                external_mcp_header_definitions:
                    type: array
                    items:
                        $ref: '#/components/schemas/ExternalMCPHeaderDefinition'
                    description: The external MCP header definitions that are relevant to the toolset
                external_oauth_server:
                    $ref: '#/components/schemas/ExternalOAuthServer'
                function_environment_variables:
                    type: array
                    items:
                        $ref: '#/components/schemas/FunctionEnvironmentVariable'
                    description: The function environment variables that are relevant to the toolset
                id:
                    type: string
                    description: The ID of the toolset
                mcp_enabled:
                    type: boolean
                    description: Whether the toolset is enabled for MCP
                mcp_is_public:
                    type: boolean
                    description: Whether the toolset is public in MCP
                mcp_slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                name:
                    type: string
                    description: The name of the toolset
                oauth_enablement_metadata:
                    $ref: '#/components/schemas/OAuthEnablementMetadata'
                organization_id:
                    type: string
                    description: The organization ID this toolset belongs to
                origin:
                    $ref: '#/components/schemas/ToolsetOrigin'
                project_id:
                    type: string
                    description: The project ID this toolset belongs to
                prompt_templates:
                    type: array
                    items:
                        $ref: '#/components/schemas/PromptTemplate'
                    description: 'The prompt templates in this toolset -- Note: these are actual prompts, as in MCP prompts'
                resource_urns:
                    type: array
                    items:
                        type: string
                    description: The resource URNs in this toolset
                resources:
                    type: array
                    items:
                        $ref: '#/components/schemas/Resource'
                    description: The resources in this toolset
                security_variables:
                    type: array
                    items:
                        $ref: '#/components/schemas/SecurityVariable'
                    description: The security variables that are relevant to the toolset
                server_variables:
                    type: array
                    items:
                        $ref: '#/components/schemas/ServerVariable'
                    description: The server variables that are relevant to the toolset
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                tool_selection_mode:
                    type: string
                    description: The mode to use for tool selection
                tool_urns:
                    type: array
                    items:
                        type: string
                    description: The tool URNs in this toolset
                tool_variations_group_id:
                    type: string
                    description: The id of the tool variations group enabling MCP tool filtering for this toolset. Set via toolsets.setToolVariationsGroup; null when filtering is disabled.
                tools:
                    type: array
                    items:
                        $ref: '#/components/schemas/Tool'
                    description: The tools in this toolset
                toolset_version:
                    type: integer
                    description: The version of the toolset (will be 0 if none exists)
                    format: int64
                updated_at:
                    type: string
                    description: When the toolset was last updated.
                    format: date-time
                user_session_issuer_id:
                    type: string
                    description: The id of the user_session_issuer wired to this toolset. Set via toolsets.setUserSessionIssuer; null when no USI is linked.
                user_session_issuer_slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            required:
                - id
                - project_id
                - organization_id
                - account_type
                - name
                - slug
                - tools
                - tool_selection_mode
                - toolset_version
                - prompt_templates
                - tool_urns
                - resources
                - resource_urns
                - oauth_enablement_metadata
                - created_at
                - updated_at
        ToolsetEntry:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the toolset was created.
                    format: date-time
                custom_domain_id:
                    type: string
                    description: The ID of the custom domain to use for the toolset
                default_environment_slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                description:
                    type: string
                    description: Description of the toolset
                external_mcp_header_definitions:
                    type: array
                    items:
                        $ref: '#/components/schemas/ExternalMCPHeaderDefinition'
                    description: The external MCP header definitions that are relevant to the toolset
                function_environment_variables:
                    type: array
                    items:
                        $ref: '#/components/schemas/FunctionEnvironmentVariable'
                    description: The function environment variables that are relevant to the toolset
                id:
                    type: string
                    description: The ID of the toolset
                mcp_enabled:
                    type: boolean
                    description: Whether the toolset is enabled for MCP
                mcp_is_public:
                    type: boolean
                    description: Whether the toolset is public in MCP
                mcp_slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                name:
                    type: string
                    description: The name of the toolset
                organization_id:
                    type: string
                    description: The organization ID this toolset belongs to
                origin:
                    $ref: '#/components/schemas/ToolsetOrigin'
                project_id:
                    type: string
                    description: The project ID this toolset belongs to
                prompt_templates:
                    type: array
                    items:
                        $ref: '#/components/schemas/PromptTemplateEntry'
                    description: 'The prompt templates in this toolset -- Note: these are actual prompts, as in MCP prompts'
                resource_urns:
                    type: array
                    items:
                        type: string
                    description: The resource URNs in this toolset
                resources:
                    type: array
                    items:
                        $ref: '#/components/schemas/ResourceEntry'
                    description: The resources in this toolset
                security_variables:
                    type: array
                    items:
                        $ref: '#/components/schemas/SecurityVariable'
                    description: The security variables that are relevant to the toolset
                server_variables:
                    type: array
                    items:
                        $ref: '#/components/schemas/ServerVariable'
                    description: The server variables that are relevant to the toolset
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                tool_selection_mode:
                    type: string
                    description: The mode to use for tool selection
                tool_urns:
                    type: array
                    items:
                        type: string
                    description: The tool URNs in this toolset
                tools:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolEntry'
                    description: The tools in this toolset
                updated_at:
                    type: string
                    description: When the toolset was last updated.
                    format: date-time
            required:
                - id
                - project_id
                - organization_id
                - name
                - slug
                - tools
                - tool_selection_mode
                - prompt_templates
                - tool_urns
                - resources
                - resource_urns
                - created_at
                - updated_at
        ToolsetEnvironmentLink:
            type: object
            properties:
                environment_id:
                    type: string
                    description: The ID of the environment
                    format: uuid
                id:
                    type: string
                    description: The ID of the toolset environment link
                    format: uuid
                toolset_id:
                    type: string
                    description: The ID of the toolset
                    format: uuid
            description: A link between a toolset and an environment
            required:
                - id
                - toolset_id
                - environment_id
        ToolsetOrigin:
            type: object
            properties:
                registry_specifier:
                    type: string
                    description: The globally unique registry specifier this toolset originated from
            required:
                - registry_specifier
        ToolsetSummary:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the toolset was created.
                    format: date-time
                default_environment_slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                id:
                    type: string
                    description: The ID of the toolset
                mcp_enabled:
                    type: boolean
                    description: Whether the toolset is enabled for MCP
                mcp_is_public:
                    type: boolean
                    description: Whether the toolset is public in MCP
                mcp_slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                name:
                    type: string
                    description: The name of the toolset
                organization_id:
                    type: string
                    description: The organization ID this toolset belongs to
                project_id:
                    type: string
                    description: The project ID this toolset belongs to
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                tool_selection_mode:
                    type: string
                    description: The mode to use for tool selection
                tools:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolEntry'
                    description: The tools in this toolset
                updated_at:
                    type: string
                    description: When the toolset was last updated.
                    format: date-time
            description: A lightweight summary of a toolset, containing only the fields needed for org-level listing (e.g. RBAC UI).
            required:
                - id
                - project_id
                - organization_id
                - name
                - slug
                - tool_selection_mode
                - tools
                - created_at
                - updated_at
        TopServer:
            type: object
            properties:
                server_name:
                    type: string
                    description: MCP server name
                tool_call_count:
                    type: integer
                    description: Total number of tool calls
                    format: int64
            description: Top MCP server by tool call count
            required:
                - server_name
                - tool_call_count
        TopUser:
            type: object
            properties:
                activity_count:
                    type: integer
                    description: Number of messages (session mode) or tool calls (tool_call mode)
                    format: int64
                user_id:
                    type: string
                    description: User ID (internal or external depending on availability)
                user_type:
                    type: string
                    description: Type of user ID
                    enum:
                        - internal
                        - external
            description: Top user by activity
            required:
                - user_id
                - user_type
                - activity_count
        Trial:
            type: object
            properties:
                ends_at:
                    type: string
                    format: date-time
                started_at:
                    type: string
                    format: date-time
            required:
                - started_at
                - ends_at
        TriggerAnalysisResponseBody:
            type: object
            properties:
                projects_signaled:
                    type: integer
                    description: Number of projects whose analysis coordinator was woken.
                    format: int64
            description: How far the trigger reached.
            required:
                - projects_signaled
        TriggerDefinition:
            type: object
            properties:
                config_schema:
                    type: string
                    description: JSON schema describing the trigger config.
                    format: json
                description:
                    type: string
                    description: Description of the trigger definition.
                env_requirements:
                    type: array
                    items:
                        $ref: '#/components/schemas/TriggerEnvRequirement'
                    description: Environment variables required by this trigger definition.
                kind:
                    type: string
                    description: The ingress kind for the trigger definition.
                    enum:
                        - webhook
                        - schedule
                slug:
                    type: string
                    description: The trigger definition slug.
                title:
                    type: string
                    description: The trigger definition title.
            required:
                - slug
                - title
                - description
                - kind
                - config_schema
                - env_requirements
        TriggerEnvRequirement:
            type: object
            properties:
                description:
                    type: string
                    description: Description of the variable.
                name:
                    type: string
                    description: The environment variable name.
                required:
                    type: boolean
                    description: Whether the variable is required.
            required:
                - name
                - required
        TriggerEvent:
            type: object
            properties:
                attempts:
                    type: integer
                    description: Number of processing attempts.
                    format: int64
                chat_id:
                    type: string
                    description: The conversation the event was routed to.
                    format: uuid
                created_at:
                    type: string
                    description: Creation timestamp.
                    format: date-time
                id:
                    type: string
                    description: The trigger event ID.
                    format: uuid
                last_error:
                    type: string
                    description: The last processing error, if any.
                processed_at:
                    type: string
                    description: Processing completion timestamp.
                    format: date-time
                status:
                    type: string
                    description: The processing status of the event.
                    enum:
                        - pending
                        - processing
                        - completed
                        - failed
                trigger_instance_id:
                    type: string
                    description: The trigger instance that dispatched the event.
                    format: uuid
            required:
                - id
                - trigger_instance_id
                - status
                - attempts
                - created_at
        TriggerInstance:
            type: object
            properties:
                config:
                    type: object
                    description: The trigger config payload.
                    additionalProperties: true
                created_at:
                    type: string
                    description: Creation timestamp.
                    format: date-time
                definition_slug:
                    type: string
                    description: The trigger definition slug.
                environment_id:
                    type: string
                    description: The linked environment ID.
                    format: uuid
                id:
                    type: string
                    description: The trigger instance ID.
                    format: uuid
                name:
                    type: string
                    description: The trigger instance name.
                project_id:
                    type: string
                    description: The project ID owning the trigger instance.
                    format: uuid
                status:
                    type: string
                    description: The trigger instance status.
                    enum:
                        - active
                        - paused
                        - fired
                        - cancelled
                target_display:
                    type: string
                    description: The user-facing target display value.
                target_kind:
                    type: string
                    description: The target kind for the trigger instance.
                target_ref:
                    type: string
                    description: The opaque target reference.
                updated_at:
                    type: string
                    description: Last update timestamp.
                    format: date-time
                webhook_url:
                    type: string
                    description: Webhook URL for webhook-backed triggers.
            required:
                - id
                - project_id
                - definition_slug
                - name
                - target_kind
                - target_ref
                - target_display
                - config
                - status
                - created_at
                - updated_at
        TriggerRiskAnalysisRequestBody:
            type: object
            properties:
                id:
                    type: string
                    description: The policy ID.
                    format: uuid
                limit:
                    type: integer
                    description: Cap the backfill at the most recent N unanalyzed messages. Defaults to 100 (the recent-N drain budget). Pass 0 to request a full backfill of every unanalyzed message.
                    default: 100
                    format: int32
                    minimum: 0
            required:
                - id
        TriggerSkillSuggestionRequestBody:
            type: object
            properties:
                id:
                    type: string
                    description: The skill ID.
                    format: uuid
            required:
                - id
        TumDetailsBreakdown:
            type: object
            properties:
                key:
                    type: string
                    description: The breakdown dimension key (model, hook_source, provider, account_type, email, division_name, department_name, role, project_id) — the public telemetry dimension identifiers, so the same keys work as telemetry.query filters. project_id rows carry project UUIDs; clients map them to names.
                rows:
                    type: array
                    items:
                        $ref: '#/components/schemas/TumDetailsBreakdownRow'
                    description: Top values by tokens in descending order, with the remainder rolled into 'Other'
            description: Per-dimension billed token breakdown for the usage details table
            required:
                - key
                - rows
        TumDetailsBreakdownRow:
            type: object
            properties:
                series:
                    type: array
                    items:
                        type: integer
                        format: int64
                    description: Daily tokens aligned to the result's points buckets
                total_tokens:
                    type: integer
                    description: Billed tokens for this value over the range
                    format: int64
                value:
                    type: string
                    description: The dimension value; empty for rows recorded before the dimension existed
            description: One value of a breakdown dimension with its billed token usage over the range
            required:
                - value
                - total_tokens
                - series
        TumDetailsPoint:
            type: object
            properties:
                bucket_time_unix_nano:
                    type: string
                    description: Bucket start time in Unix nanoseconds (string for JS precision)
                cache_creation_tokens:
                    type: integer
                    description: Observed cache-write tokens — prompt content entering the provider cache, counted once
                    format: int64
                input_tokens:
                    type: integer
                    description: Observed input tokens (cache reads excluded)
                    format: int64
                output_tokens:
                    type: integer
                    description: Observed output tokens
                    format: int64
                total_tokens:
                    type: integer
                    description: 'Tokens under management: input + output + cache writes'
                    format: int64
            description: One UTC day of billing usage details
            required:
                - input_tokens
                - output_tokens
                - cache_creation_tokens
                - total_tokens
                - bucket_time_unix_nano
        TumDetailsResult:
            type: object
            properties:
                breakdowns:
                    type: array
                    items:
                        $ref: '#/components/schemas/TumDetailsBreakdown'
                    description: Billed token usage per breakdown dimension
                interval_seconds:
                    type: integer
                    description: Timeseries bucket width in seconds. Always 86400 — the details are bucketed daily.
                    format: int64
                points:
                    type: array
                    items:
                        $ref: '#/components/schemas/TumDetailsPoint'
                    description: Gap-filled daily buckets in ascending time order
                totals:
                    $ref: '#/components/schemas/TumDetailsTotals'
            description: Result of the billing usage details query. Everything derives from the tokens-under-management population — observed agent traffic with cache reads excluded — computed live from the telemetry aggregate. Matches the billed totals for cycles billed under this definition; cycles finalized before the observed-traffic redefinition serve immutable snapshot totals on the usage endpoint that can differ from this live compute.
            required:
                - interval_seconds
                - points
                - totals
                - breakdowns
        TumDetailsTotals:
            type: object
            properties:
                cache_creation_tokens:
                    type: integer
                    description: Observed cache-write tokens — prompt content entering the provider cache, counted once
                    format: int64
                input_tokens:
                    type: integer
                    description: Observed input tokens (cache reads excluded)
                    format: int64
                output_tokens:
                    type: integer
                    description: Observed output tokens
                    format: int64
                total_tokens:
                    type: integer
                    description: 'Tokens under management: input + output + cache writes'
                    format: int64
            description: Whole-range totals for the billing usage details
            required:
                - input_tokens
                - output_tokens
                - cache_creation_tokens
                - total_tokens
        TunneledMcpConnection:
            type: object
            properties:
                active_consumer_sessions:
                    type: integer
                    description: Number of MCP consumer sessions currently pinned to this tunnel connection
                    format: int64
                active_substreams:
                    type: integer
                    description: Number of active request substreams on this tunnel session
                    format: int64
                agent_version:
                    type: string
                    description: Tunnel agent version reported by the connection
                connected_at:
                    type: string
                    description: When this tunnel session connected
                    format: date-time
                gateway_session_id:
                    type: string
                    description: Gateway session ID for a live tunnel connection
                last_heartbeat_at:
                    type: string
                    description: Most recent heartbeat observed for this tunnel session
                    format: date-time
                metadata:
                    type: object
                    description: User-provided tunnel metadata reported by the agent
                    additionalProperties:
                        type: string
                remote_addr:
                    type: string
                    description: Remote address reported by the gateway
                service_version:
                    type: string
                    description: Customer-declared version of the MCP service behind this tunnel connection
            required:
                - gateway_session_id
                - service_version
                - connected_at
                - last_heartbeat_at
                - active_substreams
                - active_consumer_sessions
                - metadata
        TunneledMcpServer:
            type: object
            properties:
                active_connection_count:
                    type: integer
                    description: Number of active tunnel connections currently visible in Redis
                    format: int64
                active_consumer_session_count:
                    type: integer
                    description: Total MCP consumer sessions currently pinned across active tunnel connections
                    format: int64
                agent_version:
                    type: string
                    description: Most recent agent version reported by the tunnel
                allow_public:
                    type: boolean
                    description: Whether the owner has consented to serving this source through a public, anonymous MCP endpoint
                connection_status:
                    type: string
                    description: Derived live connection status for a tunneled MCP server source
                    enum:
                        - connected
                        - inactive
                        - never_connected
                created_at:
                    type: string
                    description: When the tunneled MCP server source was created
                    format: date-time
                id:
                    type: string
                    description: The ID of the tunneled MCP server
                    format: uuid
                key_prefix:
                    type: string
                    description: Non-secret prefix of the tunnel key
                last_seen_at:
                    type: string
                    description: Most recent persisted heartbeat timestamp
                    format: date-time
                name:
                    type: string
                    description: Human-readable name for the tunneled MCP server
                project_id:
                    type: string
                    description: The project ID this tunneled MCP server belongs to
                    format: uuid
                status:
                    type: string
                    description: Stored lifecycle status for a tunneled MCP server source
                    enum:
                        - created
                        - active
                        - revoked
                updated_at:
                    type: string
                    description: When the tunneled MCP server source was last updated
                    format: date-time
            description: A customer-hosted MCP server connected through a tunnel
            required:
                - id
                - project_id
                - name
                - key_prefix
                - status
                - connection_status
                - allow_public
                - active_connection_count
                - active_consumer_session_count
                - created_at
                - updated_at
        TunneledMcpServerConnections:
            type: object
            properties:
                active_connection_count:
                    type: integer
                    description: Number of active tunnel connections currently visible in Redis
                    format: int64
                active_consumer_session_count:
                    type: integer
                    description: Total MCP consumer sessions currently pinned across active tunnel connections
                    format: int64
                connections:
                    type: array
                    items:
                        $ref: '#/components/schemas/TunneledMcpConnection'
                    description: Live tunnel connections currently visible in Redis
            description: Live connection details for a tunneled MCP server
            required:
                - connections
                - active_connection_count
                - active_consumer_session_count
        UndistributeSkillRequestBody:
            type: object
            properties:
                assistant_id:
                    type: string
                    description: The assistant the skill was distributed to.
                    format: uuid
                id:
                    type: string
                    description: The skill ID.
                    format: uuid
                plugin_id:
                    type: string
                    description: The plugin the skill was distributed to.
                    format: uuid
            example:
                id: 550e8400-e29b-41d4-a716-446655440000
                plugin_id: 550e8400-e29b-41d4-a716-446655440001
            required:
                - id
        UnknownSkillActivation:
            type: object
            properties:
                id:
                    type: string
                    description: The activation observation ID.
                    format: uuid
                provider:
                    type: string
                    description: The agent provider that reported the activation.
                reason:
                    type: string
                    description: Why exact version attribution failed.
                    enum:
                        - invalid_name
                        - unresolved_hash
                        - ambiguous_hash
                seen_at:
                    type: string
                    description: When the activation occurred.
                    format: date-time
                skill_name:
                    type: string
                    description: The skill name reported by the agent.
                source:
                    type: string
                    description: The optional provider-specific source.
                source_level:
                    type: string
                    description: The optional source precedence level.
            description: A completed activation that could not be attributed to a skill version.
            required:
                - id
                - skill_name
                - provider
                - seen_at
                - reason
        UnmarkRiskResultsFalsePositiveRequestBody:
            type: object
            properties:
                result_ids:
                    type: array
                    items:
                        type: string
                    description: IDs of the risk results to restore.
                    minItems: 1
                    maxItems: 500
            required:
                - result_ids
        UnproxiedMcpServer:
            type: object
            properties:
                created_at:
                    type: string
                    description: When the unproxied MCP server was created
                    format: date-time
                description:
                    type: string
                    description: Optional description shown alongside the server.
                id:
                    type: string
                    description: The ID of the unproxied MCP server
                    format: uuid
                name:
                    type: string
                    description: Optional human-readable name for the unproxied MCP server
                project_id:
                    type: string
                    description: The project ID this unproxied MCP server belongs to
                    format: uuid
                slug:
                    type: string
                    description: URL-friendly slug derived from the URL and ID.
                updated_at:
                    type: string
                    description: When the unproxied MCP server was last updated
                    format: date-time
                url:
                    type: string
                    description: The URL of the vendor's MCP server
                    format: uri
            description: An unproxied MCP server configuration
            required:
                - id
                - project_id
                - url
                - created_at
                - updated_at
        UnproxiedMcpServerClientUsageRow:
            type: object
            properties:
                call_count:
                    type: integer
                    description: Number of observed calls from this client
                    format: int64
                client:
                    type: string
                    description: The hook-reported client/agent surface
            description: Call activity for a single client/agent surface (e.g. claude-code, cursor, codex) calling an unproxied MCP server
            required:
                - client
                - call_count
        UnproxiedMcpServerTool:
            type: object
            properties:
                description:
                    type: string
                    description: Tool description
                name:
                    type: string
                    description: Tool name
            description: A tool discovered on the vendor's MCP server
            required:
                - name
        UnproxiedMcpServerToolUsageRow:
            type: object
            properties:
                call_count:
                    type: integer
                    description: Number of observed calls to this tool
                    format: int64
                failure_count:
                    type: integer
                    description: Number of observed calls that errored
                    format: int64
                tool_name:
                    type: string
                    description: The tool's name
            description: Call activity for a single tool on an unproxied MCP server
            required:
                - tool_name
                - call_count
                - failure_count
        UnproxiedMcpServerUsageBreakdownPayload:
            type: object
            properties:
                cursor:
                    type: string
                    description: Cursor for pagination
                from:
                    type: string
                    description: Start time in ISO 8601 format
                    format: date-time
                limit:
                    type: integer
                    description: Number of items to return (1-500)
                    default: 50
                    format: int64
                    minimum: 1
                    maximum: 500
                to:
                    type: string
                    description: End time in ISO 8601 format
                    format: date-time
                url:
                    type: string
                    description: The unproxied MCP server's vendor URL
                    format: uri
            description: Shared payload shape for the unproxied MCP server tool/user/client usage breakdowns
            required:
                - url
                - from
                - to
        UnproxiedMcpServerUsageBucket:
            type: object
            properties:
                call_count:
                    type: integer
                    description: Number of observed tool calls in this bucket
                    format: int64
                date:
                    type: string
                    description: Bucket date (YYYY-MM-DD, UTC)
            description: A single day's Shadow-MCP-observed call count for an unproxied MCP server
            required:
                - date
                - call_count
        UnproxiedMcpServerUserUsageRow:
            type: object
            properties:
                call_count:
                    type: integer
                    description: Number of observed calls from this user
                    format: int64
                last_called_at:
                    type: string
                    description: Time of the user's most recent observed call, ISO 8601
                    format: date-time
                user_email:
                    type: string
                    description: The calling user's email, when Shadow MCP could resolve one
            description: Call activity for a single user of an unproxied MCP server
            required:
                - user_email
                - call_count
                - last_called_at
        UnshareSkillRequestBody:
            type: object
            properties:
                skill_id:
                    type: string
                    description: The skill ID.
                    format: uuid
            required:
                - skill_id
        UpdateAssistantForm:
            type: object
            properties:
                id:
                    type: string
                    description: The assistant ID.
                    format: uuid
                instructions:
                    type: string
                    description: The system instructions for the assistant.
                max_concurrency:
                    type: integer
                    description: Maximum active warm runtimes.
                    format: int64
                mcp_servers:
                    type: array
                    items:
                        $ref: '#/components/schemas/AssistantMCPServerRef'
                    description: MCP servers attached directly to the assistant (remote- or tunnelled-backed).
                model:
                    type: string
                    description: The model identifier used by the assistant.
                name:
                    type: string
                    description: The assistant name.
                status:
                    type: string
                    description: The assistant status.
                    enum:
                        - active
                        - paused
                toolsets:
                    type: array
                    items:
                        $ref: '#/components/schemas/AssistantToolsetRef'
                    description: Toolsets available to the assistant.
                warm_ttl_seconds:
                    type: integer
                    description: Warm runtime TTL in seconds.
                    format: int64
            required:
                - id
        UpdateAwsIamCredentialRequestBody:
            type: object
            properties:
                assume_role_arn:
                    type: string
                    description: The customer IAM role ARN Gram assumes. Omit for a KMS key-policy grant.
                id:
                    type: string
                    description: The ID of the credential to update.
                    format: uuid
                name:
                    type: string
                    description: A human-readable name for the credential.
                oidc_audience:
                    type: string
                    description: The OIDC audience. Provide (with assume_role_arn) to assume the role with a web identity.
                oidc_subject:
                    type: string
                    description: Optional OIDC subject pin; only valid alongside oidc_audience.
                sts_region:
                    type: string
                    description: Optional STS region override.
            required:
                - id
                - name
        UpdateAwsKmsKeyForm:
            type: object
            properties:
                customer_grant_reference:
                    type: string
                    description: Optional. The AWS principal ARN the customer granted on the key in its key policy. Not a secret.
                external_credential_id:
                    type: string
                    description: The external credential Gram uses to authenticate to the key. Must be an aws_iam credential belonging to the same organization.
                    format: uuid
                name:
                    type: string
                    description: A human-readable name for the key.
            required:
                - external_credential_id
                - name
        UpdateAwsKmsKeyRequestBody:
            type: object
            properties:
                customer_grant_reference:
                    type: string
                    description: Optional. The AWS principal ARN the customer granted on the key in its key policy. Not a secret.
                external_credential_id:
                    type: string
                    description: The external credential Gram uses to authenticate to the key. Must be an aws_iam credential belonging to the same organization.
                    format: uuid
                id:
                    type: string
                    description: The ID of the key to update.
                    format: uuid
                name:
                    type: string
                    description: A human-readable name for the key.
            required:
                - id
                - external_credential_id
                - name
        UpdateConfigurationRequestBody:
            type: object
            properties:
                config:
                    type: object
                    description: Shareable device-agent settings. Supported keys include platforms, update_channel, auto_update, pinned_target, blocked_versions, and sync_interval_seconds. update_channel and blocked_versions can only be set by Speakeasy platform administrators; per-device identity and secret keys are forbidden.
                    additionalProperties: true
            required:
                - config
        UpdateCustomDetectionRuleRequestBody:
            type: object
            properties:
                description:
                    type: string
                    description: Description of what the rule detects.
                detection_expr:
                    type: string
                    description: 'CEL detection predicate: a boolean expression over message fields whose true verdict produces a finding.'
                id:
                    type: string
                    description: The custom detection rule ID.
                    format: uuid
                regex:
                    type: string
                    description: Deprecated legacy RE2 regex pattern; superseded by detection_expr. Accepted for backward compatibility.
                severity:
                    type: string
                    description: Severity level for findings produced by this rule.
                    enum:
                        - info
                        - low
                        - medium
                        - high
                        - critical
                title:
                    type: string
                    description: Human-readable title for the rule.
            required:
                - id
                - title
                - severity
        UpdateDomainRequestBody:
            type: object
            properties:
                ip_allowlist:
                    type: array
                    items:
                        type: string
                    description: Replacement IP allowlist. Pass an empty list to remove all restrictions.
                openai_apps_challenge_token:
                    type: string
                    description: Replacement OpenAI app-submission verification token. Pass an empty string to clear it.
        UpdateEnvironmentForm:
            type: object
            properties:
                description:
                    type: string
                    description: The description of the environment
                entries_to_remove:
                    type: array
                    items:
                        type: string
                    description: List of environment entry names to remove
                entries_to_update:
                    type: array
                    items:
                        $ref: '#/components/schemas/EnvironmentEntryInput'
                    description: List of environment entries to update or create
                name:
                    type: string
                    description: The name of the environment
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            description: Form for updating an environment
            required:
                - slug
                - entries_to_update
                - entries_to_remove
        UpdateEnvironmentRequestBody:
            type: object
            properties:
                description:
                    type: string
                    description: The description of the environment
                entries_to_remove:
                    type: array
                    items:
                        type: string
                    description: List of environment entry names to remove
                entries_to_update:
                    type: array
                    items:
                        $ref: '#/components/schemas/EnvironmentEntryInput'
                    description: List of environment entries to update or create
                name:
                    type: string
                    description: The name of the environment
            required:
                - entries_to_update
                - entries_to_remove
        UpdateGcpIamCredentialRequestBody:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the credential to update.
                    format: uuid
                impersonate_service_account:
                    type: string
                    description: The service account in your project that Gram impersonates. Grant Gram's own service account roles/iam.serviceAccountTokenCreator on it — see externalCredentials.getGcpSetupInfo.
                name:
                    type: string
                    description: A human-readable name for the credential.
            required:
                - id
                - name
                - impersonate_service_account
        UpdateGcpIamPlatformCredentialRequestBody:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the credential to update.
                    format: uuid
                impersonate_service_account:
                    type: string
                    description: The service account Gram impersonates. Set alone for direct impersonation, or as the hop alongside the wif_* fields.
                name:
                    type: string
                    description: A human-readable name for the credential.
                wif_pool_id:
                    type: string
                    description: Workload Identity Federation pool ID. Set together with the other wif_* fields.
                wif_project_number:
                    type: string
                    description: GCP project number backing the WIF pool. Set together with the other wif_* fields.
                wif_provider_id:
                    type: string
                    description: Workload Identity Federation provider ID. Set together with the other wif_* fields.
            required:
                - id
                - name
        UpdateGcpKmsKeyForm:
            type: object
            properties:
                customer_grant_reference:
                    type: string
                    description: Optional. The Gram service-account email the customer granted on the key in an IAM binding. Not a secret.
                external_credential_id:
                    type: string
                    description: The external credential Gram uses to authenticate to the key. Must be a gcp_iam credential belonging to the same organization.
                    format: uuid
                name:
                    type: string
                    description: A human-readable name for the key.
            required:
                - external_credential_id
                - name
        UpdateGcpKmsKeyRequestBody:
            type: object
            properties:
                customer_grant_reference:
                    type: string
                    description: Optional. The Gram service-account email the customer granted on the key in an IAM binding. Not a secret.
                external_credential_id:
                    type: string
                    description: The external credential Gram uses to authenticate to the key. Must be a gcp_iam credential belonging to the same organization.
                    format: uuid
                id:
                    type: string
                    description: The ID of the key to update.
                    format: uuid
                name:
                    type: string
                    description: A human-readable name for the key.
            required:
                - id
                - external_credential_id
                - name
        UpdateInviteRoleRequestBody:
            type: object
            properties:
                invitation_id:
                    type: string
                    description: WorkOS invitation ID.
                role_id:
                    type: string
                    description: Role ID to assign to the invitee.
            required:
                - invitation_id
                - role_id
        UpdateMarketplaceSettingsRequestBody:
            type: object
            properties:
                marketplace_name:
                    type: string
                    description: Override for the marketplace name (the identifier users type as `<plugin>@<marketplace>`). Pass an empty string or omit to clear the override and fall back to the default.
        UpdateMarketplaceSettingsResult:
            type: object
            properties:
                hooks_update_deferred:
                    type: boolean
                    description: True when the new name reached the MCP plugins and marketplace manifests but the observability (hooks) plugin could not be updated yet because the organization is not approved for the latest hooks version; it will update automatically once the organization is rolled forward.
                republished:
                    type: boolean
                    description: Whether the marketplace was automatically republished to GitHub as part of this update.
                settings:
                    $ref: '#/components/schemas/MarketplaceSettingsResult'
            required:
                - settings
                - republished
        UpdateMcpEndpointForm:
            type: object
            properties:
                custom_domain_id:
                    type: string
                    description: The ID of the custom domain to register the endpoint slug under. Omit to move the endpoint to a platform domain.
                    format: uuid
                id:
                    type: string
                    description: The ID of the MCP endpoint to update
                    format: uuid
                mcp_server_id:
                    type: string
                    description: The ID of the MCP server this endpoint addresses
                    format: uuid
                slug:
                    type: string
                    description: A url-friendly label (up to 128 characters) that addresses an MCP server through a slug-based URL. Platform-domain slugs (no custom domain) must be prefixed with the organization slug.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 128
            description: 'Form for updating an MCP endpoint. This is a full-record replace: the custom_domain_id field omitted from the request becomes null on the stored record. Platform-domain endpoint slugs (no custom_domain_id) must be prefixed with the organization slug.'
            required:
                - id
                - mcp_server_id
                - slug
        UpdateMcpServerForm:
            type: object
            properties:
                environment_id:
                    type: string
                    description: The ID of the environment to associate with the server
                    format: uuid
                id:
                    type: string
                    description: The ID of the MCP server to update
                    format: uuid
                name:
                    type: string
                    description: A human-readable display name for the server. Omit to leave the existing name unchanged; if provided, must be non-empty.
                remote_mcp_server_id:
                    type: string
                    description: The ID of the remote MCP server to use as the backend
                    format: uuid
                tool_variations_group_id:
                    type: string
                    description: The ID of the tool variations group enabling MCP tool filtering for this server. Omit to disable filtering (cleared to null, consistent with the full-record replace semantics of the other UUID references).
                    format: uuid
                toolset_id:
                    type: string
                    description: The ID of the toolset to use as the backend
                    format: uuid
                tunneled_mcp_server_id:
                    type: string
                    description: The ID of the tunneled MCP server to use as the backend
                    format: uuid
                unproxied_mcp_server_id:
                    type: string
                    description: The ID of the unproxied MCP server to use as the backend
                    format: uuid
                visibility:
                    type: string
                    description: The visibility of an MCP server
                    enum:
                        - disabled
                        - private
                        - public
            description: 'Form for updating an MCP server. This is a full-record replace: fields omitted from the request become null on the stored record. The user session issuer cannot be changed after create. Exactly one of remote_mcp_server_id, tunneled_mcp_server_id, toolset_id, or unproxied_mcp_server_id must be provided. Omit name to leave the existing display name unchanged; the slug is recomputed server-side from the resulting name.'
            required:
                - id
                - visibility
        UpdateMemberRolesForm:
            type: object
            properties:
                role_ids:
                    type: array
                    items:
                        type: string
                    description: The role IDs to assign. Replaces all existing role assignments.
                user_id:
                    type: string
                    description: The user ID to update.
            required:
                - user_id
                - role_ids
        UpdateOrganizationRequestBody:
            type: object
            properties:
                account_type:
                    type: string
                    description: New gram_account_type (free, pro, payg, or enterprise).
                    enum:
                        - free
                        - pro
                        - payg
                        - enterprise
                id:
                    type: string
                    description: Organization ID.
                whitelisted:
                    type: boolean
                    description: New whitelisted flag.
            required:
                - id
        UpdatePackageForm:
            type: object
            properties:
                description:
                    type: string
                    description: The description of the package. Limited markdown syntax is supported.
                    maxLength: 10000
                id:
                    type: string
                    description: The id of the package to update
                    maxLength: 50
                image_asset_id:
                    type: string
                    description: The asset ID of the image to show for this package
                    maxLength: 50
                keywords:
                    type: array
                    items:
                        type: string
                    description: The keywords of the package
                    maxItems: 5
                summary:
                    type: string
                    description: The summary of the package
                    maxLength: 80
                title:
                    type: string
                    description: The title of the package
                    maxLength: 100
                url:
                    type: string
                    description: External URL for the package owner
                    maxLength: 100
            required:
                - id
        UpdatePackageResult:
            type: object
            properties:
                package:
                    $ref: '#/components/schemas/Package'
            required:
                - package
        UpdatePluginForm:
            type: object
            properties:
                description:
                    type: string
                    description: Updated description.
                id:
                    type: string
                    format: uuid
                name:
                    type: string
                    description: Updated display name.
                slug:
                    type: string
                    description: Updated slug.
            required:
                - id
                - name
                - slug
        UpdatePluginServerForm:
            type: object
            properties:
                display_name:
                    type: string
                id:
                    type: string
                    format: uuid
                plugin_id:
                    type: string
                    format: uuid
                policy:
                    type: string
                    default: required
                    enum:
                        - required
                        - optional
                sort_order:
                    type: integer
                    default: 0
                    format: int32
            required:
                - id
                - plugin_id
                - display_name
        UpdatePromptTemplateForm:
            type: object
            properties:
                arguments:
                    type: string
                    description: The JSON Schema defining the placeholders found in the prompt template
                    format: json
                description:
                    type: string
                    description: The description of the prompt template
                engine:
                    type: string
                    description: The template engine
                    enum:
                        - mustache
                id:
                    type: string
                    description: The ID of the prompt template to update
                kind:
                    type: string
                    description: The kind of prompt the template is used for
                    enum:
                        - prompt
                        - higher_order_tool
                name:
                    type: string
                    description: The name of the prompt template. Will be updated via variation
                prompt:
                    type: string
                    description: The template content
                tool_urns_hint:
                    type: array
                    items:
                        type: string
                    description: The suggested tool URNS associated with the prompt template
                    maxItems: 20
                tools_hint:
                    type: array
                    items:
                        type: string
                    description: The suggested tool names associated with the prompt template
                    maxItems: 20
            required:
                - id
        UpdatePromptTemplateResult:
            type: object
            properties:
                template:
                    $ref: '#/components/schemas/PromptTemplate'
            required:
                - template
        UpdateRemoteSessionClientForm:
            type: object
            properties:
                audience:
                    type: string
                    description: Replace the upstream OAuth audience sent for this client. Omit to leave unchanged.
                    pattern: ^[!-~]+$
                    maxLength: 512
                client_secret:
                    type: string
                    description: Rotate the client secret. Gram re-encrypts before persisting.
                id:
                    type: string
                    description: The remote_session_client id.
                    format: uuid
                scope:
                    type: array
                    items:
                        type: string
                        pattern: ^[!#-[\]-~]+$
                        maxLength: 128
                    description: Replace the explicit upstream OAuth scopes for this client. Omit to leave unchanged.
                token_endpoint_auth_method:
                    type: string
                    description: Change how the client authenticates at the issuer's token endpoint.
                    enum:
                        - client_secret_basic
                        - client_secret_post
                        - none
            description: Form for updating a remote_session_client. All non-id fields are optional patches.
            required:
                - id
        UpdateRemoteSessionIssuerForm:
            type: object
            properties:
                authorization_endpoint:
                    type: string
                    description: Upstream authorization endpoint.
                client_id_metadata_document_supported:
                    type: boolean
                    description: Whether the issuer accepts a Client ID Metadata Document URL as client_id (OAuth CIMD draft).
                client_setup_documentation_url:
                    type: string
                    description: Set or clear the URL of OAuth client setup documentation shown when creating clients. An empty string clears it to NULL; any other value must be an absolute http(s) URL.
                grant_types_supported:
                    type: array
                    items:
                        type: string
                id:
                    type: string
                    description: The remote_session_issuer id.
                    format: uuid
                issuer:
                    type: string
                    description: Issuer URL; matches the iss claim.
                jwks_uri:
                    type: string
                    description: Upstream JWKS URI.
                logo_asset_id:
                    type: string
                    description: Set or clear the logo asset id. An empty string clears it to NULL; any other value must be a uuid.
                name:
                    type: string
                    description: Set or clear the display name. An empty string clears it to NULL.
                oidc:
                    type: boolean
                op_policy_uri:
                    type: string
                    description: Set or clear RFC 8414 op_policy_uri. An empty string clears it to NULL; any other value must be an absolute http(s) URL.
                op_tos_uri:
                    type: string
                    description: Set or clear RFC 8414 op_tos_uri. An empty string clears it to NULL; any other value must be an absolute http(s) URL.
                passthrough:
                    type: boolean
                registration_endpoint:
                    type: string
                    description: Upstream RFC 7591 registration endpoint.
                response_types_supported:
                    type: array
                    items:
                        type: string
                revocation_endpoint:
                    type: string
                    description: Upstream RFC 7009 revocation endpoint.
                scopes_supported:
                    type: array
                    items:
                        type: string
                service_documentation:
                    type: string
                    description: Set or clear RFC 8414 service_documentation. An empty string clears it to NULL; any other value must be an absolute http(s) URL.
                slug:
                    type: string
                    description: Rename the slug.
                token_endpoint:
                    type: string
                    description: Upstream token endpoint.
                token_endpoint_auth_methods_supported:
                    type: array
                    items:
                        type: string
            description: Form for updating a remote_session_issuer. All non-id fields are optional patches.
            required:
                - id
        UpdateRequestBody:
            type: object
            properties:
                collection_id:
                    type: string
                    description: ID of the collection to update
                    format: uuid
                description:
                    type: string
                    description: Description of the collection
                    maxLength: 500
                name:
                    type: string
                    description: Display name for the collection
                    minLength: 1
                    maxLength: 100
                visibility:
                    type: string
                    description: Visibility of the collection
                    enum:
                        - public
                        - private
            required:
                - collection_id
        UpdateRiskExclusionRequestBody:
            type: object
            properties:
                enabled:
                    type: boolean
                    description: Whether the exclusion is active. Omit to leave unchanged.
                id:
                    type: string
                    description: The exclusion ID.
                    format: uuid
                match_type:
                    type: string
                    description: How match_value is interpreted.
                    enum:
                        - exact
                        - regex
                        - rule_id
                        - source
                        - entity_type
                match_value:
                    type: string
                    description: The value matched against findings, interpreted per match_type.
                risk_policy_id:
                    type: string
                    description: Bind the exclusion to a single policy. Omit for a global (project-wide) exclusion.
                    format: uuid
                rule_id_filter:
                    type: string
                    description: 'Optional: only apply within this rule_id. Empty means any.'
                    default: ""
                source_filter:
                    type: string
                    description: 'Optional: only apply within this source. Empty means any.'
                    default: ""
            required:
                - id
                - match_type
                - match_value
        UpdateRiskPolicyRequestBody:
            type: object
            properties:
                action:
                    type: string
                    description: 'Policy action: flag, warn (challenge), or block.'
                    enum:
                        - flag
                        - warn
                        - block
                approved_email_domains:
                    type: array
                    items:
                        type: string
                    description: 'For the account_identity source: corporate email domains considered approved. Omit to preserve the current list; send an empty array to clear it.'
                audience_principal_urns:
                    type: array
                    items:
                        type: string
                    description: Principal URNs this policy applies to. Omit to preserve the current target principals.
                audience_type:
                    type: string
                    description: 'Policy audience type: everyone or targeted. Omit to preserve the current audience type.'
                    enum:
                        - everyone
                        - targeted
                auto_name:
                    type: boolean
                    description: Whether the policy name should be auto-generated.
                custom_rule_ids:
                    type: array
                    items:
                        type: string
                    description: 'Custom detection rule ids to attach as detectors: a match produces a finding. Omit to preserve the current selection.'
                detection_scopes:
                    type: array
                    items:
                        $ref: '#/components/schemas/RiskDetectionScope'
                    description: Per-category detection scopes. Each specified category replaces its centrally recommended scope; a scope with both predicates empty scans every message surface. Omit to preserve the current value; send empty to clear.
                disabled_rules:
                    type: array
                    items:
                        type: string
                    description: Canonical rule_ids the user has unchecked within otherwise-enabled categories. Matching findings are dropped at scan time.
                enabled:
                    type: boolean
                    description: Whether the policy is active.
                id:
                    type: string
                    description: The policy ID.
                    format: uuid
                message_types:
                    type: array
                    items:
                        type: string
                    description: Message types this policy applies to. Omit to preserve the current selection; send an empty array to apply to all types.
                model_config:
                    $ref: '#/components/schemas/RiskPolicyModelConfig'
                name:
                    type: string
                    description: The policy name.
                presidio_entities:
                    type: array
                    items:
                        type: string
                    description: Presidio entity types to detect.
                presidio_score_threshold:
                    type: number
                    description: Minimum Presidio confidence (0.0-1.0) a PII match must clear to surface. Omit/null applies the default (0.5).
                    example: 0.75
                    format: double
                    minimum: 0
                    maximum: 1
                prompt:
                    type: string
                    description: 'For prompt_based policies: the guardrail prompt the LLM judge evaluates each in-scope message against. Omit to preserve the current value.'
                prompt_injection_rules:
                    type: array
                    items:
                        type: string
                    description: Prompt-injection detection rule ids to enable in addition to the heuristic baseline.
                scope_exempt:
                    type: string
                    description: CEL exemption predicate. Omit to preserve the current value; send empty to clear.
                scope_include:
                    type: string
                    description: CEL scope predicate (in addition to message_types). Omit to preserve the current value; send empty to clear.
                score:
                    type: number
                    description: CVSS-style severity (0.1-10) assigned to findings this policy produces. Omit to preserve the current value.
                    example: 5
                    format: double
                    minimum: 0.1
                    maximum: 10
                shadow_mcp_allowed_urls:
                    type: array
                    items:
                        type: string
                    description: Complete desired canonical URL allow set for this policy. Omit to preserve; send empty to clear.
                shadow_mcp_blocked_urls:
                    type: array
                    items:
                        type: string
                    description: 'For allow_all policies: complete desired canonical URL block set. Omit to preserve; send empty to clear.'
                shadow_mcp_disposition:
                    type: string
                    description: 'The policy''s shadow MCP disposition. Immutable: omit, or send the current value unchanged; any other value is rejected. Switching posture requires delete + recreate.'
                    enum:
                        - block_all
                        - allow_all
                sources:
                    type: array
                    items:
                        type: string
                    description: Detection sources to enable.
                user_message:
                    type: string
                    description: Optional message shown to end users when this policy blocks an action or surfaces a flagged finding. Send an empty string to clear.
            required:
                - id
                - name
        UpdateRoleForm:
            type: object
            properties:
                add_grants:
                    type: array
                    items:
                        $ref: '#/components/schemas/RoleGrant'
                    description: Scope grants to add.
                description:
                    type: string
                    description: Updated description.
                id:
                    type: string
                    description: The ID of the role to update.
                member_ids:
                    type: array
                    items:
                        type: string
                    description: Optional member IDs to additionally assign to this role. Existing assignments are preserved.
                name:
                    type: string
                    description: Updated display name.
                remove_grants:
                    type: array
                    items:
                        $ref: '#/components/schemas/RoleGrant'
                    description: Scope grants to remove.
            required:
                - id
        UpdateSecurityVariableDisplayNameForm:
            type: object
            properties:
                display_name:
                    type: string
                    description: The user-friendly display name. Set to empty string to clear and use the original name.
                    maxLength: 120
                project_slug_input:
                    type: string
                security_key:
                    type: string
                    description: The security scheme key (e.g., 'BearerAuth', 'ApiKeyAuth') from the OpenAPI spec
                    maxLength: 60
                toolset_slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
            required:
                - toolset_slug
                - security_key
                - display_name
        UpdateServerForm:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the remote MCP server to update
                name:
                    type: string
                    description: Optional human-readable name. Pass an empty string to clear the existing name.
                transport_type:
                    type: string
                    description: The transport type for the remote MCP server
                url:
                    type: string
                    description: The URL of the remote MCP server
                    format: uri
            description: Form for updating a remote MCP server
            required:
                - id
        UpdateServerHeaderForm:
            type: object
            properties:
                description:
                    type: string
                    description: Description of the header
                id:
                    type: string
                    description: The ID of the header to update
                    format: uuid
                is_required:
                    type: boolean
                    description: Whether the header is required. Defaults to false.
                is_secret:
                    type: boolean
                    description: Whether the header value is a secret. Defaults to false. Incompatible with value_from_request_header.
                name:
                    type: string
                    description: The header name
                value:
                    type: string
                    description: Static header value (mutually exclusive with value_from_request_header). Omit on an existing secret header to preserve its stored value.
                value_from_request_header:
                    type: string
                    description: Name of the inbound request header to pass through (mutually exclusive with value)
            description: 'Form for updating a remote MCP server header. Replaces every mutable field, so omitted optional fields are reset to their defaults. The one exception is value: omitting it for a header that is already secret preserves the stored value rather than clearing it.'
            required:
                - id
                - name
        UpdateShadowMCPInventoryServerNameForm:
            type: object
            properties:
                name:
                    type: string
                    maxLength: 255
                project_id:
                    type: string
                    format: uuid
                server_url:
                    type: string
                    format: uri
            required:
                - project_id
                - server_url
                - name
        UpdateSkillRequestBody:
            type: object
            properties:
                display_name:
                    type: string
                    description: The user-facing skill name.
                    maxLength: 256
                id:
                    type: string
                    description: The skill ID.
                    format: uuid
                name:
                    type: string
                    description: The canonical skill name.
                    maxLength: 64
                summary:
                    type: string
                    description: The optional skill summary.
                    maxLength: 1024
                tags:
                    type: array
                    items:
                        type: string
                        maxLength: 64
                    description: Registry tags for categorizing the skill. At most 40 tags.
                    maxItems: 40
            required:
                - id
                - name
                - display_name
                - tags
        UpdateSpendRuleRequestBody:
            type: object
            properties:
                action:
                    type: string
                    description: 'Rule action: flag or block. Omit to preserve the current action.'
                    enum:
                        - flag
                        - block
                description:
                    type: string
                    description: Description of what the rule covers. Omit to preserve the current description.
                enabled:
                    type: boolean
                    description: Whether the rule is active. Omit to preserve the current state.
                id:
                    type: string
                    description: The rule ID.
                    format: uuid
                limit_usd:
                    type: number
                    description: Per-person budget in USD for one window. Omit to preserve the current limit.
                    format: double
                    minimum: 0
                name:
                    type: string
                    description: The rule name. Omit to preserve the current name.
                target:
                    $ref: '#/components/schemas/SpendRuleTargetCondition'
                warn_at_pct:
                    type: integer
                    description: Percentage of the limit at which a warning event is emitted. Omit to preserve the current threshold.
                    format: int64
                    minimum: 1
                    maximum: 100
                window_kind:
                    type: string
                    description: UTC calendar window the budget covers. Omit to preserve the current window.
                    enum:
                        - daily
                        - weekly
                        - monthly
            required:
                - id
        UpdateToolsetForm:
            type: object
            properties:
                custom_domain_id:
                    type: string
                    description: The ID of the custom domain to use for the toolset
                default_environment_slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                description:
                    type: string
                    description: The new description of the toolset
                mcp_enabled:
                    type: boolean
                    description: Whether the toolset is enabled for MCP
                mcp_is_public:
                    type: boolean
                    description: Whether the toolset is public in MCP
                mcp_slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                name:
                    type: string
                    description: The new name of the toolset
                project_slug_input:
                    type: string
                prompt_template_names:
                    type: array
                    items:
                        type: string
                    description: 'List of prompt template names to include (note: for actual prompts, not tools)'
                resource_urns:
                    type: array
                    items:
                        type: string
                    description: List of resource URNs to include in the toolset
                slug:
                    type: string
                    description: A short url-friendly label that uniquely identifies a resource.
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                tool_selection_mode:
                    type: string
                    description: The mode to use for tool selection
                tool_urns:
                    type: array
                    items:
                        type: string
                    description: List of tool URNs to include in the toolset
            required:
                - slug
        UpdateToolsetRequestBody:
            type: object
            properties:
                custom_domain_id:
                    type: string
                    description: The ID of the custom domain to use for the toolset
                default_environment_slug:
                    type: string
                    description: The slug of the environment to use as the default for the toolset
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                description:
                    type: string
                    description: The new description of the toolset
                mcp_enabled:
                    type: boolean
                    description: Whether the toolset is enabled for MCP
                mcp_is_public:
                    type: boolean
                    description: Whether the toolset is public in MCP
                mcp_slug:
                    type: string
                    description: The slug of the MCP to use for the toolset
                    pattern: ^[a-z0-9_-]{1,128}$
                    maxLength: 40
                name:
                    type: string
                    description: The new name of the toolset
                prompt_template_names:
                    type: array
                    items:
                        type: string
                    description: 'List of prompt template names to include (note: for actual prompts, not tools)'
                resource_urns:
                    type: array
                    items:
                        type: string
                    description: List of resource URNs to include in the toolset
                tool_selection_mode:
                    type: string
                    description: The mode to use for tool selection
                tool_urns:
                    type: array
                    items:
                        type: string
                    description: List of tool URNs to include in the toolset
        UpdateTriggerInstanceForm:
            type: object
            properties:
                config:
                    type: object
                    description: The trigger config payload.
                    additionalProperties: true
                environment_id:
                    type: string
                    description: The linked environment ID.
                    format: uuid
                id:
                    type: string
                    description: The trigger instance ID.
                    format: uuid
                name:
                    type: string
                    description: The trigger instance name.
                status:
                    type: string
                    description: The trigger status.
                    enum:
                        - active
                        - paused
                target_display:
                    type: string
                    description: The user-facing target display value.
                target_kind:
                    type: string
                    description: The trigger target kind.
                    enum:
                        - assistant
                        - noop
                target_ref:
                    type: string
                    description: The opaque target reference.
            required:
                - id
        UpdateTunneledMcpServerForm:
            type: object
            properties:
                allow_public:
                    type: boolean
                    description: Consent to serve this source through a public, anonymous MCP endpoint. Disabling revokes all live anonymous sessions. Omit to leave unchanged.
                id:
                    type: string
                    description: The ID of the tunneled MCP server to update
                    format: uuid
                name:
                    type: string
                    description: Human-readable display name for the tunneled MCP server
            description: Form for updating a tunneled MCP server source
            required:
                - id
                - name
        UpdateUserSessionIssuerForm:
            type: object
            properties:
                authn_challenge_mode:
                    type: string
                    description: chain | interactive.
                    enum:
                        - chain
                        - interactive
                client_id_metadata_admission_mode:
                    type: string
                    description: Which CIMD (OAuth Client ID Metadata Document) clients this issuer admits. 'presets' admits Gram's curated catalog plus this issuer's custom URLs; 'open' admits any spec-valid document; 'disabled' admits none and stops advertising CIMD support. Omit to leave unchanged. Once set, the issuer can never return to the unset state — it can only be moved between explicit modes.
                    enum:
                        - disabled
                        - presets
                        - open
                id:
                    type: string
                    description: The user_session_issuer id.
                    format: uuid
                session_duration_hours:
                    type: integer
                    description: Maximum issued user session lifetime, in hours.
                    format: int64
                slug:
                    type: string
                    description: Rename the slug.
            description: Form for updating a user_session_issuer. All non-id fields are optional patches.
            required:
                - id
        UploadChatAttachmentForm:
            type: object
            properties:
                apikey_token:
                    type: string
                chat_sessions_token:
                    type: string
                content_length:
                    type: integer
                    format: int64
                content_type:
                    type: string
                project_slug_input:
                    type: string
                session_token:
                    type: string
            required:
                - content_type
                - content_length
        UploadChatAttachmentResult:
            type: object
            properties:
                asset:
                    $ref: '#/components/schemas/Asset'
                url:
                    type: string
                    description: The URL to serve the chat attachment
            required:
                - asset
                - url
        UploadFunctionsForm:
            type: object
            properties:
                apikey_token:
                    type: string
                content_length:
                    type: integer
                    format: int64
                content_type:
                    type: string
                project_slug_input:
                    type: string
                session_token:
                    type: string
            required:
                - content_type
                - content_length
        UploadFunctionsResult:
            type: object
            properties:
                asset:
                    $ref: '#/components/schemas/Asset'
            required:
                - asset
        UploadImageForm:
            type: object
            properties:
                apikey_token:
                    type: string
                content_length:
                    type: integer
                    format: int64
                content_type:
                    type: string
                project_slug_input:
                    type: string
                session_token:
                    type: string
            required:
                - content_type
                - content_length
        UploadImageResult:
            type: object
            properties:
                asset:
                    $ref: '#/components/schemas/Asset'
            required:
                - asset
        UploadOpenAPIv3Form:
            type: object
            properties:
                apikey_token:
                    type: string
                content_length:
                    type: integer
                    format: int64
                content_type:
                    type: string
                project_slug_input:
                    type: string
                session_token:
                    type: string
            required:
                - content_type
                - content_length
        UploadOpenAPIv3Result:
            type: object
            properties:
                asset:
                    $ref: '#/components/schemas/Asset'
            required:
                - asset
        UploadOrganizationImageForm:
            type: object
            properties:
                content_length:
                    type: integer
                    format: int64
                content_type:
                    type: string
                session_token:
                    type: string
            required:
                - content_type
                - content_length
        UploadPlatformImageForm:
            type: object
            properties:
                content_length:
                    type: integer
                    format: int64
                content_type:
                    type: string
                session_token:
                    type: string
            required:
                - content_type
                - content_length
        UploadSkillContentPayload:
            type: object
            properties:
                content:
                    type: string
                    description: Raw UTF-8 skill manifest content. The server rejects content whose UTF-8 encoding exceeds 65,536 bytes.
                raw_sha256:
                    type: string
                    description: Lowercase SHA-256 of the raw content.
                    pattern: ^[0-9a-f]{64}$
                schema_version:
                    type: string
                    description: Contract version.
                    enum:
                        - hook.skill-content.v1
            description: Content for a skill manifest requested by a prior hook ingest response.
            required:
                - schema_version
                - raw_sha256
                - content
        UpsertAllowedOriginForm:
            type: object
            properties:
                origin:
                    type: string
                    description: The origin URL to upsert
                    minLength: 1
                    maxLength: 500
                status:
                    type: string
                    default: pending
                    enum:
                        - pending
                        - approved
                        - rejected
            required:
                - origin
        UpsertAllowedOriginResult:
            type: object
            properties:
                allowed_origin:
                    $ref: '#/components/schemas/AllowedOrigin'
            required:
                - allowed_origin
        UpsertBusinessMemorySettingsRequestBody:
            type: object
            properties:
                business_memory_daily_cap:
                    type: integer
                    description: Maximum business-memory extraction evaluations reserved across the organization each UTC day. 0 disables extraction.
                    format: int64
                    minimum: 0
                    maximum: 10000
                business_memory_enabled:
                    type: boolean
                    description: Whether completed sessions are mined for business memories.
            required:
                - business_memory_enabled
                - business_memory_daily_cap
        UpsertConfigRequestBody:
            type: object
            properties:
                api_key:
                    type: string
                    description: Provider API key. Stored encrypted at rest; never returned on reads.
                billing_mode:
                    type: string
                    description: 'How the provider org is billed: ''metered'', ''flat_rate'', or ''unknown''. Free-form; omit to leave the existing value unchanged.'
                enabled:
                    type: boolean
                    description: Whether the integration should be active.
                external_organization_id:
                    type: string
                    description: Provider scope identifier. Required for anthropic_compliance and codex_compliance (organization id) and chatgpt_compliance (ChatGPT workspace UUID).
                provider:
                    type: string
                    description: AI provider identifier. Supported values include cursor, anthropic_compliance, codex_compliance, and chatgpt_compliance.
            required:
                - provider
                - api_key
                - enabled
        UpsertConfigRequestBody2:
            type: object
            properties:
                credentials:
                    type: object
                    description: Secret credential values keyed by field key. Stored encrypted; never returned on reads. Omit to keep the existing secrets.
                    additionalProperties:
                        type: string
                enabled:
                    type: boolean
                    description: Whether the integration should be active.
                provider:
                    type: string
                    description: Provider identifier (e.g. jamf, kandji, drata, vanta).
                settings:
                    type: object
                    description: 'Non-secret settings values keyed by field key. Merged per key with the stored settings: omitted keys keep their stored values.'
                    additionalProperties:
                        type: string
            required:
                - provider
                - enabled
        UpsertConfigRequestBody3:
            type: object
            properties:
                enabled:
                    type: boolean
                    description: Whether forwarding should be active.
                endpoint_url:
                    type: string
                    description: URL to forward OTEL payloads to.
                headers:
                    type: array
                    items:
                        $ref: '#/components/schemas/OtelForwardingHeaderInput'
                    description: Full set of headers to attach. Replaces any existing headers.
            required:
                - endpoint_url
                - enabled
        UpsertGlobalToolVariationForm:
            type: object
            properties:
                confirm:
                    type: string
                    description: The confirmation mode for the tool variation
                    enum:
                        - always
                        - never
                        - session
                confirm_prompt:
                    type: string
                    description: The confirmation prompt for the tool variation
                description:
                    type: string
                    description: The description of the tool variation
                destructive_hint:
                    type: boolean
                    description: 'Override: if true, the tool may perform destructive updates'
                idempotent_hint:
                    type: boolean
                    description: 'Override: if true, repeated calls have no additional effect'
                name:
                    type: string
                    description: The name of the tool variation
                open_world_hint:
                    type: boolean
                    description: 'Override: if true, the tool interacts with external entities'
                read_only_hint:
                    type: boolean
                    description: 'Override: if true, the tool does not modify its environment'
                src_tool_name:
                    type: string
                    description: The name of the source tool
                src_tool_urn:
                    type: string
                    description: The URN of the source tool
                summarizer:
                    type: string
                    description: The summarizer of the tool variation
                summary:
                    type: string
                    description: The summary of the tool variation
                tags:
                    type: array
                    items:
                        type: string
                    description: The tags of the tool variation
                title:
                    type: string
                    description: Display name override for the tool
            required:
                - src_tool_name
                - src_tool_urn
        UpsertGlobalToolVariationResult:
            type: object
            properties:
                variation:
                    $ref: '#/components/schemas/ToolVariation'
            required:
                - variation
        UpsertKeyRequestBody:
            type: object
            properties:
                api_key:
                    type: string
                    description: The provider API key. Stored encrypted at rest; never returned on reads.
                enabled:
                    type: boolean
                    description: Whether the key participates in key resolution.
                    default: true
                provider:
                    type: string
                    description: The model provider the key authenticates with. Supported values include openrouter.
                slot:
                    type: string
                    description: The responsibility slot the key applies to. Use 'default' to cover every slot without a dedicated override.
            required:
                - slot
                - provider
                - api_key
        UpsertRequestBody:
            type: object
            properties:
                display_name:
                    type: string
                    description: User-friendly display name
                raw_server_name:
                    type: string
                    description: Original server name from hooks
            required:
                - raw_server_name
                - display_name
        UpsertSettingsRequestBody:
            type: object
            properties:
                enabled:
                    type: boolean
                    description: Whether skill efficacy scoring is enabled.
                new_version_burst:
                    type: integer
                    description: Lifetime evaluations a new skill version may reserve before the per-skill daily cap applies.
                    format: int64
                    minimum: 0
                    maximum: 10000
                org_daily_cap:
                    type: integer
                    description: Maximum evaluations reserved across the organization each UTC day.
                    format: int64
                    minimum: 0
                    maximum: 10000
                per_skill_daily_cap:
                    type: integer
                    description: Maximum evaluations reserved per skill each UTC day.
                    format: int64
                    minimum: 0
                    maximum: 10000
            required:
                - enabled
                - per_skill_daily_cap
                - org_daily_cap
                - new_version_burst
        UpsertWorkUnitsSettingsRequestBody:
            type: object
            properties:
                work_units_daily_cap:
                    type: integer
                    description: Maximum work-units evaluations reserved across the organization each UTC day. 0 disables scoring as surely as the switch.
                    format: int64
                    minimum: 0
                    maximum: 10000
                work_units_enabled:
                    type: boolean
                    description: Whether work-units chat analysis is enabled.
            required:
                - work_units_enabled
                - work_units_daily_cap
        UsageTiers:
            type: object
            properties:
                enterprise:
                    $ref: '#/components/schemas/TierLimits'
                free:
                    $ref: '#/components/schemas/TierLimits'
                payg:
                    $ref: '#/components/schemas/TierLimits'
                pro:
                    $ref: '#/components/schemas/TierLimits'
            required:
                - free
                - pro
                - payg
                - enterprise
        UserAccount:
            type: object
            properties:
                account_type:
                    type: string
                    description: '''team'' (enterprise) or ''personal'' (individual); empty when not yet classified'
                email:
                    type: string
                    description: Email associated with the account; may differ from the user's work email for personal accounts
                external_org_id:
                    type: string
                    description: Provider org id for this account; the per-account discriminator used to scope telemetry to this one account
                id:
                    type: string
                    description: Account record id (user_accounts.id); used to scope chat/session views to this account
                last_seen_unix_nano:
                    type: string
                    description: Latest activity timestamp for this account in Unix nanoseconds
                provider:
                    type: string
                    description: AI provider the account belongs to ('anthropic', 'openai', 'cursor')
            description: 'A linked AI account for a user. The identity is (provider, email): the same email registered on two providers is two distinct accounts.'
            required:
                - provider
        UserSession:
            type: object
            properties:
                client_id_metadata_uri:
                    type: string
                    description: Set when the client that established this session was resolved from a Client ID Metadata Document (CIMD) hosted at this URL, rather than registered via RFC 7591 DCR. Null for DCR clients and for sessions with no bound client.
                client_name:
                    type: string
                    description: Name of the MCP client that established the session, if known. Client-controlled and unverified; do not present it as an identity.
                created_at:
                    type: string
                    format: date-time
                expires_at:
                    type: string
                    description: Terminal session expiry; ceiling on refresh_expires_at.
                    format: date-time
                id:
                    type: string
                    description: The user_session id.
                    format: uuid
                issuer_slug:
                    type: string
                    description: Slug of the user_session_issuer that gated this session.
                jti:
                    type: string
                    description: Current access-token JTI; used by the revocation path.
                last_used_at:
                    type: string
                    description: When this session last carried an MCP request. Recorded on the request path and coalesced to a five-minute resolution, so treat it as accurate to within that. Null means the session has not been used since the column was introduced — unknown, not never.
                    format: date-time
                refresh_expires_at:
                    type: string
                    description: Next refresh deadline.
                    format: date-time
                revoked_at:
                    type: string
                    description: When the session was revoked, if it has been.
                    format: date-time
                subject_display_name:
                    type: string
                    description: Resolved human-readable name of the subject, if known.
                subject_photo_url:
                    type: string
                    description: Avatar URL for the subject when it resolves to a Gram user with one. Null for API key and anonymous subjects, and for users who have no photo.
                subject_type:
                    type: string
                    description: 'Subject kind: ''user'', ''apikey'', or ''anonymous''.'
                subject_urn:
                    type: string
                    description: The session's subject URN (user:<id> | apikey:<uuid> | anonymous:<mcp-session-id>).
                updated_at:
                    type: string
                    format: date-time
                upstreams:
                    type: array
                    items:
                        $ref: '#/components/schemas/UserSessionUpstream'
                    description: 'The upstream providers Gram holds tokens for on this session''s subject, through the same issuer. Empty when the session reaches only Gram-native tools. A session can have several: an issuer may have more than one remote_session_client attached.'
                user_session_client_id:
                    type: string
                    description: The user_session_client this session was issued through. Null for sessions with no bound client. Unlike client_name, this identifies the registration unambiguously, so it is what a per-client drill-down should match on.
                    format: uuid
                user_session_issuer_id:
                    type: string
                    description: The issuing user_session_issuer id.
                    format: uuid
            description: An issued user_session record. refresh_token_hash is never returned.
            required:
                - id
                - user_session_issuer_id
                - subject_urn
                - jti
                - refresh_expires_at
                - expires_at
                - created_at
                - updated_at
                - issuer_slug
                - subject_type
                - upstreams
        UserSessionClient:
            type: object
            properties:
                active_session_count:
                    type: integer
                    description: 'How many live user_sessions this client currently holds. Counted the same way the sessions listing''s active filter counts: not revoked, and the refresh token has not expired.'
                    format: int64
                client_id:
                    type: string
                    description: The client_id. Minted by Gram for a DCR registration; for a CIMD client it is the metadata document URL and equals client_id_metadata_uri.
                client_id_issued_at:
                    type: string
                    format: date-time
                client_id_metadata_cache_expires_at:
                    type: string
                    description: When the cached metadata document lapses and the next /authorize revalidates it against the host. Null for DCR clients, and null after a refresh purge until the re-read lands.
                    format: date-time
                client_id_metadata_etag:
                    type: string
                    description: ETag the document host returned on the last full read; sent as If-None-Match when revalidating. Null when the host offers no validator, and null for DCR clients.
                client_id_metadata_fetched_at:
                    type: string
                    description: When the metadata document was last successfully read. A 304 revalidation counts as a read, so this is not necessarily when the body was last fetched. Null for DCR clients.
                    format: date-time
                client_id_metadata_uri:
                    type: string
                    description: When set, the client was resolved from a Client ID Metadata Document (CIMD) hosted at this URL rather than registered via RFC 7591 DCR. Null for DCR clients. The URL is the client's identity, so its origin -- not client_name, which the client chooses -- is the trustworthy label.
                client_name:
                    type: string
                    description: Display name the client supplied at registration, or the client_name extracted from its metadata document. Client-controlled and unverified; do not present it as an identity.
                client_secret_expires_at:
                    type: string
                    description: Null when the secret does not expire.
                    format: date-time
                created_at:
                    type: string
                    format: date-time
                id:
                    type: string
                    description: The user_session_client id.
                    format: uuid
                redirect_uris:
                    type: array
                    items:
                        type: string
                    description: Validated on every /authorize.
                updated_at:
                    type: string
                    format: date-time
                user_session_issuer_id:
                    type: string
                    description: The owning user_session_issuer id.
                    format: uuid
            description: An MCP client registered against a user-session issuer. client_secret_hash is never returned.
            required:
                - id
                - user_session_issuer_id
                - client_id
                - client_name
                - redirect_uris
                - client_id_issued_at
                - created_at
                - updated_at
                - active_session_count
        UserSessionConsent:
            type: object
            properties:
                consented_at:
                    type: string
                    format: date-time
                created_at:
                    type: string
                    format: date-time
                id:
                    type: string
                    description: The user_session_consent id.
                    format: uuid
                remote_set_hash:
                    type: string
                    description: SHA-256 of the sorted list of remote_session_issuer ids on the client's owning issuer at consent time.
                subject_urn:
                    type: string
                    description: The consenting subject URN (user:<id> | apikey:<uuid> | anonymous:<mcp-session-id>).
                updated_at:
                    type: string
                    format: date-time
                user_session_client_id:
                    type: string
                    description: The user_session_client this consent binds to.
                    format: uuid
            description: A user_session_consent record. Per-client (not per-issuer) consent.
            required:
                - id
                - subject_urn
                - user_session_client_id
                - remote_set_hash
                - consented_at
                - created_at
                - updated_at
        UserSessionFacetOption:
            type: object
            properties:
                count:
                    type: integer
                    description: Number of sessions for this facet value.
                    format: int64
                display_name:
                    type: string
                    description: The label shown for the facet value.
                value:
                    type: string
                    description: The facet value used for filtering.
            required:
                - value
                - display_name
                - count
        UserSessionIssuer:
            type: object
            properties:
                authn_challenge_mode:
                    type: string
                    description: chain | interactive.
                client_id_metadata_admission_mode:
                    type: string
                    description: 'The EFFECTIVE CIMD admission policy in force for this issuer: disabled | presets | reporting | open. Always populated, so clients never have to reason about an unset state. Note ''reporting'' can be READ but not written: it is the current default for an issuer whose mode has never been configured, and it admits every spec-valid client while recording what ''presets'' would have refused. It exists so the platform can measure before switching the default to ''presets''. Set an explicit mode to opt out of it.'
                    enum:
                        - disabled
                        - presets
                        - reporting
                        - open
                created_at:
                    type: string
                    format: date-time
                id:
                    type: string
                    description: The user_session_issuer id.
                    format: uuid
                project_id:
                    type: string
                    description: The owning project id.
                    format: uuid
                session_duration_hours:
                    type: integer
                    description: Maximum issued user session lifetime, in hours.
                    format: int64
                slug:
                    type: string
                    description: Project-unique slug.
                updated_at:
                    type: string
                    format: date-time
            description: A user_session_issuer record.
            required:
                - id
                - project_id
                - slug
                - authn_challenge_mode
                - session_duration_hours
                - client_id_metadata_admission_mode
                - created_at
                - updated_at
        UserSessionIssuerCimdClient:
            type: object
            properties:
                client_id_metadata_uri:
                    type: string
                    description: The exact https URL admitted as a client_id.
                created_at:
                    type: string
                    format: date-time
                id:
                    type: string
                    description: The user_session_issuer_cimd_client id.
                    format: uuid
                project_id:
                    type: string
                    description: The owning project id.
                    format: uuid
                updated_at:
                    type: string
                    format: date-time
                user_session_issuer_id:
                    type: string
                    description: The user_session_issuer this URL is allowed on.
                    format: uuid
            description: A CIMD document URL explicitly allowed on a user_session_issuer, additive to the preset catalog.
            required:
                - id
                - project_id
                - user_session_issuer_id
                - client_id_metadata_uri
                - created_at
                - updated_at
        UserSessionUpstream:
            type: object
            properties:
                access_expires_at:
                    type: string
                    description: Upstream access-token expiry. Null when the upstream issued a non-expiring token.
                    format: date-time
                authorization_expires_at:
                    type: string
                    description: Absolute upstream authorization deadline. Unlike refresh_expires_at, exchanging a token does not extend this.
                    format: date-time
                auto_refresh:
                    type: boolean
                    description: Whether the subject opted this connection into automated keepalive.
                has_refresh_token:
                    type: boolean
                    description: Whether a refresh grant is held. Gates 'refresh now'; refresh_expires_at is insufficient because an upstream may issue a non-expiring refresh token.
                issuer_slug:
                    type: string
                    description: Display slug of the upstream provider, e.g. 'mcp.linear.app'.
                last_used_at:
                    type: string
                    description: When this upstream token was last spent on a proxied call. Same five-minute resolution as the inbound leg, so the two are directly comparable.
                    format: date-time
                refresh_expires_at:
                    type: string
                    description: Upstream refresh-token expiry. Null when the session holds no refresh token or the upstream issued a non-expiring one.
                    format: date-time
                remote_session_client_id:
                    type: string
                    description: The remote_session_client the session was minted against.
                    format: uuid
                remote_session_id:
                    type: string
                    description: The remote_session id. Target for revoke and force-refresh.
                    format: uuid
                remote_session_issuer_id:
                    type: string
                    description: The remote_session_issuer the client belongs to.
                    format: uuid
                scopes:
                    type: array
                    items:
                        type: string
                    description: Scopes held by this upstream session.
            description: An upstream remote_session held for the same subject and issuer as the user_session that carries it. Token material is never returned.
            required:
                - remote_session_id
                - remote_session_client_id
                - remote_session_issuer_id
                - issuer_slug
                - has_refresh_token
                - auto_refresh
                - scopes
        UserSummary:
            type: object
            properties:
                account_types:
                    type: array
                    items:
                        type: string
                    description: Distinct account types observed for this user ('team', 'personal')
                accounts:
                    type: array
                    items:
                        $ref: '#/components/schemas/UserAccount'
                    description: Linked AI accounts for this user (team and personal, across providers)
                avg_tokens_per_request:
                    type: number
                    description: Average tokens per chat request
                    format: double
                cache_creation_input_tokens:
                    type: integer
                    description: Sum of cache creation input tokens
                    format: int64
                cache_read_input_tokens:
                    type: integer
                    description: Sum of cache read input tokens
                    format: int64
                first_seen_unix_nano:
                    type: string
                    description: Earliest activity timestamp in Unix nanoseconds
                hook_sources:
                    type: array
                    items:
                        $ref: '#/components/schemas/HookSourceUsage'
                    description: Per-hook-source usage breakdown
                last_seen_unix_nano:
                    type: string
                    description: Latest activity timestamp in Unix nanoseconds
                tool_call_failure:
                    type: integer
                    description: Failed tool calls (4xx/5xx status)
                    format: int64
                tool_call_success:
                    type: integer
                    description: Successful tool calls (2xx status)
                    format: int64
                tools:
                    type: array
                    items:
                        $ref: '#/components/schemas/ToolUsage'
                    description: Per-tool usage breakdown
                total_chat_requests:
                    type: integer
                    description: Total number of chat completion requests
                    format: int64
                total_chats:
                    type: integer
                    description: Number of unique chat sessions
                    format: int64
                total_cost:
                    type: number
                    description: Total cost of all requests
                    format: double
                total_input_tokens:
                    type: integer
                    description: Sum of input tokens used
                    format: int64
                total_output_tokens:
                    type: integer
                    description: Sum of output tokens used
                    format: int64
                total_tokens:
                    type: integer
                    description: Sum of all tokens used
                    format: int64
                total_tool_calls:
                    type: integer
                    description: Total number of tool calls
                    format: int64
                user_email:
                    type: string
                    description: User email associated with this usage, when present
                user_id:
                    type: string
                    description: User identifier (user_id or external_user_id depending on group_by)
            description: Aggregated usage summary for a single user
            required:
                - user_id
                - user_email
                - first_seen_unix_nano
                - last_seen_unix_nano
                - total_chats
                - total_chat_requests
                - total_input_tokens
                - total_output_tokens
                - total_tokens
                - cache_read_input_tokens
                - cache_creation_input_tokens
                - total_cost
                - avg_tokens_per_request
                - total_tool_calls
                - tool_call_success
                - tool_call_failure
                - tools
                - hook_sources
        ValidateKeyOrganization:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the organization
                name:
                    type: string
                    description: The name of the organization
                slug:
                    type: string
                    description: The slug of the organization
            required:
                - id
                - name
                - slug
        ValidateKeyProject:
            type: object
            properties:
                id:
                    type: string
                    description: The ID of the project
                name:
                    type: string
                    description: The name of the project
                slug:
                    type: string
                    description: The slug of the project
            required:
                - id
                - name
                - slug
        ValidateKeyResult:
            type: object
            properties:
                organization:
                    $ref: '#/components/schemas/ValidateKeyOrganization'
                projects:
                    type: array
                    items:
                        $ref: '#/components/schemas/ValidateKeyProject'
                    description: The projects accessible with this key
                scopes:
                    type: array
                    items:
                        type: string
                    description: List of permission scopes for this key
            required:
                - organization
                - projects
                - scopes
        VerifyCimdURLResult:
            type: object
            properties:
                client_name:
                    type: string
                    description: The document's client_name, set only when verified. Lets an operator confirm the URL names the client they intended.
                detail:
                    type: string
                    description: Human-readable explanation, safe to display to the operator.
                http_status:
                    type: integer
                    description: Status the document endpoint returned; omitted when no response was received.
                    format: int64
                outcome:
                    type: string
                    description: Why the probe ended as it did.
                    enum:
                        - valid
                        - invalid_url
                        - unreachable
                        - unparseable
                        - invalid_document
                reason:
                    type: string
                    description: Stable machine label for the rule that rejected the document, e.g. client_id_mismatch. Set only for invalid_url and invalid_document.
                verified:
                    type: boolean
                    description: True when the document was fetched and passed every check the authorization server applies. A client presenting this URL will not be rejected for its document.
            description: Outcome of probing a CIMD document URL. Nothing is persisted.
            required:
                - verified
                - outcome
                - detail
        VerifyCredentialResult:
            type: object
            properties:
                detail:
                    type: string
                    description: Human-readable detail about the probe outcome, including the failure reason when it did not verify.
                principal:
                    type: string
                    description: The principal the credential resolves to — the impersonated service account.
                verified:
                    type: boolean
                    description: Whether Gram could assume the credential's identity.
            description: Result of a live probe that Gram can assume the identity the credential names.
            required:
                - verified
        VerifyKmsKeyResult:
            type: object
            properties:
                detail:
                    type: string
                    description: Human-readable detail about the probe outcome, including the failure reason when it did not verify.
                probe_outcome:
                    type: string
                    description: The machine-readable outcome of the probe.
                    enum:
                        - verified
                        - credential_deleted
                        - credential_unusable
                        - invalid_resource_name
                        - key_not_found
                        - permission_denied
                        - key_unusable
                        - unsupported_algorithm
                        - algorithm_mismatch
                        - signature_invalid
                        - unavailable
                        - unexpected
                verified:
                    type: boolean
                    description: Whether the key produced a signature that validated against its own public half.
            description: Result of a live probe that Gram can reach an external key and use it to sign.
            required:
                - verified
                - probe_outcome
        VerifyOnboardingHooksSetupResult:
            type: object
            properties:
                events:
                    type: array
                    items:
                        $ref: '#/components/schemas/OnboardingHookEvent'
                    description: Recent hook events, newest first. Truncated to a server-defined limit.
                latest_unix_nano:
                    type: string
                    description: Highest time_unix_nano in this batch. Pass back as since_unix_nano on the next poll.
                total_count:
                    type: integer
                    description: Total events received with time_unix_nano greater than since_unix_nano. May exceed len(events) when truncated.
                    format: int64
            required:
                - events
                - latest_unix_nano
                - total_count
        VerifyPlatformCredentialResult:
            type: object
            properties:
                detail:
                    type: string
                    description: Human-readable detail about the probe outcome (e.g. why the principal is unavailable, or the failure reason).
                identity_source:
                    type: string
                    description: How the identity was resolved. Lets the caller tell an in-cluster attached identity apart from local Application Default Credentials or an impersonated service account.
                    enum:
                        - metadata_server
                        - application_default_credentials
                        - impersonation
                principal:
                    type: string
                    description: The effective principal the identity resolves to (e.g. a service-account email). May be empty when the resolution source cannot report it.
                verified:
                    type: boolean
                    description: Whether the credential's identity resolved successfully.
            description: Result of a live 'who am I' probe against a platform credential's resolved identity.
            required:
                - verified
        VerifyURLForm:
            type: object
            properties:
                transport_type:
                    type: string
                    description: The transport type for the remote MCP server (e.g. streamable-http)
                url:
                    type: string
                    description: The URL of the remote MCP server to probe
                    format: uri
            description: Form for probing a remote MCP server URL
            required:
                - url
                - transport_type
        VerifyURLRequestBody:
            type: object
            properties:
                client_id_metadata_uri:
                    type: string
                    description: The https URL to probe.
            required:
                - client_id_metadata_uri
        VerifyURLResult:
            type: object
            properties:
                http_status:
                    type: integer
                    description: HTTP status code returned by the URL, if any
                    format: int64
                message:
                    type: string
                    description: Human-readable summary of the verification outcome
                verified:
                    type: boolean
                    description: Whether the URL responded in a way consistent with a remote MCP server
            description: Outcome of a remote MCP server URL verification
            required:
                - verified
                - message
        WorkOSDomainVerificationIntentOptions:
            type: object
            properties:
                domain_name:
                    type: string
                    description: Domain name to verify.
        WorkOSIntentOptions:
            type: object
            properties:
                domain_verification:
                    $ref: '#/components/schemas/WorkOSDomainVerificationIntentOptions'
                sso:
                    $ref: '#/components/schemas/WorkOSSSOIntentOptions'
        WorkOSSSOIntentOptions:
            type: object
            properties:
                bookmark_slug:
                    type: string
                    description: SSO bookmark slug to launch a specific app after authentication.
                provider_type:
                    type: string
                    description: SSO provider type to shortcut into a specific setup flow (e.g. OktaSAML, GoogleSAML).
        WorkUnitsTrendBucket:
            type: object
            properties:
                cost_per_unit:
                    type: number
                    description: Cost per unit of work. Absent when the bucket has no positive work or no cost telemetry.
                    format: double
                scored_sessions:
                    type: integer
                    description: Number of chat sessions scored by the work-units analysis in this bucket.
                    format: int64
                timestamp:
                    type: string
                    description: Start of the UTC day this bucket covers.
                    format: date-time
                tokens_per_unit:
                    type: number
                    description: Tokens per unit of work. Absent when the bucket has no positive work or no token telemetry.
                    format: double
                total_cost:
                    type: number
                    description: Total cost in USD across the bucket's scored sessions.
                    format: double
                total_tokens:
                    type: integer
                    description: Total tokens across the bucket's scored sessions.
                    format: int64
                work_units:
                    type: number
                    description: Total work units delivered across the bucket's scored sessions.
                    format: double
            required:
                - timestamp
                - scored_sessions
                - work_units
                - total_cost
                - total_tokens
        WorkUnitsTrendResult:
            type: object
            properties:
                buckets:
                    type: array
                    items:
                        $ref: '#/components/schemas/WorkUnitsTrendBucket'
                    description: One bucket per UTC day in the window, oldest first, zero-filled for days without scores.
                scores_available:
                    type: boolean
                    description: Whether any work-units scores exist in the window. False for organizations without work-units analysis.
            required:
                - scores_available
                - buckets
    securitySchemes:
        admin_auth_header_Authorization:
            type: apiKey
            description: Admin session auth for admin endpoints. Cookie-only credential; session is validated against Google on every request.
            name: Authorization
            in: header
        apikey_header_Authorization:
            type: apiKey
            description: key based auth.
            name: Authorization
            in: header
        apikey_header_Gram-Key:
            type: apiKey
            description: key based auth.
            name: Gram-Key
            in: header
        chat_sessions_token_header_Gram-Chat-Session:
            type: http
            description: Gram Chat Sessions token based auth.
            scheme: bearer
        function_token_header_Authorization:
            type: http
            description: Gram Functions token based auth.
            scheme: bearer
        project_slug_header_Gram-Project:
            type: apiKey
            description: project slug header auth.
            name: Gram-Project
            in: header
        session_header_Gram-Session:
            type: apiKey
            description: Session based auth. By cookie or header.
            name: Gram-Session
            in: header
tags:
    - name: access
      description: Manage roles, team member access control, and authorization challenge events.
    - name: admin
      description: Operations supporting admin tasks, protected by Google workspace auth.
    - name: agent
      description: Endpoints consumed by the Speakeasy device agent running on developer machines. Authenticates via an API key carrying the 'agent_user' scope — the per-user credential minted by token-exchange. An org key with the broader 'agent' scope also satisfies most of these endpoints (it implies 'agent_user'), so existing installs keep working during the transition. The content-bearing session-portability endpoints — getSessionMeta and createSessionHandoff — refuse it and require a per-user key.
    - name: aiIntegrations
      description: Manage organization-level AI provider integrations.
    - name: assets
      description: Manages assets used by Gram projects.
    - name: organizationAssets
      description: Manages organization-tier assets — files owned by an organization rather than a single project, such as remote identity provider logos.
    - name: assistantMemories
      description: Manage assistant memory records.
    - name: assistants
      description: Manage assistants and their runtime configuration.
    - name: auditlogs
      description: Manages audit logs in Gram.
    - name: auth
      description: Managed auth for gram producers and dashboard.
    - name: businessMemories
      description: Inspect and semantically search business memories.
    - name: chat
      description: Managed chats for gram AI consumers.
    - name: chatSessions
      description: Manages chat session tokens for client-side authentication
    - name: cliAuth
      description: Interactive device-agent enrollment via a PKCE one-time-code exchange. authorize (dashboard session) mints a short-lived code bound to a PKCE challenge; redeem (no auth — the code+verifier pair is the credential) exchanges it once for a per-user [agent,hooks] API key.
    - name: deployments
      description: Manages deployments of tools from upstream sources.
    - name: deviceIntegrations
      description: 'Manage organization-level device integrations: MDM inventory sources and compliance evidence sinks.'
    - name: domains
      description: Manage custom domains for gram.
    - name: environments
      description: Managing toolset environments.
    - name: externalCredentials
      description: Manage organization-level external credentials — how Gram authenticates into a customer's AWS or GCP account.
    - name: externalKeys
      description: Manage organization-level external keys — externally-managed AWS or GCP KMS keys Gram signs with.
    - name: mcpRegistries
      description: External MCP registry operations
    - name: collections
      description: MCP collection operations
    - name: functions
      description: Endpoints for working with functions.
    - name: hooksServerNames
      description: Manages display name overrides for hooks servers.
    - name: hooks
      description: Receives hook events from coding assistants for tool usage observability.
    - name: instances
      description: Consumer APIs for interacting with all relevant data for an instance of a toolset and environment.
    - name: integrations
      description: Explore third-party tools in Gram.
    - name: keys
      description: Managing system api keys.
    - name: litellm
      description: Receives LiteLLM Generic Guardrail callbacks and OpenTelemetry exports.
    - name: mcpApproval
      description: Dashboard API for reviewing and deciding MCP server approval requests.
    - name: mcpEndpoints
      description: Managing MCP endpoints, the url-friendly slug identifiers that address MCP servers.
    - name: mcpMetadata
      description: Manages metadata for the MCP install page shown to users.
    - name: mcpServers
      description: Managing MCP servers, which configure authentication, environment, and backend selection for an MCP server.
    - name: modelKeys
      description: Manage customer-supplied model provider API keys, scoped per project and responsibility slot.
    - name: organizations
      description: Organization membership, invitations, and directory.
    - name: otelForwarding
      description: Manage per-organization forwarding of inbound OTEL hook payloads to a customer-owned endpoint.
    - name: packages
      description: Manages packages in Gram.
    - name: adminAssets
      description: Platform-admin management of platform-tier assets — files shared across every organization (project_id NULL, organization_id NULL). Speakeasy-staff only; every method requires the platform-admin flag.
    - name: adminChatAnalysis
      description: Platform-admin management of an organization's chat session analysis settings. Speakeasy-staff only; every method requires the platform-admin flag.
    - name: adminExternalCredentials
      description: Platform-admin management of platform external_credentials — how Gram authenticates into a cloud provider to reach a platform KMS key. Shared across every organization (organization_id NULL, project_id NULL). Speakeasy-staff only; every method requires the platform-admin flag.
    - name: adminOpenRouterKeys
      description: Platform-admin management of per-organization platform OpenRouter keys. Speakeasy-staff only; every method requires the platform-admin flag.
    - name: platformMcp
      description: Session-authenticated onboarding and lifecycle projection for the organization-level Gram Platform MCP.
    - name: plugins
      description: Manage distributable plugin bundles of MCP servers and hooks.
    - name: features
      description: Manage product level feature controls.
    - name: projects
      description: Manages projects in Gram.
    - name: remoteMcp
      description: Managing remote MCP servers.
    - name: organizationRemoteSessionClients
      description: Manage remote_session_client records from the organization-administrator surface — clients across every project in the caller's organization. client_secret_encrypted is never returned.
    - name: remoteSessionClients
      description: Manage remote_session_client records — credentials Gram uses when acting as an OAuth client of a remote_session_issuer. client_secret_encrypted is never returned.
    - name: organizationRemoteSessionIssuers
      description: Manage organization-level remote_session_issuer records — cross-project upstream Authorization Server identity records inherited by every project in the organization.
    - name: remoteSessionIssuers
      description: Manage remote_session_issuer records — upstream Authorization Server identity records that Gram talks to as an OAuth client.
    - name: adminRemoteSessions
      description: Platform-admin management of global remote_session_issuer / remote_session_client records — shared across every organization (project_id NULL, organization_id NULL). Speakeasy-staff only; every method requires the platform-admin flag.
    - name: organizationRemoteSessions
      description: Organization-administrator visibility into remote_sessions Gram is holding on a principal's behalf, across every project in the caller's organization. access_token_encrypted and refresh_token_encrypted are never returned.
    - name: remoteSessions
      description: Operator visibility into remote_sessions Gram is holding on a principal's behalf. Read + revoke; sessions are written by /mcp/{slug}/remote_login_callback and the silent-refresh path. access_token_encrypted and refresh_token_encrypted are never returned.
    - name: resources
      description: Dashboard API for interacting with resources.
    - name: risk
      description: Manage risk analysis policies and view scan results.
    - name: skillEfficacy
      description: Manage organization-wide skill efficacy sampling settings.
    - name: skills
      description: Manage project skills and their immutable versions. Methods are gated by the skills product feature and skill read or write scopes.
    - name: spendRules
      description: Manage budget rules, view budget events, and preview actor targeting.
    - name: telemetry
      description: Fetch telemetry data for tools in Gram.
    - name: templates
      description: Manages re-usable prompt templates and higher-order tools for a project.
    - name: tokenExchange
      description: 'Device-agent token exchange: trade an org-scoped install credential (an API key with the ''agent'' scope) plus a vouched user email for a long-lived, per-user API key scoped for the device agent.'
    - name: tools
      description: Dashboard API for interacting with tools.
    - name: toolsets
      description: Managed toolsets for gram AI consumers.
    - name: triggers
      description: Manage project trigger instances and static trigger definitions.
    - name: tunneledMcp
      description: Managing customer-hosted tunneled MCP servers.
    - name: unproxiedMcp
      description: Managing unproxied MCP servers. These are vendor MCP servers that Speakeasy lists and can attach to a plugin but never proxies, so there is no OAuth callback or upstream allowlisting involved.
    - name: usage
      description: Read usage for gram.
    - name: userSessionClients
      description: Operator visibility into MCP clients registered against a user-session issuer (user_session_clients). Read + revoke. Registrations are written by /mcp/{slug}/register (RFC 7591 DCR) or resolved from a Client ID Metadata Document on /mcp/{slug}/authorize (CIMD); client_id_metadata_uri distinguishes the two.
    - name: userSessionConsents
      description: Operator visibility into user_session_consents — persistent consent records per (subject, user_session_client). List + revoke.
    - name: userSessionIssuers
      description: Manage user_session_issuer records — Gram-side authorization-server configuration that issues user sessions for an MCP server.
    - name: userSessionIssuersCimdClients
      description: 'Manage the CIMD (OAuth Client ID Metadata Document) clients a user_session_issuer admits: the read-only preset catalog Gram curates, plus per-issuer custom document URLs.'
    - name: userSessions
      description: Operator visibility into issued user_sessions. List + revoke; sessions are written by /mcp/{slug}/token.
    - name: variations
      description: Manage variations of tools.
    - name: external
      description: Endpoints for external services to interact with gram.
