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

# Invalidate User's Embed Token

> Invalidate compact and exchanged tokens. For a linked-organization viewer, organization_id rotates only that viewer relationship. A partner-provisioned user retains user-wide signing authority even when organization_id selects a team; those responses declare rotation_scope=user.




## OpenAPI

````yaml /openapi.yaml delete /users/{external_id}/embed-token
openapi: 3.0.0
info:
  title: Answering Agent API
  description: API for Answering Agent platform
  version: 1.0.0
servers:
  - url: https://answeringagent.com/api/v1
    description: Production API
  - url: https://playground.answeringagent.com/api/v1
    description: Playground API
security: []
paths:
  /users/{external_id}/embed-token:
    delete:
      tags:
        - Embed Tokens
      summary: Invalidate User's Embed Token
      description: >
        Invalidate compact and exchanged tokens. For a linked-organization
        viewer, organization_id rotates only that viewer relationship. A
        partner-provisioned user retains user-wide signing authority even when
        organization_id selects a team; those responses declare
        rotation_scope=user.
      operationId: invalidateUserEmbedToken
      parameters:
        - in: path
          name: external_id
          required: true
          schema:
            type: string
          description: The external ID of the user
        - $ref: '#/components/parameters/EmbedOrganizationId'
      responses:
        '200':
          description: Embed token invalidated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  user_id:
                    type: string
                    description: The external ID of the user
                    example: customer_123
                  organization_id:
                    type: integer
                    nullable: true
                    description: >-
                      Present when one scoped viewer relationship was
                      invalidated
                    example: 123
                  message:
                    type: string
                    example: Embed token invalidated successfully
                  rotation_scope:
                    type: string
                    enum:
                      - user
                    description: >-
                      Present when invalidation rotates signing authority for
                      every provisioned organization of the user
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: User not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: User not found
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - ApiKeyAuth: []
components:
  parameters:
    EmbedOrganizationId:
      in: query
      name: organization_id
      required: false
      schema:
        type: integer
        minimum: 1
      description: >
        Selects one organization context. Required when the user can access more
        than one eligible context, and recommended for every scoped viewer
        request.
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: API key is required
                enum:
                  - API key is required
                  - Invalid credentials
    ValidationError:
      description: Validation failed.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              errors:
                type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````