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

# Rotate the API key

> Mints a fresh key + secret and returns the plaintext EXACTLY ONCE. The previous key stops working immediately. ORG_ADMIN only.



## OpenAPI

````yaml /api-reference/openapi.json post /organizations/me/api-key/rotate
openapi: 3.1.0
info:
  title: MicroCrop Partner API
  version: 1.0.0
  description: >-
    Parametric crop & livestock insurance API for integrating partners. All
    requests authenticate with an organization API key in the `x-api-key`
    header.
servers:
  - url: https://app.microcrop.app/api
    description: Production (Base mainnet)
security:
  - apiKey: []
tags:
  - name: Farmers
  - name: Plots
  - name: Herds
  - name: Policies
  - name: Payments
  - name: Payouts
  - name: Organization
  - name: Determinations
paths:
  /organizations/me/api-key/rotate:
    post:
      tags:
        - Organization
      summary: Rotate the API key
      description: >-
        Mints a fresh key + secret and returns the plaintext EXACTLY ONCE. The
        previous key stops working immediately. ORG_ADMIN only.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      apiKey:
                        type: string
                      apiSecret:
                        type: string
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````