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

# Rotate Webhook Secret



## OpenAPI

````yaml /openapi.json post /api-tokens/{token_id}/webhook/rotate-secret
openapi: 3.1.0
info:
  title: Slate API
  version: 1.0.0
  description: Trading infrastructure API.
servers:
  - url: https://api.{your-broker}.slate-labs.com
    variables:
      your-broker:
        default: broker
security: []
tags:
  - name: Authentication
  - name: API Tokens
  - name: Customers
  - name: Accounts
  - name: Orders
  - name: Instruments & Groups
  - name: Transactions
  - name: Payments
  - name: Transfers
  - name: Risk
  - name: Workflow & CRM
  - name: Messaging
  - name: Integrations
  - name: Webhooks
  - name: Compliance
  - name: Promo codes
  - name: Reporting
  - name: Audit
  - name: Fraud & moderation
  - name: Broker settings
  - name: Users
  - name: Roles & Teams
  - name: Streams (SSE)
  - name: Simulator
  - name: Observability
  - name: Prop trading
paths:
  /api-tokens/{token_id}/webhook/rotate-secret:
    post:
      tags:
        - API Tokens
      summary: Rotate Webhook Secret
      operationId: rotate_webhook_secret_api_tokens__token_id__webhook_rotate_secret_post
      parameters:
        - name: token_id
          in: path
          required: true
          schema:
            type: integer
            title: Token Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenWithSecretResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TokenWithSecretResponse:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        token_prefix:
          type: string
          title: Token Prefix
        token_last4:
          type: string
          title: Token Last4
        scopes:
          items:
            type: string
          type: array
          title: Scopes
        ip_allowlist:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Ip Allowlist
        rate_limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Rate Limit
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
        status:
          type: string
          enum:
            - active
            - disabled
            - revoked
            - expired
          title: Status
        created_by:
          type: string
          title: Created By
        created_at:
          type: string
          format: date-time
          title: Created At
        last_used_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Used At
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
        webhook_enabled:
          type: boolean
          title: Webhook Enabled
          default: false
        token:
          type: string
          title: Token
        webhook_secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Secret
      type: object
      required:
        - id
        - name
        - token_prefix
        - token_last4
        - scopes
        - ip_allowlist
        - rate_limit
        - expires_at
        - status
        - created_by
        - created_at
        - last_used_at
        - token
      title: TokenWithSecretResponse
      description: Returned only on creation and rotation. Contains the one-shot secret.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````