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

# Rotate Access Key



## OpenAPI

````yaml put /v1/aggregators/{raast-aggregator-id}/keys/{access-key-id}/rotate
openapi: 3.1.0
info:
  title: Raast Wire
  version: 1.0.0
  description: ''
servers:
  - url: https://api.getsafepay.com/raastwire
security: []
tags:
  - name: Aggregators
  - name: Access Keys
  - name: Merchants
  - name: Raast Merchants
  - name: Payments
  - name: Refunds
  - name: QRs
  - name: Utilities
  - name: Aliases
  - name: Ledgers
  - name: Webhooks
paths:
  /v1/aggregators/{raast-aggregator-id}/keys/{access-key-id}/rotate:
    put:
      tags:
        - Access Keys
      summary: Rotate Access Key
      parameters:
        - $ref: '#/components/parameters/AggregatorIdParam'
        - $ref: '#/components/parameters/AccessKeyIdParam'
      responses:
        '200':
          $ref: '#/components/responses/RotateAccessKeyResponse'
      security:
        - apiKey: []
components:
  parameters:
    AggregatorIdParam:
      name: raast-aggregator-id
      in: path
      required: true
      schema:
        type: string
        example: agg_2288490a-2176-4de5-b373-0ffb6f8e2e6e
      description: The unique identifier for the aggregator
    AccessKeyIdParam:
      name: access-key-id
      in: path
      required: true
      schema:
        type: string
        example: ak_da8f1c10-346a-4be8-895a-b6187a9a9662
      description: The unique identifier for the access key
  responses:
    RotateAccessKeyResponse:
      description: This response contains details of an access key
      headers:
        Content-Length:
          $ref: '#/components/headers/ContentLengthHeader'
        Date:
          $ref: '#/components/headers/DateHeader'
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/StandardResponse'
              - type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AccessKey'
  headers:
    ContentLengthHeader:
      schema:
        type: string
        example: '256'
    DateHeader:
      schema:
        type: string
        example: Sat, 12 Aug 2023 08:55:04 GMT
  schemas:
    StandardResponse:
      type: object
      description: Standard response structure for successful operations
      properties:
        api_version:
          type: string
          example: v1
          description: The current version of the API spec
        data:
          type: object
          description: Contains the response data
    AccessKey:
      type: object
      description: Access key credential used to authenticate aggregator API requests
      properties:
        id:
          type: string
          description: Internal identifier for the access key
          example: ak_da8f1c10-346a-4be8-895a-b6187a9a9662
        token:
          type: string
          description: Public token that represents the access key
          example: ak_tok_fede37a6
        key_id:
          type: string
          description: External identifier for the key exposed to clients
          example: key_live_e111f1c10
        aggregator_id:
          type: string
          description: Aggregator identifier that owns the access key
          example: agg_2288490a-2176-4de5-b373-0ffb6f8e2e6e
        is_active:
          type: boolean
          description: Indicates whether the key can be used for authentication
          example: true
        name:
          type: string
          description: Friendly label assigned to the access key
          example: Primary Production Key
        secret:
          type: string
          description: >-
            Secret value issued for the key; only returned on creation or
            rotation
          example: sk_live_uMPN7cX2b1
        created_at:
          description: Timestamp indicating when the key was provisioned
          allOf:
            - $ref: '#/components/schemas/Timestamp'
        updated_at:
          description: Timestamp indicating the last update applied to the key
          allOf:
            - $ref: '#/components/schemas/Timestamp'
    Timestamp:
      type: string
      format: date-time
      description: ISO 8601 timestamp in UTC
      example: '2025-03-13T09:12:34.000Z'
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-SFPY-AGGREGATOR-SECRET-KEY
      in: header

````