{
  "openapi": "3.1.0",
  "info": {
    "title": "AgentsVerify Customer API",
    "description": "Authenticated asynchronous email verification. Submit a CSV, then poll its saved result. Unknown results cost zero credits.\n\nRead the [verification workflow](https://docs.agentsverify.dev/guides/verification-workflow) for upload, progress, results, credits and recovery guidance.",
    "termsOfService": "https://agentsverify.dev/terms",
    "contact": {
      "name": "Simon",
      "email": "simon@agentsverify.net"
    },
    "version": "0.1.0"
  },
  "servers": [
    {
      "url": "https://api.agentsverify.dev"
    }
  ],
  "paths": {
    "/v1/credits": {
      "get": {
        "tags": [
          "Credits"
        ],
        "summary": "Read available credits",
        "operationId": "credits_v1_credits_get",
        "responses": {
          "200": {
            "description": "Current available workspace balance; not a reservation",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "credits": {
                      "type": "integer",
                      "minimum": 0.0
                    }
                  },
                  "additionalProperties": false,
                  "type": "object",
                  "required": [
                    "credits"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Fix authentication before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "429": {
            "description": "Wait for Retry-After and retry the same request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "503": {
            "description": "Wait for Retry-After and retry the same request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ],
        "x-audience": "customer"
      }
    },
    "/v1/verifications": {
      "post": {
        "tags": [
          "Verifications"
        ],
        "summary": "Create or recover one CSV verification",
        "description": "No request body. SDK/dashboard compute the file length automatically. Transfer CSV bytes to upload.url using PUT, without API credentials. Storage enforces that exact length and the configured maximum; backend validation then starts automatically. CSV requires one column, an arbitrary optional first-record header, and syntactically valid email addresses in every subsequent record. Any defect rejects the complete file before checks or credits. Reuse the same UUID Idempotency-Key when retrying this creation request.",
        "operationId": "create_v1_verifications_post",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Idempotency-Key"
            }
          },
          {
            "name": "X-Upload-Content-Length",
            "in": "header",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "title": "X-Upload-Content-Length"
            }
          },
          {
            "name": "X-Upload-Filename",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 1024
                },
                {
                  "type": "null"
                }
              ],
              "title": "X-Upload-Filename"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                }
              }
            }
          },
          "401": {
            "description": "Fix authentication before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "403": {
            "description": "Request is not permitted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "404": {
            "description": "Verification not found or inaccessible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "409": {
            "description": "Resolve the stated request conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "413": {
            "description": "CSV exceeds the configured limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "422": {
            "description": "Fix the stated request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "429": {
            "description": "Wait for Retry-After and retry the same request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "503": {
            "description": "Wait for Retry-After and retry the same request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "200": {
            "description": "Recovered existing verification",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                }
              }
            }
          }
        },
        "x-audience": "customer"
      },
      "get": {
        "tags": [
          "Verifications"
        ],
        "summary": "List saved verifications",
        "operationId": "history_v1_verifications_get",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 512
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cursor"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "single",
                    "bulk"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Kind"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/History"
                }
              }
            }
          },
          "401": {
            "description": "Fix authentication before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "403": {
            "description": "Request is not permitted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "404": {
            "description": "Verification not found or inaccessible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "409": {
            "description": "Resolve the stated request conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "413": {
            "description": "CSV exceeds the configured limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "422": {
            "description": "Fix the stated request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "429": {
            "description": "Wait for Retry-After and retry the same request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "503": {
            "description": "Wait for Retry-After and retry the same request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          }
        },
        "x-audience": "customer"
      }
    },
    "/v1/verifications/{id}": {
      "get": {
        "tags": [
          "Verifications"
        ],
        "summary": "Read verification progress",
        "operationId": "get_v1_verifications__id__get",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Detail"
                }
              }
            }
          },
          "401": {
            "description": "Fix authentication before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "403": {
            "description": "Request is not permitted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "404": {
            "description": "Verification not found or inaccessible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "409": {
            "description": "Resolve the stated request conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "413": {
            "description": "CSV exceeds the configured limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "422": {
            "description": "Fix the stated request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "429": {
            "description": "Wait for Retry-After and retry the same request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "503": {
            "description": "Wait for Retry-After and retry the same request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          }
        },
        "x-audience": "customer"
      }
    },
    "/v1/verifications/{id}/results": {
      "get": {
        "tags": [
          "Verifications"
        ],
        "summary": "Download available finalized results",
        "operationId": "results_v1_verifications__id__results_get",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Finite CSV of available final outcomes; header-only if none. Columns: email,result,message,checked_at. Values: valid,invalid,catch_all,unknown,error. Unchecked cancelled addresses are excluded.",
            "content": {
              "text/csv": {}
            }
          },
          "401": {
            "description": "Fix authentication before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "403": {
            "description": "Request is not permitted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "404": {
            "description": "Verification not found or inaccessible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "409": {
            "description": "Resolve the stated request conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "413": {
            "description": "CSV exceeds the configured limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "422": {
            "description": "Fix the stated request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "429": {
            "description": "Wait for Retry-After and retry the same request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "503": {
            "description": "Wait for Retry-After and retry the same request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          }
        },
        "x-audience": "customer"
      }
    },
    "/v1/verifications/{id}/cancel": {
      "post": {
        "tags": [
          "Verifications"
        ],
        "summary": "Cancel remaining work",
        "operationId": "cancel_v1_verifications__id__cancel_post",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cancellation"
                }
              }
            }
          },
          "401": {
            "description": "Fix authentication before retrying",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "403": {
            "description": "Request is not permitted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "404": {
            "description": "Verification not found or inaccessible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "409": {
            "description": "Resolve the stated request conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "413": {
            "description": "CSV exceeds the configured limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "422": {
            "description": "Fix the stated request parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "429": {
            "description": "Wait for Retry-After and retry the same request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "503": {
            "description": "Wait for Retry-After and retry the same request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            }
          },
          "202": {
            "description": "Outstanding work is settling/refunding automatically",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cancellation"
                }
              }
            }
          }
        },
        "x-audience": "customer"
      }
    }
  },
  "components": {
    "schemas": {
      "APIError": {
        "properties": {
          "issue": {
            "$ref": "#/components/schemas/Issue"
          },
          "request_id": {
            "type": "string",
            "format": "uuid",
            "title": "Request Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "issue",
          "request_id"
        ],
        "title": "APIError"
      },
      "Cancellation": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "uploading",
              "preparing",
              "verifying",
              "waiting",
              "cancelling",
              "completed",
              "completed_with_errors",
              "cancelled",
              "failed"
            ],
            "title": "Status"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "title": "Cancellation"
      },
      "Detail": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filename"
          },
          "submission_kind": {
            "type": "string",
            "enum": [
              "single",
              "bulk"
            ],
            "title": "Submission Kind"
          },
          "single_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Single Email"
          },
          "outcome": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "valid",
                  "invalid",
                  "catch_all",
                  "unknown",
                  "error"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Outcome",
            "description": "Final single-email outcome, including operational errors. Null for bulk or unfinished checks."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At",
            "description": "Canonical time input processing, all address outcomes/cancellations and credit settlement finished. Null while unfinished or for historical jobs without a recorded timestamp. Excludes notification delivery and archival."
          },
          "status": {
            "type": "string",
            "enum": [
              "uploading",
              "preparing",
              "verifying",
              "waiting",
              "cancelling",
              "completed",
              "completed_with_errors",
              "cancelled",
              "failed"
            ],
            "title": "Status"
          },
          "progress": {
            "$ref": "#/components/schemas/Progress"
          },
          "input": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Input"
              },
              {
                "type": "null"
              }
            ]
          },
          "issue": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Issue"
              },
              {
                "type": "null"
              }
            ]
          },
          "upload": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Upload"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "filename",
          "submission_kind",
          "single_email",
          "outcome",
          "created_at",
          "completed_at",
          "status",
          "progress",
          "input"
        ],
        "title": "Detail"
      },
      "History": {
        "properties": {
          "verifications": {
            "items": {
              "$ref": "#/components/schemas/Summary"
            },
            "type": "array",
            "title": "Verifications"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor"
          },
          "limits": {
            "$ref": "#/components/schemas/Limits"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "verifications",
          "next_cursor",
          "limits"
        ],
        "title": "History"
      },
      "Input": {
        "properties": {
          "rows": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Rows"
          },
          "duplicates": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Duplicates"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "rows",
          "duplicates"
        ],
        "title": "Input"
      },
      "Issue": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "row": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Row"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "title": "Issue"
      },
      "Limits": {
        "properties": {
          "max_file_bytes": {
            "type": "integer",
            "title": "Max File Bytes"
          },
          "max_rows": {
            "type": "integer",
            "title": "Max Rows"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "max_file_bytes",
          "max_rows"
        ],
        "title": "Limits"
      },
      "Progress": {
        "properties": {
          "total": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Total"
          },
          "completed": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Completed"
          },
          "errors": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Errors"
          },
          "cancelled": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Cancelled"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "total",
          "completed",
          "errors",
          "cancelled"
        ],
        "title": "Progress"
      },
      "Receipt": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "uploading",
              "preparing",
              "verifying",
              "waiting",
              "cancelling",
              "completed",
              "completed_with_errors",
              "cancelled",
              "failed"
            ],
            "title": "Status"
          },
          "upload": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Upload"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "title": "Receipt"
      },
      "Summary": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filename"
          },
          "submission_kind": {
            "type": "string",
            "enum": [
              "single",
              "bulk"
            ],
            "title": "Submission Kind"
          },
          "single_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Single Email"
          },
          "outcome": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "valid",
                  "invalid",
                  "catch_all",
                  "unknown",
                  "error"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Outcome",
            "description": "Final single-email outcome, including operational errors. Null for bulk or unfinished checks."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At",
            "description": "Canonical time input processing, all address outcomes/cancellations and credit settlement finished. Null while unfinished or for historical jobs without a recorded timestamp. Excludes notification delivery and archival."
          },
          "status": {
            "type": "string",
            "enum": [
              "uploading",
              "preparing",
              "verifying",
              "waiting",
              "cancelling",
              "completed",
              "completed_with_errors",
              "cancelled",
              "failed"
            ],
            "title": "Status"
          },
          "progress": {
            "$ref": "#/components/schemas/Progress"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "filename",
          "submission_kind",
          "single_email",
          "outcome",
          "created_at",
          "completed_at",
          "status",
          "progress"
        ],
        "title": "Summary"
      },
      "Upload": {
        "properties": {
          "method": {
            "type": "string",
            "const": "PUT",
            "title": "Method",
            "default": "PUT"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "url",
          "expires_at"
        ],
        "title": "Upload"
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  }
}
