NEW

Create disposable email + password identity pairs for AI agents. Automate sign-ups, extract verification codes, and long-poll for incoming messages. Requires Pro or Business plan.

POST/api/agent/identities
API Key

Create a new agent identity with an auto-generated email address and password. By default, a new inbox is created. Pass an existing inboxId to attach the identity to an existing inbox instead. The password is encrypted and can be retrieved later via the list or get endpoints.

Request Body

FieldTypeRequiredDescription
inboxIdstringNoAttach identity to an existing inbox instead of creating a new one. The inbox must be active and not already have an identity.
ttlMinutesnumberNoInbox lifetime in minutes (1-1440, default: 30). Ignored when inboxId is provided.
prefixstringNoEmail prefix (lowercase alphanumeric, max 20 chars). Ignored when inboxId is provided.
domainstringNoEmail domain. Defaults to your primary domain. Ignored when inboxId is provided.
labelstringNoHuman-readable label (e.g. 'twitter-signup')
passwordLengthnumberNoPassword length (8-64, default: 16)
personabooleanNoGenerate a fictional persona (name, address, phone, DOB). Pro/Business only.
countrystringNoISO country code for persona (US, UK, AU, CA, DE, FR, JP, BR, IN, ES, IT, NL, KR, MX, SE, PL, NZ). Random if omitted.
genderstringNoPersona gender: 'male' or 'female'. Random if omitted.
Example Requestjson
{
  "ttlMinutes": 30,
  "prefix": "agent",
  "label": "twitter-signup",
  "passwordLength": 16,
  "persona": true,
  "country": "US",
  "gender": "female"
}

Response 201

FieldTypeDescription
idstringIdentity ID
emailstringGenerated email address
passwordstringGenerated password (retrievable via list/get endpoints)
inboxIdstringAssociated inbox ID
expiresAtstringISO-8601 inbox expiry timestamp
ttlMinutesnumberConfigured TTL
labelstring | nullIdentity label
personaobject | nullGenerated persona with firstName, lastName, fullName, gender, country, username, dateOfBirth, address, and phone. Null when not requested.
Example Responsejson
{
  "id": "ai_Kp9xMn2qLr4vTt7bYw3cZ",
  "email": "agentx7k4@748392.best",
  "password": "Kx9#mL2pQr4!vB7w",
  "inboxId": "ibx_Yh8wNm5tRp2qKs6fVd4eX",
  "expiresAt": "2025-02-01T12:30:00.000Z",
  "ttlMinutes": 30,
  "label": "twitter-signup",
  "persona": {
    "firstName": "Jessica",
    "lastName": "Martinez",
    "fullName": "Jessica Martinez",
    "gender": "female",
    "country": "US",
    "username": "jessica_martinez_91",
    "dateOfBirth": "1991-06-14",
    "address": {
      "street": "4721 Oak Street",
      "city": "Austin",
      "state": "TX",
      "zip": "78701",
      "formatted": "4721 Oak Street, Austin, TX 78701"
    },
    "phone": "+1 555-482-7365"
  }
}

Errors

StatusMessage
403Agent identities require a Pro or Business plan
404Inbox not found (when inboxId is invalid or not owned by you)
409This inbox already has an agent identity attached
429Maximum 10 active agent identities allowed
429Inbox limit reached

Code Examples

curl -X POST https://destroy.network/api/agent/identities \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"ttlMinutes": 30, "prefix": "agent", "label": "twitter-signup"}'
GET/api/agent/identities
API Key

List all agent identities for the authenticated user, including expired ones. Passwords are decrypted server-side for the authenticated owner.

Response 200

Example Responsejson
{
  "identities": [
    {
      "id": "ai_Kp9xMn2qLr4vTt7bYw3cZ",
      "email": "agentx7k4@748392.best",
      "password": "Kx9#mL2pQr4!vB7w",
      "inboxId": "ibx_Yh8wNm5tRp2qKs6fVd4eX",
      "label": "twitter-signup",
      "expiresAt": "2025-02-01T12:30:00.000Z",
      "expired": false,
      "createdAt": "2025-02-01T12:00:00.000Z",
      "persona": null
    }
  ]
}

Code Examples

curl https://destroy.network/api/agent/identities \
  -H "Authorization: Bearer sk_live_your_api_key"
GET/api/agent/identities/:id
API Key

Get metadata for a specific identity, including message count and decrypted password.

Path Parameters

NameTypeRequiredDescription
idstringYesIdentity ID

Response 200

