# Verify Agent Email

Source: https://recoupable.dev/docs/api-reference/agents/verify

Verify an agent's email with the code sent during signup. Returns an API key on success.

## POST /api/agents/verify

Full OpenAPI specification: https://recoupable.dev/docs/spec/accounts.json

## Authentication

This operation's specification permits a request without authentication.

[Authentication guide](https://recoupable.dev/docs/authentication)

## Operation and referenced schemas

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Recoup API - Accounts",
    "description": "API documentation for the Recoup platform - an AI agent platform for the music industry",
    "license": {
      "name": "MIT"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.recoupable.dev"
    }
  ],
  "paths": {
    "/api/agents/verify": {
      "post": {
        "description": "Verify an agent's email with the code sent during signup. Returns an API key on success.",
        "security": [],
        "requestBody": {
          "description": "Email and verification code",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentVerifyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verification successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentVerifyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or expired verification code",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many failed verification attempts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AgentVerifyRequest": {
        "type": "object",
        "required": [
          "email",
          "code"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "description": "The email address used during signup.",
            "example": "you@example.com"
          },
          "code": {
            "type": "string",
            "minLength": 6,
            "maxLength": 6,
            "pattern": "^[0-9]{6}$",
            "description": "The 6-digit verification code sent to the email.",
            "example": "123456"
          }
        }
      },
      "AgentVerifyResponse": {
        "type": "object",
        "required": [
          "account_id",
          "api_key",
          "message"
        ],
        "properties": {
          "account_id": {
            "type": "string",
            "format": "uuid",
            "description": "The account ID for the verified agent.",
            "example": "123e4567-e89b-12d3-a456-426614174000"
          },
          "api_key": {
            "type": "string",
            "description": "API key for the verified account.",
            "example": "recoup_sk_abc123..."
          },
          "message": {
            "type": "string",
            "description": "Human-readable status message.",
            "example": "Verified"
          }
        }
      },
      "Error": {
        "required": [
          "error",
          "message"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}
```
