# Didit agent forms API

Talk to Didit sales or apply to the partner program from an AI agent. Two
endpoints replace the browser forms and both verify the email with a six-digit
code before anything is delivered.

Base URL: https://didit.me

## 1. Email a code

`POST /api/agent/v1/email-code`

```bash
curl -s https://didit.me/api/agent/v1/email-code \
  -H 'content-type: application/json' \
  -d '{"email":"ada@acme.com","form":"demo"}'
```

Response: `{ "requestId", "status", "verificationId", "expiresInSeconds": 300 }`.
The code is valid for 5 minutes. The address is risk-screened before the code is
sent, so disposable and undeliverable addresses are refused here. Use a corporate email. Free and disposable providers are rejected. If the caller has no corporate email, email hello@didit.me directly, or create an account at https://business.didit.me and ask the Didit copilot (Ask AI) inside the console.

## 2. Submit the verified request

`POST /api/agent/v1/submit`

```bash
curl -s https://didit.me/api/agent/v1/submit \
  -H 'content-type: application/json' \
  -d '{
    "form": "demo",
    "email": "ada@acme.com",
    "code": "123456",
    "fields": {
      "companyName": "Acme",
      "fullName": "Ada Lovelace",
      "jobRole": "CTO / Developer / PM",
      "volume": "1,000 – 10,000 a month",
      "products": ["kyc", "kyb"],
      "payment": "debit",
      "message": "We need KYC and KYB."
    }
  }'
```

Partner applications use the same envelope with `"form": "partner"`:

```bash
curl -s https://didit.me/api/agent/v1/submit \
  -H 'content-type: application/json' \
  -d '{
    "form": "partner",
    "email": "ada@acme.com",
    "code": "123456",
    "fields": {
      "companyName": "Acme",
      "website": "https://acme.com",
      "track": "Refer clients",
      "industries": ["Crypto", "Fintech & payments"],
      "clients": "11–50",
      "region": "Europe",
      "fullName": "Ada Lovelace",
      "phone": "+34600111222",
      "currentIdentityVendor": "None",
      "message": "We refer fintech clients."
    }
  }'
```

## Demo fields (`form: "demo"`)

Required: `companyName`, `volume`, `products`, `fullName`, `jobRole`.

Limits: `companyName`, `fullName` and `message` are at most
200, 200 and
4,000 characters.

`volume` (exact string):
- `Just testing / under 1,000 a month`
- `1,000 – 10,000 a month`
- `10,000 – 50,000 a month`
- `50,000+ a month`

`products` (one or more, at least one required):
- `kyc`
- `aml`
- `kyb`
- `transactions`
- `investigator`
- `messages`

`jobRole`:
- `Founder / CEO`
- `Risk & Fraud / Compliance`
- `CTO / Developer / PM`
- `Other`

Optional: `payment` (`debit`, `card`, `transfer`; defaults to `debit`), `message` and
`intent` (the page or plan the lead came from, at most 64 characters,
e.g. `product-aml` or `pricing-enterprise`).

## Partner fields (`form: "partner"`)

Required: `companyName`, `industries`, `clients`, `region`, `fullName`.

Limits: `companyName`, `fullName`, `website`, `phone`, `currentIdentityVendor` and
`message` are at most 200,
200, 2,048,
50, 200 and
4,000 characters.

`track` (optional, defaults to `Refer clients`):
- `Refer clients`
- `Resell Didit`
- `Build Didit into our platform`
- `Implement Didit for clients`
- `Join the KYC network`
- `Investor or accelerator`
- `Not sure yet`

`industries` (one or more):
- `iGaming`
- `Crypto`
- `Fintech & payments`
- `Lending`
- `Marketplaces`
- `Telecom`
- `Other`

`clients`:
- `1–10`
- `11–50`
- `51–200`
- `201+`
- `We are the platform`

`region`:
- `Europe`
- `Latin America`
- `North America`
- `Middle East and Africa`
- `Asia-Pacific`
- `Global`

Optional: `website`, `phone` (international format), `currentIdentityVendor`, `intent` (the page or
track the application came from, e.g. `partner-refer`) and `message` (sent as `firstOpportunity`).

## Errors

Every error is JSON: `{ "requestId", "code", "message" }`, and validation errors add the offending `details.field`.

- `400 ERR_VALIDATION` / `ERR_VALIDATION_FIELD`: bad body or field. The message names the field.
- `400 ERR_EMAIL_INVALID` / `ERR_EMAIL_NON_BUSINESS`: the corporate-email rule above.
- `400 ERR_CODE_INCORRECT`: wrong code; a few attempts remain.
- `403 ERR_CODE_DECLINED`: too many wrong codes; request a new code.
- `403 ERR_EMAIL_DISPOSABLE` / `ERR_EMAIL_UNDELIVERABLE` / `ERR_EMAIL_BREACHED`: the address failed the email policy.
- `410 ERR_CODE_EXPIRED`: the code expired or was already used. Request a new code.
- `413 ERR_PAYLOAD_TOO_LARGE`, `415 ERR_UNSUPPORTED_MEDIA_TYPE`, `429 ERR_RATE_LIMITED`.
- `502` / `503` with `retryable: true`: the request was not delivered. Request a new
  code and resubmit the same fields.
- `409 ERR_SUBMISSION_CONFLICT`, `502` / `503` with `ERR_EFFECT_UNKNOWN`,
  `ERR_CRM_DELIVERY_PERMANENT` or any other non-retryable delivery code: do NOT
  resubmit. The request may already have been received, and a new code starts a new
  submission that can duplicate the lead. Email hello@didit.me quoting the
  `requestId` from the error response.

## Retries and idempotency

One code is one lead. Didit finalises the challenge on the first successful
check, so replaying the same code returns `410 ERR_CODE_EXPIRED` and never
creates a second lead. A code is consumed once the check succeeds, so what to do
after a later failure depends on the outcome:

- Failure before delivery started, or an explicitly retryable delivery failure
  (`retryable: true`): request a new code and resubmit the same fields.
- An unknown or possibly-recorded outcome (`ERR_EFFECT_UNKNOWN`,
  `ERR_CRM_DELIVERY_PERMANENT`, `ERR_SUBMISSION_CONFLICT` or any other
  non-retryable delivery code): do NOT resubmit. The request may already have
  been received, and a fresh code starts a new submission that can duplicate the
  lead. Email hello@didit.me quoting the `requestId` from the error response.

Send `Content-Type: application/json`; the API answers CORS preflights for browser
agents and sets `Cache-Control: no-store`.

The machine-readable contract is at /api/agent/v1/openapi.json.
