# Verify an emailed code and reissue (rotate) the API key — shown once (/docs/api-reference/v1/api_keys/reissue/post)

`POST https://api.viralquery.com/v1/api_keys/reissue`

Verify an emailed code and reissue (rotate) the API key — shown once

Operation ID: `reissue`

OpenAPI document: https://viralquery.com/openapi.json

## Authentication

Public endpoint; no bearer token is required.

## Request

### Request body — application/json (required)

```json
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "format": "email"
    },
    "code": {
      "type": "string",
      "minLength": 4,
      "maxLength": 10
    }
  },
  "required": [
    "email",
    "code"
  ],
  "additionalProperties": false
}
```

## Responses

### `200` — OK

**application/json**

```json
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "completed"
          ]
        },
        "apiKey": {
          "type": "string"
        }
      },
      "required": [
        "status",
        "apiKey"
      ]
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "invalid_code"
          ]
        }
      },
      "required": [
        "status"
      ]
    },
    {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "rate_limited"
          ]
        }
      },
      "required": [
        "status"
      ]
    }
  ]
}
```

### `400` — Invalid request (input failed validation)

**application/json**

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "enum": [
        "invalid_request"
      ],
      "description": "Stable machine-readable error code."
    },
    "message": {
      "type": "string",
      "description": "Human-readable summary."
    },
    "issues": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "path",
          "message"
        ]
      },
      "description": "First-class Zod validation issues (path + message), not a stringified blob."
    }
  },
  "required": [
    "error",
    "message",
    "issues"
  ]
}
```

### `409` — Conflict or operation error

**application/json**

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "enum": [
        "operation_error"
      ]
    },
    "message": {
      "type": "string",
      "description": "The operation failed while handling the request."
    }
  },
  "required": [
    "error",
    "message"
  ]
}
```

### `429` — Too Many Requests (rate limited)

**application/json**

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "enum": [
        "rate_limited"
      ]
    },
    "message": {
      "type": "string"
    },
    "retryAfter": {
      "type": "number",
      "description": "Seconds to wait before retrying (mirrors the Retry-After header)."
    }
  },
  "required": [
    "error",
    "message",
    "retryAfter"
  ]
}
```