Connect your agent
Use Agentline from ChatGPT or Claude with MCP, or from your own code with the REST API.
Quickstart
- Create an account and choose a plan. Your inbox appears straight away; your 028 number is assigned within one business day.
- Connect ChatGPT or Claude using the MCP URL below, or create an API key under Dashboard → API keys.
- Ask your agent: "What's my Agentline number?" and then "Sign up for … and wait for the code."
MCP server URL (Streamable HTTP):
https://agentline.nz/mcpClaude connector
- In Claude (web or desktop) open Settings → Connectors and choose Add custom connector.
- Name it Agentline and paste
https://agentline.nz/mcpas the URL. Leave the OAuth client fields empty. - Click Connect. Sign in to Agentline with your email link and approve access.
- In a chat, enable the Agentline tools from the tools menu. On Team and Enterprise plans an owner adds the connector for the organisation first.
Claude Code: claude mcp add --transport http agentline https://agentline.nz/mcp, then run /mcp to sign in.
ChatGPT app
- In ChatGPT open Settings → Apps. Search for Agentline, or (with developer mode enabled) choose Create app and enter
https://agentline.nz/mcpwith OAuth authentication. - Sign in to Agentline and approve access. You can untick "send" to give ChatGPT read-only access.
- Mention Agentline in a chat, or pick it from the tools menu.
ChatGPT asks you to confirm before Agentline sends anything, because the send tools are marked as write actions. SMS, email and codes appear as compact cards in the conversation.
MCP tools
| Tool | What it does | Scope |
|---|---|---|
| get_my_number | Your number(s), inbox(es), plan and usage | read |
| send_sms | Text a NZ mobile from your number | send |
| list_messages | Recent SMS, newest first | read |
| read_message | One SMS by id | read |
| send_email | Email from your @agentline.nz address | send |
| list_emails | Recent emails | read |
| read_email | Full email text by id | read |
| wait_for_code | Wait up to 55s for an OTP by SMS or email | read |
| list_calls | Calls and voicemail transcripts | read |
| get_profile | Which Agentline account is connected | read |
Your own agents can use the same MCP endpoint with an API key: send Authorization: Bearer al_live_….
REST API
Base URL https://agentline.nz/api/v1. Authenticate with Authorization: Bearer al_live_…. Requests and responses are JSON. An OpenAPI description is at /api/v1/openapi.json.
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/me | Your plan, numbers, inboxes and monthly usage |
| GET | /api/v1/sms | List SMS (query: direction, contact, since_seconds, limit) |
| POST | /api/v1/sms | Send an SMS: { to, body, from? } |
| GET | /api/v1/sms/{id} | Read one SMS |
| GET | /api/v1/emails | List emails (query: direction, unread_only, since_seconds, limit) |
| POST | /api/v1/emails | Send an email: { to, subject, text, html?, from?, reply_to_id? } |
| GET | /api/v1/emails/{id} | Read one email (marks it read) |
| GET | /api/v1/emails/{id}/raw | Download the original .eml |
| POST | /api/v1/wait-for-code | Wait for an OTP: { channel?, timeout_seconds?, from_contains?, since_seconds? } |
| GET | /api/v1/calls | List calls and voicemail transcripts |
| POST | /api/v1/calls | Place a call that speaks a message (Pro, if enabled): { to, message } |
curl https://agentline.nz/api/v1/sms \
-H "Authorization: Bearer $AGENTLINE_KEY" \
-H "Content-Type: application/json" \
-d '{"to":"+64211234567","body":"Kia ora! Your table for 2 at 7pm is confirmed."}'One-time codes
Every inbound SMS and email is scanned for a one-time code. wait_for_code returns the newest code that hasn't already been handed out, waiting if needed. Use from_contains to match a sender (for example "Google" or "noreply@github.com") when several codes may arrive at once.
curl -X POST https://agentline.nz/api/v1/wait-for-code \
-H "Authorization: Bearer $AGENTLINE_KEY" -H "Content-Type: application/json" \
-d '{"channel":"any","timeout_seconds":45}'
# → {"found":true,"code":"482913","channel":"sms","from":"+6421…","receivedAt":"…"}SMS rules
- Numbers are NZ 028 business messaging numbers. SMS goes to standard NZ mobile numbers only (020–029), not landlines, short codes, premium or international numbers.
- Transactional and assistant messages only: replies, bookings, confirmations, reminders people asked for, and codes. Marketing, promotions and bulk texts are blocked.
- Allowances are counted in segments: 160 characters (153 per part when split), or 70 (67) with emoji or macrons.
- Delivery receipts aren't available from the carrier, so a sent message shows
sent, notdelivered.
Errors and limits
Errors return {"error":{"code":"…","message":"…"}} with an HTTP status:
401missing or invalid API key ·402subscription or allowance needed ·403opted-out recipient or suspended account409number_pending: your 028 number hasn't been assigned yet (usually within one business day)422content blocked by a safety check, includingcontent_marketingfor promotional SMS (the message explains why) ·429rate limited (seeRetry-After)
Limits per account: 120 API requests a minute per key; 10 SMS a minute and 150 a day; 25 new SMS recipients a day; 10 emails a minute and 200 a day; 5 calls an hour. Monthly plan allowances apply on top.