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

# Rotate Token

> Rotate the access token for a vault connection.

**Required Role:** ADMIN or OWNER

**Note:** Only works for 1Password and Doppler connections.
For Infisical, delete and recreate the connection with new credentials.

Use this to update the access token without recreating the connection.
All secrets using this connection will use the new token.



## OpenAPI

````yaml POST /v1/teams/{team_id}/vault-connections/{connection_id}/rotate-token
openapi: 3.1.0
info:
  title: Data Raven API
  description: Cloud-to-cloud data transfer platform powered by RClone
  version: 0.5.0
servers: []
security: []
paths:
  /v1/teams/{team_id}/vault-connections/{connection_id}/rotate-token:
    post:
      tags:
        - Vault Connections
      summary: Rotate Vault Connection Token
      description: |-
        Rotate the access token for a vault connection.

        **Required Role:** ADMIN or OWNER

        **Note:** Only works for 1Password and Doppler connections.
        For Infisical, delete and recreate the connection with new credentials.

        Use this to update the access token without recreating the connection.
        All secrets using this connection will use the new token.
      operationId: >-
        rotate_vault_connection_token_v1_teams__team_id__vault_connections__connection_id__rotate_token_post
      parameters:
        - name: connection_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Connection Id
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VaultConnectionRotateToken'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VaultConnectionResponse'
        '400':
          description: Token rotation not supported for this connection type
        '404':
          description: Connection not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    VaultConnectionRotateToken:
      properties:
        access_token:
          type: string
          maxLength: 4096
          minLength: 1
          title: Access Token
          description: New vault access token
      type: object
      required:
        - access_token
      title: VaultConnectionRotateToken
      description: Schema for rotating vault connection access token.
    VaultConnectionResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        vault_type:
          $ref: '#/components/schemas/VaultType'
        last_verified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Verified At
        created_at:
          type: string
          format: date-time
          title: Created At
        created_by:
          type: string
          format: uuid
          title: Created By
      type: object
      required:
        - id
        - name
        - description
        - vault_type
        - last_verified_at
        - created_at
        - created_by
      title: VaultConnectionResponse
      description: Schema for vault connection response (without sensitive data).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    VaultType:
      type: string
      enum:
        - onepassword
        - doppler
        - infisical
      title: VaultType
      description: |-
        External vault provider types for credential storage.

        ONEPASSWORD: 1Password via service account SDK
        DOPPLER: Doppler secrets manager via service token
        INFISICAL: Infisical via machine identity (Universal Auth)
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````