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

# Issue an API key

> The full key is returned once. A gateway can have at most 5 active keys.

The full key is in the response once. See [Rotating a key](https://docs.paywire.xyz/guides/authentication.md#rotating-a-key).


## OpenAPI

````yaml POST /payments/merchants/me/api-keys
openapi: 3.1.0
info:
  title: Paywire API
  version: 1.0.0
  description: >-
    Accept crypto payments: create payment links, follow orders, receive signed
    webhooks.
servers:
  - url: https://api.staging.paywire.xyz
    description: Staging (testnets)
security:
  - apiKey: []
tags:
  - name: Payment links
  - name: Orders
  - name: Account
  - name: Webhooks
paths:
  /payments/merchants/me/api-keys:
    post:
      tags:
        - Account
      summary: Issue an API key
      description: The full key is returned once. A gateway can have at most 5 active keys.
      operationId: issueApiKey
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                label:
                  type:
                    - string
                    - 'null'
                  description: A name to recognise the key by.
            example:
              label: production 2026-10
      responses:
        '201':
          description: The new key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssuedApiKey'
              example:
                merchantId: 0193a0b1-2c3d-7e4f-8a9b-0c1d2e3f4a5b
                keyId: 0193a0d2-1a2b-7c3d-8e4f-5a6b7c8d9e0f
                apiKey: w3g_9Qr4...full-key-shown-once
                prefix: w3g_9Qr4
        '409':
          description: Too many keys.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                title: Merchant.TooManyKeys
                status: 409
                detail: >-
                  A merchant can have at most 5 active API keys; revoke one
                  first.
components:
  schemas:
    IssuedApiKey:
      type: object
      properties:
        merchantId:
          type: string
          format: uuid
        keyId:
          type: string
          format: uuid
        apiKey:
          type: string
          description: The full key. Shown once.
        prefix:
          type: string
    Problem:
      type: object
      description: RFC 7807 problem details. `title` is a stable error code.
      properties:
        type:
          type: string
        title:
          type: string
          example: PaymentLink.NotFound
        status:
          type: integer
        detail:
          type: string
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Your gateway's API key (`w3g_...`).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.