Agentline API API

Email inboxes for AI agents: send and read email and wait for one-time codes. Texting is coming soon; the SMS, calls, voice and owner mobile endpoints are not available yet. Successful authenticated responses include RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. Every 429 includes Retry-

Operations 24

GET /me Account, inboxes and usage #
GET /sms List SMS (coming soon: texting is not available yet) #
POST /sms Send SMS (coming soon: texting is not available yet) #
GET /sms/{id} Read SMS (coming soon: texting is not available yet) #
GET /emails List emails #
POST /emails Send email #
GET /emails/{id} Read email (doesn't change read state) #
POST /mark-read Mark emails read, or unread #
GET /emails/{id}/raw Original RFC 822 message #
POST /wait-for-code Wait for a one-time code to arrive in the inbox #
GET /calls List calls (coming soon: calls are not available yet) #
POST /calls Place a call (coming soon: calls are not available yet) #
POST /signup Agent self-signup (no auth, one call). Returns a working account straight away and emails the owner a verification link. Opening that link gives the key full use of the account. Un #
GET /voice Call settings (coming soon: calls are not available yet) #
PATCH /voice/{number_id} Update call settings (coming soon: calls are not available yet) #
GET /keys List API keys #
POST /keys Create an API key (secret returned once) #
DELETE /keys/{id} Revoke an API key #
POST /owner/verify Confirm the owner's mobile with a code (coming soon: texting is not available yet; only the emailed link verifies the account) #
POST /owner/phone Start owner mobile verification (coming soon: texting is not available yet) #
GET /audit Recent audit log entries #
GET /billing Plan, status, trial and allowances #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/agentline-nz:agentline-api-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

agentline-nz-api-openapi.json Raw ↑
{"openapi":"3.1.0","info":{"title":"Agentline API","version":"1.2.1","description":"Email inboxes for AI agents: send and read email and wait for one-time codes. Texting is coming soon; the SMS, calls, voice and owner mobile endpoints are not available yet. Successful authenticated responses include RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. Every 429 includes Retry-After. A 429 from one of Agentline's own limits also includes the RateLimit headers for the limit that was reached; a 429 passed on from the mail provider doesn't. RateLimit-Reset and Retry-After are in seconds.","contact":{"email":"support@agentline.nz"},"x-logo":{"url":"https://agentline.nz/logo.png","altText":"Agentline"}},"servers":[{"url":"https://agentline.nz/api/v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"API key (al_live_…)"}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window.","schema":{"type":"integer","minimum":0}},"RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer","minimum":0}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer","minimum":0}},"Retry-After":{"description":"Seconds to wait before retrying after a 429 response.","required":true,"schema":{"type":"integer","minimum":0}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"EmailSummary":{"type":"object","required":["id","direction","from","to","subject","snippet","code","status","read","hasAttachments","createdAt"],"properties":{"id":{"type":"string"},"direction":{"type":"string","enum":["in","out"]},"from":{"type":"string"},"to":{"type":"string"},"subject":{"type":["string","null"]},"snippet":{"type":["string","null"],"description":"First 280 characters of the text body."},"code":{"type":["string","null"],"description":"One-time code detected in the email, if any."},"status":{"type":"string"},"read":{"type":"boolean"},"hasAttachments":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}}},"Email":{"allOf":[{"$ref":"#/components/schemas/EmailSummary"},{"type":"object","required":["text","html","messageId","inReplyTo","attachments"],"properties":{"text":{"type":["string","null"]},"html":{"type":["string","null"]},"messageId":{"type":["string","null"]},"inReplyTo":{"type":["string","null"]},"attachments":{"type":"array","items":{"type":"object","required":["filename","mimeType","size"],"properties":{"filename":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"integer"}}}}}}]},"Inbox":{"type":"object","required":["id","address","status","graceUntil"],"properties":{"id":{"type":"string"},"address":{"type":"string","format":"email"},"status":{"type":"string","enum":["active","grace","released"]},"graceUntil":{"type":["string","null"],"format":"date-time"}}},"Sms":{"type":"object","required":["id","direction","from","to","body","status","code","error","read","createdAt"],"properties":{"id":{"type":"string"},"direction":{"type":"string","enum":["in","out"]},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"status":{"type":"string"},"code":{"type":["string","null"]},"error":{"type":["string","null"]},"read":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}}},"Call":{"type":"object","required":["id","direction","from","to","status","durationSeconds","transcript","hasRecording","createdAt"],"properties":{"id":{"type":"string"},"direction":{"type":"string","enum":["in","out"]},"from":{"type":"string"},"to":{"type":"string"},"status":{"type":"string"},"durationSeconds":{"type":["integer","null"]},"transcript":{"type":["string","null"]},"hasRecording":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}}},"Signup":{"type":"object","required":["account_id","api_key","inbox","plan","agent_name","owner","verification","restrictions","mcp_url","mcp","upgrade","timings_ms"],"properties":{"account_id":{"type":"string"},"api_key":{"type":"string"},"inbox":{"type":["string","null"]},"plan":{"type":"string"},"agent_name":{"type":"string"},"owner":{"type":"object","required":["email","verified"],"properties":{"email":{"type":"string","format":"email"},"verified":{"type":"boolean"}}},"verification":{"type":"object","required":["email","expires_at"],"properties":{"email":{"type":"string","enum":["sent","failed"]},"expires_at":{"type":"string","format":"date-time"}}},"restrictions":{"type":"string"},"mcp_url":{"type":"string","format":"uri"},"mcp":{"type":"object","required":["url","headers","config"],"properties":{"url":{"type":"string","format":"uri"},"headers":{"type":"object","required":["Authorization"],"properties":{"Authorization":{"type":"string"}}},"config":{"type":"object","required":["mcpServers"],"properties":{"mcpServers":{"type":"object","required":["agentline"],"properties":{"agentline":{"type":"object","required":["url","headers"],"properties":{"url":{"type":"string","format":"uri"},"headers":{"type":"object","required":["Authorization"],"properties":{"Authorization":{"type":"string"}}}}}}}}}}},"upgrade":{"type":"string"},"timings_ms":{"type":"object","additionalProperties":{"type":"number"}}}},"VoiceSettings":{"type":"object","required":["numberId","number","voiceAvailable","mode","target","greeting","voicemailEnabled"],"properties":{"numberId":{"type":"string"},"number":{"type":"string"},"voiceAvailable":{"type":"boolean"},"mode":{"type":"string","enum":["message","forward_phone","forward_sip","stream"]},"target":{"type":["string","null"]},"greeting":{"type":["string","null"]},"voicemailEnabled":{"type":"boolean"}}},"ApiKey":{"type":"object","required":["id","name","prefix","createdAt","lastUsedAt","revoked"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"createdAt":{"type":["string","null"],"format":"date-time"},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"revoked":{"type":"boolean"}}},"OwnerVerification":{"type":"object","required":["phoneVerified","ownerVerified","phone"],"properties":{"phoneVerified":{"type":"boolean"},"ownerVerified":{"type":"boolean"},"phone":{"type":"string"}}},"OwnerPhoneVerification":{"type":"object","required":["phone","textTo","expiresAt","instructions"],"properties":{"phone":{"type":"string"},"textTo":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"instructions":{"type":"string"}}},"AuditEvent":{"type":"object","required":["id","actor","action","target","detail","createdAt"],"properties":{"id":{"type":"string"},"actor":{"type":"string"},"action":{"type":"string"},"target":{"type":["string","null"]},"detail":{},"createdAt":{"type":"string","format":"date-time"}}},"Billing":{"type":"object","required":["plan","planName","priceNzdPerMonth","status","trialEligible","trialEndsAt","currentPeriodEnd","allowances","comped","portalAvailable","availablePlans"],"properties":{"plan":{"type":"string"},"planName":{"type":["string","null"]},"priceNzdPerMonth":{"type":["number","null"]},"status":{"type":"string"},"trialEligible":{"type":"boolean"},"trialEndsAt":{"type":["string","null"],"format":"date-time"},"currentPeriodEnd":{"type":["string","null"],"format":"date-time"},"allowances":{"type":["object","null"],"required":["inboxes","emailsPerMonth","trial"],"properties":{"numbers":{"type":"integer"},"inboxes":{"type":"integer"},"smsLimit":{"type":"integer"},"smsWindow":{"type":"string","enum":["trial","month"]},"emailsPerMonth":{"type":"integer"},"voice":{"type":"boolean"},"voiceMinutesPerMonth":{"type":"integer"},"trial":{"type":"boolean"}}},"comped":{"type":"boolean"},"portalAvailable":{"type":"boolean"},"availablePlans":{"type":"array","items":{"type":"object","required":["id","name","priceNzdPerMonth","trialDays"],"properties":{"id":{"type":"string","enum":["free","starter","pro"]},"name":{"type":"string"},"priceNzdPerMonth":{"type":"number"},"trialDays":{"type":"integer"}}}}}},"BillingLink":{"type":"object","required":["url","sent_to"],"properties":{"url":{"type":"string","format":"uri"},"sent_to":{"type":"string","format":"email"}}},"Me":{"type":"object","required":["accountId","plan","status","createdBy","ownerVerified","sendingRestriction","inboxes","trial","usageThisMonth"],"properties":{"accountId":{"type":"string"},"plan":{"type":"string"},"status":{"type":"string"},"createdBy":{"type":"string","enum":["human","agent"]},"ownerVerified":{"type":"boolean"},"sendingRestriction":{"type":["string","null"],"description":"Set while the account can only send to the owner's verified contacts."},"inboxes":{"type":"array","items":{"$ref":"#/components/schemas/Inbox"}},"texting":{"type":"string","enum":["none","pending","has_number"],"description":"Texting is coming soon. Values other than none appear only on legacy accounts."},"trial":{"oneOf":[{"type":"null"},{"type":"object","required":["endsAt","limits"],"properties":{"endsAt":{"type":["string","null"],"format":"date-time"},"limits":{"type":"string"},"smsSegmentsUsed":{"type":"integer"},"smsSegmentsIncluded":{"type":"integer"}}}]},"numbers":{"type":"array","items":{"$ref":"#/components/schemas/Number"}},"numbersPending":{"type":"integer"},"numberPendingSince":{"type":["string","null"],"format":"date-time"},"usageThisMonth":{"type":"object","required":["emailsSent","emailsIncluded"],"properties":{"smsSent":{"type":"integer"},"smsIncluded":{"type":"integer"},"emailsSent":{"type":"integer"},"emailsIncluded":{"type":"integer"},"voiceMinutes":{"type":"integer"},"voiceMinutesIncluded":{"type":"integer"}}}}},"Number":{"type":"object","required":["id","number","status","capabilities","voiceMode","graceUntil","test"],"properties":{"id":{"type":"string"},"number":{"type":"string"},"status":{"type":"string","enum":["active","grace","released"]},"capabilities":{"type":"object","required":["sms","voice"],"properties":{"sms":{"type":"boolean"},"voice":{"type":"boolean"}}},"voiceMode":{"type":"string","enum":["message","forward_phone","forward_sip","stream"]},"graceUntil":{"type":["string","null"],"format":"date-time"},"test":{"type":"boolean"}}}}},"paths":{"/me":{"get":{"operationId":"getMe","summary":"Account, inboxes and usage","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"description":"unauthorized: the API key is missing or invalid.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}}}}}]}}}},"403":{"description":"account_suspended: the account is suspended.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["account_suspended"]},"message":{"type":"string"}}}}}]}}}},"429":{"description":"rate_limited: too many requests; retry after the Retry-After header's seconds.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}}}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"internal_error: the request failed unexpectedly.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["internal_error"]},"message":{"type":"string"}}}}}]}}}}}}},"/sms":{"get":{"operationId":"listSms","summary":"List SMS (coming soon: texting is not available yet)","parameters":[{"name":"direction","in":"query","schema":{"type":"string"}},{"name":"contact","in":"query","schema":{"type":"string"}},{"name":"unread_only","in":"query","schema":{"type":"string"}},{"name":"since_seconds","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["messages"],"properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/Sms"}}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"$ref":"#/components/responses/Error"},"409":{"description":"no_number: texting and calls are coming soon, so SMS, call and owner mobile requests need a legacy account that already has a number. Legacy accounts can also get other 409 codes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: too many requests; retry after the Retry-After header's seconds.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}}}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"internal_error: the request failed unexpectedly.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["internal_error"]},"message":{"type":"string"}}}}}]}}}}}},"post":{"operationId":"sendSms","summary":"Send SMS (coming soon: texting is not available yet)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["to","body"],"properties":{"to":{"type":"string"},"body":{"type":"string","maxLength":1600},"from":{"type":"string"}}}}}},"responses":{"201":{"description":"Sent","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/Sms"}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"description":"no_number: texting and calls are coming soon, so SMS, call and owner mobile requests need a legacy account that already has a number. Legacy accounts can also get other 409 codes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"internal_error: the request failed unexpectedly.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["internal_error"]},"message":{"type":"string"}}}}}]}}}}}}},"/sms/{id}":{"get":{"operationId":"getSms","summary":"Read SMS (coming soon: texting is not available yet)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"$ref":"#/components/schemas/Sms"}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"404":{"$ref":"#/components/responses/Error"},"409":{"description":"no_number: texting and calls are coming soon, so SMS, call and owner mobile requests need a legacy account that already has a number. Legacy accounts can also get other 409 codes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: too many requests; retry after the Retry-After header's seconds.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}}}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"internal_error: the request failed unexpectedly.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["internal_error"]},"message":{"type":"string"}}}}}]}}}}}}},"/emails":{"get":{"operationId":"listEmails","summary":"List emails","parameters":[{"name":"direction","in":"query","schema":{"type":"string"}},{"name":"unread_only","in":"query","schema":{"type":"string"}},{"name":"since_seconds","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["emails"],"properties":{"emails":{"type":"array","items":{"$ref":"#/components/schemas/EmailSummary"}}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"description":"unauthorized: the API key is missing or invalid.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}}}}}]}}}},"403":{"description":"key_not_confirmed: the owner hasn't opened the verification link we emailed them, so this key can't use this endpoint yet. account_suspended: the account is suspended.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["key_not_confirmed","account_suspended"]},"message":{"type":"string"}}}}}]}}}},"429":{"description":"rate_limited: too many requests; retry after the Retry-After header's seconds.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}}}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"internal_error: the request failed unexpectedly.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["internal_error"]},"message":{"type":"string"}}}}}]}}}}}},"post":{"operationId":"sendEmail","summary":"Send email","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["to","subject","text"],"properties":{"to":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"maxItems":5}]},"subject":{"type":"string"},"text":{"type":"string"},"html":{"type":"string"},"from":{"type":"string"},"reply_to_id":{"type":"string"}}}}}},"responses":{"201":{"description":"Sent","content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"$ref":"#/components/schemas/EmailSummary"}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"description":"unauthorized: the API key is missing or invalid.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}}}}}]}}}},"402":{"$ref":"#/components/responses/Error"},"403":{"description":"recipient_not_allowed: this account or key can only email the owner's verified address for now. account_suspended: the account is suspended.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["recipient_not_allowed","account_suspended"]},"message":{"type":"string"}}}}}]}}}},"409":{"description":"no_inbox: the account has no active inbox yet.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["no_inbox"]},"message":{"type":"string"}}}}}]}}}},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"owner_unverified: an unconfirmed key has used its sends for the day. rate_limited: too many requests; retry after the Retry-After header's seconds.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["owner_unverified","rate_limited"]},"message":{"type":"string"}}}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"internal_error: the request failed unexpectedly.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["internal_error"]},"message":{"type":"string"}}}}}]}}}}}}},"/emails/{id}":{"get":{"operationId":"getEmail","summary":"Read email (doesn't change read state)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"$ref":"#/components/schemas/Email"}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"description":"unauthorized: the API key is missing or invalid.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}}}}}]}}}},"403":{"description":"key_not_confirmed: the owner hasn't opened the verification link we emailed them, so this key can't use this endpoint yet. account_suspended: the account is suspended.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["key_not_confirmed","account_suspended"]},"message":{"type":"string"}}}}}]}}}},"404":{"$ref":"#/components/responses/Error"},"429":{"description":"rate_limited: too many requests; retry after the Retry-After header's seconds.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}}}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"internal_error: the request failed unexpectedly.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["internal_error"]},"message":{"type":"string"}}}}}]}}}}}}},"/mark-read":{"post":{"operationId":"markEmailRead","summary":"Mark emails read, or unread","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ids"],"properties":{"ids":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"read":{"type":"boolean","default":true}}}}}},"responses":{"200":{"description":"updated and notFound ids","content":{"application/json":{"schema":{"type":"object","required":["read","updated","notFound"],"properties":{"read":{"type":"boolean"},"updated":{"type":"array","items":{"type":"object","required":["id","kind"],"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["sms","email"],"description":"Legacy accounts that already have a number can also get sms."}}}},"notFound":{"type":"array","items":{"type":"string"}}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"description":"unauthorized: the API key is missing or invalid.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}}}}}]}}}},"403":{"description":"key_not_confirmed: the owner hasn't opened the verification link we emailed them, so this key can't use this endpoint yet. account_suspended: the account is suspended.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["key_not_confirmed","account_suspended"]},"message":{"type":"string"}}}}}]}}}},"429":{"description":"rate_limited: too many requests; retry after the Retry-After header's seconds.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}}}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"internal_error: the request failed unexpectedly.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["internal_error"]},"message":{"type":"string"}}}}}]}}}}}}},"/emails/{id}/raw":{"get":{"operationId":"getRawEmail","summary":"Original RFC 822 message","description":"Original messages aren't stored in production, so this returns 404 not_found.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"message/rfc822","content":{"message/rfc822":{"schema":{"type":"string"}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"description":"unauthorized: the API key is missing or invalid.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}}}}}]}}}},"403":{"description":"key_not_confirmed: the owner hasn't opened the verification link we emailed them, so this key can't use this endpoint yet. account_suspended: the account is suspended.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["key_not_confirmed","account_suspended"]},"message":{"type":"string"}}}}}]}}}},"404":{"description":"not_found: the original message isn't stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited: too many requests; retry after the Retry-After header's seconds.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["rate_limited"]},"message":{"type":"string"}}}}}]}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"500":{"description":"internal_error: the request failed unexpectedly.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["internal_error"]},"message":{"type":"string"}}}}}]}}}}}}},"/wait-for-code":{"post":{"operationId":"waitForCode","summary":"Wait for a one-time code to arrive in the inbox","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"enum":["sms","email","any"]},"timeout_seconds":{"type":"integer","maximum":55},"from_contains":{"type":"string"},"since_seconds":{"type":"integer"}}}}}},"responses":{"200":{"description":"{found:boolean, code?, channel?, from?, receivedAt?}","content":{"application/json":{"schema":{"type":"object","required":["found"],"properties":{"found":{"type":"boolean"},"code":{"type":"string"},"channel":{"type":"string","enum":["sms","email"],"description":"Legacy accounts that already have a number can also get sms."},"messageId":{"type":"string"},"from":{"type":"string"},"receivedAt":{"type":"string","format":"date-time"},"preview":{"type":"string"}}}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"401":{"description":"unauthorized: the API key is missing or invalid.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"message":{"type":"string"}}}}}]}}}},"403":{"description":"key_not_confirmed: the owner hasn't opened the verification link we emailed them, so this key can't use this endpoint yet. account_suspended: the account is

# --- truncated at 32 KB (55 KB total) ---
# Full source: https://artifacts.apis.io/agentline-nz/openapi/_original/agentline-nz-api-openapi.json