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

# Rotate transactional API key

> Generates a new API token for an existing transactional key. The old token is immediately invalidated and a new one is returned. All other configuration (name, approved domains, quota, IP restrictions) remains unchanged.



## OpenAPI

````yaml /openapi.json post /outbound/transactional-keys/rotate
openapi: 3.0.0
info:
  title: JetEmail API
  version: 1.0.0
  description: API documentation for JetEmail's transactional email service.
servers:
  - url: https://api.jetemail.com
    description: Production
security:
  - apiKeyAuth: []
externalDocs:
  description: Download OpenAPI Specification
  url: /openapi.json
paths:
  /outbound/transactional-keys/rotate:
    post:
      tags:
        - Outbound
      summary: Rotate transactional API key
      description: >-
        Generates a new API token for an existing transactional key. The old
        token is immediately invalidated and a new one is returned. All other
        configuration (name, approved domains, quota, IP restrictions) remains
        unchanged.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - api_token
              properties:
                api_token:
                  type: string
                  description: The current API token to rotate
                  example: transactional_a1b2c3d4
      responses:
        '200':
          description: Transactional key rotated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Transactional key rotated successfully
                  api_token:
                    type: string
                    description: The new API token
                    example: transactional_e5f6a7b8
        '400':
          description: Bad Request - Invalid input
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: api_token is required
        '401':
          description: Unauthorized - User not authenticated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Required information not found
        '403':
          description: Forbidden - Key cannot be rotated in its current state
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: >-
                      Cannot rotate a disabled transactional key. Enable it
                      first.
        '404':
          description: Not Found - Transactional key not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Transactional key not found or access denied
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Failed to rotate transactional key
components:
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: API key for account management endpoints. Use your api_ prefixed token.

````