For the complete documentation index, see llms-docs.txt or the site index llms.txt. Full docs corpus: llms-full-docs.txt. Prefer the markdown version of this page at /docs/examples/nextviper/rest-client.md. Product capabilities: skill.md. Docs MCP: /docs/mcp. Site MCP: https://nuratix.com/mcp.
REST Client & Webhooks in NextViper
Interacting with Nuratix contacts, webhooks, and domains using NextViper.
NextViper REST Client & Webhooks
NextViper allows you to build full microservices, background email jobs, and webhook receivers.
Managing Contacts
import std.http
let headers = {
"Authorization": "Bearer nr_your_api_key_here",
"Content-Type": "application/json"
}
// Add a subscriber to Nuratix audience
let contact = {
"email": "alex@example.com",
"first_name": "Alex",
"last_name": "Mercer",
"unsubscribed": false
}
let res = http.post("https://nuratix.com/api/contacts/v1", contact, headers)
print("Contact created: " + res.body)
Receiving Nuratix Inbound Webhooks
NextViper features a built-in fast HTTP web server:
import std.http
let app = http.server()
app.post("/webhook", fn(req, res) {
print("Received Nuratix webhook event: " + req.body)
return res.json({"received": true}, 200)
})
print("Starting NextViper webhook receiver on port 8080...")
app.listen(8080)Was this page helpful?
