There's no Agentline NZ app in Zapier, so use Webhooks by Zapier to call the REST API at https://agentline.nz/api/v1 with an Authorization: Bearer header holding your API key. A Zap can then text from a New Zealand 028 number, send email from an @agentline.nz address, read the inbox and wait for one-time codes.
Before you start
- An Agentline NZ API key from Dashboard → API keys. It starts with al_live_. Start free with an email inbox (no card), or take a 7-day trial of Starter or Pro to get a number.
- Your 028 number is set up within a few days of signup. Your email inbox works straight away. Until the number is live, sending a text returns 409 number_pending.
- Until you're on a paid plan, your agent can only email or text your own verified email address and mobile number. Anything else returns recipient_not_allowed.
- A Zapier Team or Enterprise plan. Zapier lists webhook actions on Team and Enterprise, and the Retrieve Poll trigger, used below to start a Zap when a message arrives, on Enterprise only.
Send a text from a Zap
- Add a webhook action. In the Zap editor, add an action step, choose Webhooks by Zapier and pick the POST event.
- Set the request. Set URL to https://agentline.nz/api/v1/sms and Payload Type to json. Under Data, add a to field (an NZ mobile, such as 021 123 4567 or +64211234567) and a body field (the text, up to 1,600 characters). Map either from an earlier step.
- Add your key. Under Headers, add Authorization with the value Bearer followed by a space and your Agentline NZ API key. Leave Basic Auth empty.
- Test the step. Test the action. A 201 response returns the message, with its id and a status of sent or queued. A 4xx response carries an error object with a code and message.
{ "message": { "id": "sms_…", "direction": "out", "from": "+6428…", "to": "+64211234567", "body": "Your booking is confirmed for 3pm Thursday.", "status": "sent", "code": null, "error": null, "read": false, "createdAt": "2026-10-20T01:00:00.000Z" } }
Send an email
Use another POST action with URL https://agentline.nz/api/v1/emails, Payload Type json and the same Authorization header. Under Data, add to (one address), subject and text. To answer an email in the same thread, add reply_to_id with the id of the email you're replying to. The response is {"email": {…}} with the email's id and status.
Read the inbox
Use a GET action. Set URL to https://agentline.nz/api/v1/sms for texts or https://agentline.nz/api/v1/emails for email, and add the same Authorization header. Under Query String Params you can add:
direction:infor received messages only, oroutfor sent onesunread_only:trueto skip messages already marked readsince_seconds: only messages from the last N secondslimit: 1 to 100 (20 by default)
Texts come back as {"messages": [...]} and emails as {"emails": [...]}, newest first. Each email has a 280-character snippet; for the full text, GET https://agentline.nz/api/v1/emails/{id}.
Wait for a one-time code
Use a Custom Request action, because this endpoint needs a number in the body and Custom Request sends the JSON exactly as typed. Set Method to POST, URL to https://agentline.nz/api/v1/wait-for-code, and add the Authorization header plus Content-Type: application/json. Put this in Data:
{"channel": "any", "timeout_seconds": 25, "from_contains": "Google"}
channel is sms, email or any, and from_contains (optional) matches the sender or the message text. The response is {"found": true, "code": "123456", "channel": "sms", "messageId": "…", "from": "…", "receivedAt": "…", "preview": "…"}, or {"found": false} if nothing arrived in time. Each code is returned once. Zapier gives a step about 30 seconds, so keep timeout_seconds at 25 or less, and add a Filter step that only continues when found is true.
Start a Zap when a text or email arrives
Agentline NZ doesn't send webhooks to your own URLs, so a Catch Hook trigger won't receive anything. Poll the API with the Retrieve Poll trigger in Webhooks by Zapier instead. Retrieve Poll is on Zapier's Enterprise plan only; on other plans, poll from a scheduled Make scenario.
- Choose Webhooks by Zapier as the trigger and pick Retrieve Poll.
- Set URL to
https://agentline.nz/api/v1/sms?direction=in&limit=25for texts, orhttps://agentline.nz/api/v1/emails?direction=in&limit=25for email.limit=25returns the 25 newest messages per check. If more than 25 arrive between checks, the oldest are skipped. If you can't afford to miss a message, use the Make scenario instead: it polls withunread_onlyand marks each message read, so anything past the limit waits for the next run. - Set Key to
messagesfor texts oremailsfor email. - Leave Deduplication Key empty. Every message has an
id, which Zapier uses to skip messages it has already seen. - Add the Authorization header and test the trigger.
Zapier checks on its own polling schedule, which depends on your Zapier plan, so a Zap starts some minutes after a message lands. Use the wait-for-code request above when a Zap needs a code straight away.
Good to know
- Each API key can make 120 requests a minute.
- Sending is capped at 10 texts a minute and 150 a day, and 10 emails a minute and 200 a day.
- On a 429 rate_limited response, wait the number of seconds in the Retry-After header before retrying, and keep sends within your plan's or trial's SMS and email allowance. A plan's SMS and email allowances reset monthly. During a trial, the SMS allowance covers the whole trial and the email allowance is still monthly.
- Standard NZ mobile numbers only (020/021/022/027/028/029). No landlines, short codes, premium or international numbers.
- Transactional and assistant messages only: replies, bookings, confirmations, reminders people asked for, and codes. Marketing, promotions, cold texts and bulk texts are blocked.
- Your API key lives in the Zap's header fields, so anyone who can edit the Zap can see it. Create a key just for Zapier and revoke it in the dashboard if you stop using the Zap.
- The docs list every REST endpoint.
FAQ
Is there an Agentline NZ app in Zapier?
No. Use Webhooks by Zapier to call the REST API with your API key, as shown on this page.
Can a Zap trigger when a text or email arrives?
Yes, by polling. Agentline NZ doesn't send webhooks, so use the Retrieve Poll trigger in Webhooks by Zapier on the SMS or email list, with direction set to in and limit to 25. Retrieve Poll is on Zapier's Enterprise plan only; on other plans, use a scheduled Make scenario instead.
What does Agentline NZ cost?
Starter is NZ$29/month and Pro is NZ$79/month, billed in NZ dollars. Start free with an email inbox (no card), or take a 7-day trial of Starter or Pro to get a number. Agentline NZ is not GST-registered, so no GST is charged.
How long does it take to get the 028 number?
Your 028 number is set up within a few days of signup. Your email inbox works straight away. Full refund if your number hasn't arrived within 30 days of your first payment.
Can my assistant send marketing or bulk texts?
No. Transactional and assistant messages only: replies, bookings, confirmations, reminders people asked for, and codes. Marketing, promotions, cold texts and bulk texts are blocked. See What we don't allow.
Related
- Connect a Make scenario to a NZ phone number, SMS and email
- Connect n8n AI agents to a NZ phone number, SMS and email
- How does wait_for_code get one-time codes for my agent?
- How do I create an Agentline NZ API key?
Start free · Start free with an email inbox (no card), or take a 7-day trial of Starter or Pro to get a number.