Example Responsejson
{
  "id": "ai_Kp9xMn2qLr4vTt7bYw3cZ",
  "email": "agentx7k4@748392.best",
  "password": "Kx9#mL2pQr4!vB7w",
  "inboxId": "ibx_Yh8wNm5tRp2qKs6fVd4eX",
  "label": "twitter-signup",
  "expiresAt": "2025-02-01T12:30:00.000Z",
  "expired": false,
  "createdAt": "2025-02-01T12:00:00.000Z",
  "messageCount": 3,
  "persona": null
}

Errors

StatusMessage
404Identity not found

Code Examples

curl https://destroy.network/api/agent/identities/{id} \
  -H "Authorization: Bearer sk_live_your_api_key"
DELETE/api/agent/identities/:id
API Key

Permanently delete an identity. By default, also deletes the associated inbox and all messages. Pass ?keepInbox=true to remove only the identity and keep the inbox active.

Path Parameters

NameTypeRequiredDescription
idstringYesIdentity ID
keepInboxbooleanNoQuery param. When true, only the identity is deleted; the inbox and messages remain. Default: false.

Response 200

Example Responsejson
{ "deleted": true }

Errors

StatusMessage
404Identity not found

Code Examples

curl -X DELETE https://destroy.network/api/agent/identities/{id} \
  -H "Authorization: Bearer sk_live_your_api_key"
PATCH/api/agent/identities/:id
API Key

Extend the inbox TTL from the current time, or update the identity label. Useful when an agent's workflow takes longer than expected and the inbox is about to expire.

Path Parameters

NameTypeRequiredDescription
idstringYesIdentity ID

Request Body

FieldTypeRequiredDescription
ttlMinutesnumberNoNew TTL in minutes from now (1-1440). Defaults to plan's extension minutes.
labelstringNoUpdated label for the identity.
Example Requestjson
{
  "ttlMinutes": 60,
  "label": "twitter-signup-retry"
}

Response 200

FieldTypeDescription
idstringIdentity ID
expiresAtstringNew expiry timestamp
ttlMinutesnumberTTL that was applied
labelstring | nullCurrent label
Example Responsejson
{
  "id": "ai_Kp9xMn2qLr4vTt7bYw3cZ",
  "expiresAt": "2025-02-01T13:30:00.000Z",
  "ttlMinutes": 60,
  "label": "twitter-signup-retry"
}

Errors

StatusMessage
404Identity not found

Code Examples

curl -X PATCH https://destroy.network/api/agent/identities/{id} \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"ttlMinutes": 60}'
GET/api/agent/identities/:id/verify
API Key

Scan inbox emails for verification codes (OTP, 2FA) and confirmation links. Returns the highest-confidence match. Supports optional long-polling with the timeout parameter. Pass a custom regex pattern for non-standard verification formats.

Path Parameters

NameTypeRequiredDescription
idstringYesIdentity ID
timeoutnumberNoLong-poll timeout in seconds (0 = instant, max depends on plan: Pro 30s, Business 120s)
patternstringNoCustom regex pattern for code extraction. The first capture group is used as the value. Bypasses built-in extraction when provided.

Response 200

FieldTypeDescription
foundbooleanWhether a verification code/link was found
typestring | null'code' or 'link'
valuestring | nullThe extracted code or URL
confidencenumberConfidence score (0-1)
source.messageIdstringID of the source message
source.fromstringSender address
source.subjectstringEmail subject
rawMatchesarrayAll matches sorted by confidence
Example Responsejson
{
  "found": true,
  "type": "code",
  "value": "847293",
  "confidence": 0.95,
  "source": {
    "messageId": "msg_Rt5wKp8mNq2xYh6cVb3dZ",
    "from": "noreply@twitter.com",
    "subject": "Your verification code"
  },
  "rawMatches": [
    { "type": "code", "value": "847293", "confidence": 0.95 }
  ]
}

Errors

StatusMessage
404Identity not found

Code Examples

# Instant check
curl "https://destroy.network/api/agent/identities/{id}/verify" \
  -H "Authorization: Bearer sk_live_your_api_key"

# Long-poll for up to 30 seconds
curl "https://destroy.network/api/agent/identities/{id}/verify?timeout=30" \
  -H "Authorization: Bearer sk_live_your_api_key"

# Custom regex pattern for non-standard codes
curl "https://destroy.network/api/agent/identities/{id}/verify?timeout=30&pattern=code%3A%20(%5BA-Z0-9%5D%7B3%7D-%5BA-Z0-9%5D%7B3%7D)" \
  -H "Authorization: Bearer sk_live_your_api_key"

