> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuraltrust.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs cover three products: TrustGate (AI agent gateway), TrustGuard (runtime security), and TrustTest (AI red teaming). Start from each product overview for the definition and How it works. Prefer the .md URL next to a page in /llms.txt when you need the full article. Use /llms-full.txt for a single-file dump of the site.

# Revoke a subject's default-IdP sessions

> Revokes the subject's default identity provider sessions for this gateway. The call writes a durable revocation into the config-sync snapshot (session_revocations) before it deletes local refresh records. Hybrid, self-hosted, and other customer-run data planes apply that revocation only after they run a TrustGate build that reads session revocations from the config sync (post-#1142). A data plane from before that build ignores the new snapshot field and keeps serving. The control plane can be upgraded first; the revocation takes effect on a plane when that plane is upgraded, if the upgrade comes within 30 days of the revocation (or MCP_DEFAULT_IDP_SESSION_MAX_AGE, if longer). After that, revoke the subject again once the plane runs the new build. An access token already issued keeps working until it expires. revoked is the number of refresh records deleted on the process that handled the call. Zero means this process had none, which is still success. If the durable write fails, the call returns 500 and does not delete those records. A service credential is refused. A user id that is empty or not a plain identifier returns 422.



## OpenAPI

````yaml /trustgate/api/openapi.json delete /v1/gateways/{gateway_id}/subjects/{user_id}/sessions
openapi: 3.0.0
info:
  description: >-
    Administrative API for managing gateways and their registries, policies,
    consumers and auth credentials.
  title: TrustGate Admin API
  contact:
    name: NeuralTrust
    url: https://neuraltrust.ai/contact
    email: support@neuraltrust.ai
  version: '1.0'
servers:
  - url: /
security: []
paths:
  /v1/gateways/{gateway_id}/subjects/{user_id}/sessions:
    delete:
      tags:
        - auths
      summary: Revoke a subject's default-IdP sessions
      description: >-
        Revokes the subject's default identity provider sessions for this
        gateway. The call writes a durable revocation into the config-sync
        snapshot (session_revocations) before it deletes local refresh records.
        Hybrid, self-hosted, and other customer-run data planes apply that
        revocation only after they run a TrustGate build that reads session
        revocations from the config sync (post-#1142). A data plane from before
        that build ignores the new snapshot field and keeps serving. The control
        plane can be upgraded first; the revocation takes effect on a plane when
        that plane is upgraded, if the upgrade comes within 30 days of the
        revocation (or MCP_DEFAULT_IDP_SESSION_MAX_AGE, if longer). After that,
        revoke the subject again once the plane runs the new build. An access
        token already issued keeps working until it expires. revoked is the
        number of refresh records deleted on the process that handled the call.
        Zero means this process had none, which is still success. If the durable
        write fails, the call returns 500 and does not delete those records. A
        service credential is refused. A user id that is empty or not a plain
        identifier returns 422.
      parameters:
        - description: Gateway id
          name: gateway_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - description: Platform user id (session subject)
          name: user_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth.SubjectSessionsResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody
      security:
        - BearerAuth: []
components:
  schemas:
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_auth.SubjectSessionsResponse:
      type: object
      properties:
        revoked:
          description: >-
            Refresh records deleted on the process that handled the call. Zero
            means this process had none for the subject; that is still success.
          type: integer
    github_com_NeuralTrust_TrustGate_pkg_api_handler_http_httpio.ErrorBody:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
  securitySchemes:
    BearerAuth:
      type: apiKey
      name: Authorization
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.