There's no Agentline NZ app in Make, so use the HTTP app's Make a request module to call the REST API at https://agentline.nz/api/v1, with your API key in an API key keychain as Authorization: Bearer. A scenario 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.
Send a text from a scenario
- Add the module. In your scenario, add the HTTP app's Make a request module.
- Create a keychain for your key. Set Authentication type to API key and create a keychain under Credentials. Set Key to Bearer followed by a space and your Agentline NZ API key, API key placement to In the header, and API key parameter name to Authorization. Other HTTP modules in the scenario can reuse the same keychain.
- Set the request. Set URL to https://agentline.nz/api/v1/sms, Method to POST, Body content type to application/JSON and Body input method to JSON string, then enter the body below. to is an NZ mobile, such as 021 123 4567 or +64211234567, and body is the text, up to 1,600 characters. Map either from an earlier module.
{"to": "021 123 4567", "body": "Your booking is confirmed for 3pm Thursday."} - Parse the response and run it once. Set Parse response to Yes and run the module once, so later modules can map message.id and message.status (sent or queued). A 4xx response carries an error object with a code and message. Set Return error if HTTP request fails to Yes under Advanced settings if you want the scenario to stop on one. A module that replies to incoming messages should leave it at No, as shown further down.
Send an email
Use another Make a request module with the same keychain, URL https://agentline.nz/api/v1/emails and Method POST:
{"to": "someone@example.com", "subject": "Your booking", "text": "See you at 3pm Thursday."}
to can be one address or an array of up to 5. 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. If you build the body by mapping text from earlier modules, choose Data structure as the body input method so Make escapes quotes and line breaks for you.
Read the inbox
Use Make a request with Method GET and URL https://agentline.nz/api/v1/sms for texts or https://agentline.nz/api/v1/emails for email. Under Query parameters 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
POST to https://agentline.nz/api/v1/wait-for-code:
{"channel": "any", "timeout_seconds": 55, "from_contains": "Google"}
channel is sms, email or any, and from_contains (optional) matches the sender or the message text. The request stays open until a code arrives or timeout_seconds passes (55 at most), so set Timeout under Advanced settings to 60. 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. Add a filter after the module that only continues when found is true.
Run a scenario when a text or email arrives
Agentline NZ doesn't send webhooks to your own URLs, so a Custom webhook trigger won't receive anything. Poll instead. A polling scenario suits forwarding or logging new messages, such as posting each one to Slack or adding it to a sheet:
- Schedule the scenario to run at regular intervals. On Make's Free pricing plan, scheduled scenarios run at most every 15 minutes.
- Start it with Make a request: Method GET, URL
https://agentline.nz/api/v1/sms(or/emails), query parametersdirection=in,unread_only=trueandlimit=25, Parse response set to Yes, and Return error if HTTP request fails set to Yes under Advanced settings. - Add an Iterator on
messages(oremails) so each message runs through the rest of the scenario. - Add the modules that forward or log the message.
- At the end, mark the message read with a POST to
https://agentline.nz/api/v1/mark-readand the body{"ids": ["<the message id>"]}, mapping the id from the Iterator, with Return error if HTTP request fails set to Yes. It returns{"read": true, "updated": [...], "notFound": [...]}.
If a step fails, the run stops before mark-read and the message stays unread for the next run to retry. Mark each message read straight after its work is done, so a retry doesn't repeat finished work. Messages come newest first, and anything past the limit stays unread for the run after. By default Make turns a scenario's schedule off after 3 runs in a row end in an error, so check the scenario history if one message keeps failing. Read state is shared across your account: opening an email in the dashboard, or another agent calling mark_read, also marks it read.
Reply to each incoming text or email
Some replies fail every time, and a scenario that stops on them never gets past that message. If the replies need judgement, an agent connected over MCP, such as Claude or a LlamaIndex agent, is simpler. For short fixed replies, such as an acknowledgement, start from the polling scenario above and change it like this:
- Use
limit=10, so one run never sends more than the 10 texts or 10 emails a minute your account can send. - Add a Router after the Iterator with two routes. The first route goes straight to a mark-read module, with no reply. For texts, give it a filter where
bodyMatches pattern (case insensitive)^\s*(STOP|STOPALL|UNSUBSCRIBE|CANCEL|END|QUIT|OPTOUT|OPT-OUT|START|UNSTOP|SUBSCRIBE|YES|HELP|INFO)[.!]*\s*$. Those are the STOP, START and HELP keywords, and a bareYescounts as START. Agentline NZ already answers them, and a reply to someone who just sent STOP returns 403recipient_opted_out. - Until you're on a paid plan, your agent can only email or text your own verified email address and mobile number. Until then, add an OR condition to the first route's filter:
fromNot equal to (case insensitive) your verified mobile in +64 form, such as +64211234567, or your verified email address in an email scenario. Everything else is marked read without a reply. Remove the condition once you're on a paid plan. - Put the reply module on the second route, and set that route as the fallback route. Leave Return error if HTTP request fails at No on the reply module, so every response comes out of the module with its status code. Make's help says a 401 or 403 response can come back as an
AccountValidationError. An error handler can't catch that error, and Make turns the scenario's schedule off after it. With the setting on, one sender who texted STOP could switch the whole scenario off. - Between the reply module and its mark-read module, add a filter that passes only when the reply's Status code is Greater than or equal to
200and Less than300, or Equal to400,403or422. In Make that's four condition groups joined by OR, and the first group has both numeric conditions. Sent replies are marked read. So are replies that will never succeed: 400invalid_recipient, 403recipient_opted_out(the sender texted STOP earlier), 403recipient_not_allowed, and 422content_marketingand the othercontent_codes. Every other response leaves the message unread for a later run to retry: 401unauthorized, 402quota_exceededorsubscription_required, 409number_pending, 429rate_limitedorowner_unverified, and any 5xx.
Check the status codes of the first few runs. If every reply returns 400 or 422, the reply module is set up wrong, not the senders: 400 invalid_request or invalid_json means a missing or misnamed field or a body that isn't valid JSON, and a 422 content_ code on a fixed reply means the reply text itself fails the content checks. The filter marks those messages read without a reply, so turn the scenario off and fix the module's body before you run it again.
A trial's SMS allowance is small (10 segments) and covers the whole trial, so once it runs out every reply returns 402 quota_exceeded. The messages stay unread and each run retries the newest 10 until the account can send again. A 402 is about your plan, not the scenario: quota_exceeded means the SMS or email allowance is used up, and subscription_required means the account has no live plan or trial. See what's used on the dashboard and change plan on its Billing page, or compare plans on Pricing. Until the account can send texts again, or while the number is still being set up and replies return 409 number_pending, turn the scenario off. Each scheduled run still fetches and retries the same messages, and every run uses Make credits. Keep Return error if HTTP request fails set to Yes on the fetch and mark-read modules. If mark-read fails after a reply was sent, the run stops and the next run replies again. Make reads a 429 on those modules as a RateLimitError and pauses a scheduled scenario for 20 minutes. Each run makes at most 21 requests: one fetch, up to 10 replies and up to 10 mark-reads, plus up to 10 more if an email scenario GETs each full email. An SMS scenario and an email scenario on the same key stay well under the 120 requests a minute each key allows. The send caps are shared by every key and agent on your account, so other sends in the same minute can push a reply into a 429, and that message is retried on the next run.
Good to know
- Each API key can make 120 requests a minute.
- Sending is capped per account, and every API key and agent on the account shares the caps: 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. Two 429s carry no Retry-After header: rate_limited for too many new SMS recipients in a day, and owner_unverified for the daily send cap before the owner opens the verification link. Both reset at midnight UTC. 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.
- Make only calls https URLs, so this works against https://agentline.nz but not a local test server.
- Create a key just for Make and revoke it in the dashboard if you stop using the scenario. Updating the keychain updates every module that uses it.
- The docs list every REST endpoint.
FAQ
Is there an Agentline NZ app in Make?
No. Use the HTTP app's Make a request module with an API key keychain to call the REST API, as shown on this page.
Can a scenario start when a text or email arrives?
Agentline NZ doesn't send webhooks, so schedule the scenario and poll the SMS or email list with direction=in, unread_only=true and limit=25, then mark each message read with POST /mark-read straight after its work is done. This suits forwarding or logging messages. A scenario that replies to each message needs limit=10, a filter that marks STOP, START and HELP texts read without a reply, and a status code filter on the reply, as described on this page. For replies that need judgement, use an agent connected over MCP.
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 Zapier workflow 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.