Code patterns: labeled numeric (0.95), labeled alphanumeric (0.93), prefixed like G-847293 (0.90), bold/emphasized HTML (0.85), large-font/styled HTML (0.82), dashed digits (0.80), spaced digits (0.80), standalone 4-8 digit (0.55-0.65)

Link patterns: keyword in URL + text (0.95), keyword in URL or token query param (0.90), keyword in button text (0.85), plain-text URLs near keywords (0.85), standalone URLs when subject matches (0.70)

Confidence boosted by +0.05 for verification subject keywords and +0.03 for noreply/verify sender addresses. Unsubscribe links are automatically filtered out.

Custom pattern: pass a regex via the pattern query param. First capture group is used as value (confidence: 1.0). Built-in extraction is skipped when a pattern is provided.

GET/api/agent/identities/:id/messages
API Key

List messages received by this identity's inbox, newest first. Returns up to 50 messages with snippet previews.

Path Parameters

NameTypeRequiredDescription
idstringYesIdentity ID

Response 200

Example Responsejson
{
  "messages": [
    {
      "id": "msg_Rt5wKp8mNq2xYh6cVb3dZ",
      "from": "noreply@twitter.com",
      "fromName": "Twitter",
      "subject": "Your verification code",
      "snippet": "Your verification code is 847293. This code expires in 10 minutes...",
      "receivedAt": "2025-02-01T12:05:00.000Z"
    }
  ]
}

Errors

StatusMessage
404Identity not found

Code Examples

curl https://destroy.network/api/agent/identities/{id}/messages \
  -H "Authorization: Bearer sk_live_your_api_key"
GET/api/agent/identities/:id/messages/:msgId
API Key

Get the full body (text + HTML) of a single message. Use this when the snippet from list messages isn't enough, or to parse custom verification formats yourself.

Path Parameters

NameTypeRequiredDescription
idstringYesIdentity ID
msgIdstringYesMessage ID

Response 200

FieldTypeDescription
idstringMessage ID
fromstringSender address
fromNamestring | nullSender display name
subjectstring | nullEmail subject
bodyTextstring | nullFull plain-text body
bodyHtmlstring | nullFull HTML body
snippetstring | nullFirst 200 chars of text body
receivedAtstringISO-8601 timestamp
Example Responsejson
{
  "id": "msg_Rt5wKp8mNq2xYh6cVb3dZ",
  "from": "noreply@twitter.com",
  "fromName": "Twitter",
  "subject": "Your verification code",
  "bodyText": "Your verification code is 847293. This code expires in 10 minutes. If you didn't request this, ignore this email.",
  "bodyHtml": "<html>...<strong>847293</strong>...</html>",
  "snippet": "Your verification code is 847293. This code expires in 10 minutes...",
  "receivedAt": "2025-02-01T12:05:00.000Z"
}

Errors

StatusMessage
404Identity not found
404Message not found

Code Examples

curl https://destroy.network/api/agent/identities/{id}/messages/{msgId} \
  -H "Authorization: Bearer sk_live_your_api_key"
GET/api/agent/identities/:id/wait
API Key

Long-poll until a new email arrives in this identity's inbox. Returns the message when received, or times out. Useful for waiting on confirmation emails after sign-up.

Path Parameters

NameTypeRequiredDescription
idstringYesIdentity ID
timeoutnumberNoMax wait time in seconds (default: 30, max: Pro 30s, Business 120s)

Response 200

FieldTypeDescription
timedOutbooleanWhether the request timed out without receiving a message
messageobject | nullThe received message, or null if timed out
message.idstringMessage ID
message.fromstringSender address
message.subjectstringEmail subject
message.snippetstringFirst 200 chars of body
message.receivedAtstringISO-8601 timestamp
Example Responsejson
{
  "timedOut": false,
  "message": {
    "id": "msg_Rt5wKp8mNq2xYh6cVb3dZ",
    "from": "noreply@twitter.com",
    "subject": "Your verification code",
    "snippet": "Your verification code is 847293...",
    "receivedAt": "2025-02-01T12:05:00.000Z"
  }
}

Errors

StatusMessage
404Identity not found

Code Examples

# Wait up to 30 seconds for an email
curl "https://destroy.network/api/agent/identities/{id}/wait?timeout=30" \
  -H "Authorization: Bearer sk_live_your_api_key"