# Issue a client API key (/docs/api-reference/reseller-clients/issueChildApiKey)

> Issue a named API key for a user in one of your client organizations. The secret is in this response only, so store it now. No listing shows it again. To rotate a key, issue a new one, switch the integration to it, then revoke the old one.

> **Reseller accounts only.** [Request access](https://omnidim.io/contact-us?reason=reseller_api&lock=1).

**POST** `/reseller/users/api-keys`

Issue a named API key for a user in one of your client organizations.
The secret is in this response only, so store it now. No listing shows
it again. To rotate a key, issue a new one, switch the integration to
it, then revoke the old one.

```yaml
operationId: issueChildApiKey
requestBody:
  required: true
  content:
    application/json:
      schema:
        type: object
        required:
          - user_id
          - name
        properties:
          user_id:
            type: integer
            description: ID of the client user who will own the key.
          name:
            type: string
            description: A name for the key. Must be unique among that user's keys.
      example:
        user_id: 1234
        name: n8n
responses:
  '200':
    description: Key issued.
    content:
      application/json:
        schema:
          type: object
          properties:
            success:
              type: boolean
            user_id:
              type: integer
            api_key_id:
              type: integer
            name:
              type: string
            api_key:
              type: string
              description: The secret. Shown only in this response.
          example:
            success: true
            user_id: 1234
            api_key_id: 88
            name: n8n
            api_key: YOUR_NEW_KEY
  '400':
    description: The name is missing, or the user already has a key with this name.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: |
                Stable, specific reason. Present on the newer endpoints (Voice
                cloning, WhatsApp); older endpoints return only `error`.
            request_id:
              type: string
              description: |
                Correlates this response with the server log. Present alongside
                `code`. Also sent as the `X-Request-Id` header.
  '403':
    description: Your key is not a reseller owner or admin key, or the user's account is blocked.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: |
                Stable, specific reason. Present on the newer endpoints (Voice
                cloning, WhatsApp); older endpoints return only `error`.
            request_id:
              type: string
              description: |
                Correlates this response with the server log. Present alongside
                `code`. Also sent as the `X-Request-Id` header.
  '404':
    description: The user is not in one of your client organizations.
    content:
      application/json:
        schema:
          type: object
          properties:
            error:
              type: string
              description: Machine-readable error code.
            error_description:
              type: string
              description: Human-readable explanation.
            code:
              type: string
              description: |
                Stable, specific reason. Present on the newer endpoints (Voice
                cloning, WhatsApp); older endpoints return only `error`.
            request_id:
              type: string
              description: |
                Correlates this response with the server log. Present alongside
                `code`. Also sent as the `X-Request-Id` header.
```

**cURL**

```shell
curl -X POST https://omnidim.io/api/v1/reseller/users/api-keys \
  -H "Authorization: Bearer $OMNIDIM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"user_id": 1234, "name": "n8n"}'
```

**curl**

```bash
curl -X POST "https://backend.omnidim.io/api/v1/reseller/users/api-keys" \
  -H "Authorization: Bearer $OMNIDIM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "user_id": 1234,
  "name": "n8n"
}'
```