Sending SMS and checking domain names from n8n through our API

All in One AI·· 5 views· 3 min read

With the HTTP Request node, an n8n workflow sends SMS and checks domain names through the Interweb API. For example: an order comes in from the website and an SMS goes out to the customer. You do not need to install anything in n8n. The webhooks that start these workflows are explained in n8n webhooks.

Before you start

1 Create a key in the API Center with only what the workflow needs: sms:write to send SMS and domains:read to check domains. Start with a sandbox_ key. See creating an API key.
2 For SMS, have SMS active on the account. Without it, the API answers 403 with sms_not_active.
3 In n8n, create a Bearer Auth credential with the key in Bearer Token. Use it for both requests.

Sending an SMS

1 Add an HTTP Request node, with Method set to POST and URL https://api.interweb.co.mz/v1/sms/messages.
2 In Authentication, choose Generic Credential Type, Bearer Auth and the credential.
3 Turn on Send Body, in JSON (Using JSON), and type the number and the text:

{
"number": "841234567",
"text": "Your order is ready."
}

You can write the number with or without the country code, and with spaces. If you leave out sender, the message goes out with the free sender, NETMSG. To send it later, add send_at with the date, the time and the time zone. The answer includes the status: sent, failed or queued.

Also turn on Send Headers and add the Idempotency-Key header, with a unique value for each message, for example the order number. If n8n repeats the request after a network failure, the SMS does not go out twice.

Checking a domain

1 Add another HTTP Request node, with Method set to GET and URL https://api.interweb.co.mz/v1/domains/availability.
2 Use the same Bearer Auth credential.
3 Turn on Send Query Parameters and add domain with the name, for example asuaempresa.co.mz.

The answer says whether the name is free (available), its status and the price for 1 to 10 years in prices, in the account currency. unknown means it could not be confirmed at that moment. This request allows up to 30 checks per minute. Registering through the API needs other permissions: see domains through the API.

Testing without spending

With the sandbox_ key, the SMS is simulated: nothing goes out and no credits are spent. Build and try the workflow this way, and only then switch to the prod_ key in the credential. The details of sending are in sending SMS through the API.

There is also a Interweb node for n8n, with every API operation, in the brand's git: see the SDKs and integrations page. It is not on npm yet, so it is installed from the code, following the README. On n8n Cloud, only verified community nodes can be added. For most workflows, HTTP Request is enough.

Want SMS and domains in your workflows? See the API page.

See the API

SEE ALSO

Sending SMS through the API: key, permissions, Sandbox and your first request

Domains through the API: checking a name, registering, renewing and transferring with credit

Using All in One AI in n8n: the OpenAI credential with our address, or the HTTP Request node

n8n webhooks: test URL, production URL, and why they do not fire

The Interweb API

RECOMMENDED PRODUCT

VPS server with root access

Resources of your own, the OS you choose, reinstall whenever you like. from $7.61/mo (3-year plan, with coupon)

See plans
Was this answer helpful? Your answer helps us improve this article.