curl --request POST \
--url https://api.nextlevelmca.com/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/hooks/nextlevel-mca",
"events": [
"deal.created",
"offer.received",
"document.uploaded"
],
"description": "Zapier — new deals"
}
'import requests
url = "https://api.nextlevelmca.com/v1/webhooks"
payload = {
"url": "https://example.com/hooks/nextlevel-mca",
"events": ["deal.created", "offer.received", "document.uploaded"],
"description": "Zapier — new deals"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/hooks/nextlevel-mca',
events: ['deal.created', 'offer.received', 'document.uploaded'],
description: 'Zapier — new deals'
})
};
fetch('https://api.nextlevelmca.com/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nextlevelmca.com/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example.com/hooks/nextlevel-mca',
'events' => [
'deal.created',
'offer.received',
'document.uploaded'
],
'description' => 'Zapier — new deals'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nextlevelmca.com/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://example.com/hooks/nextlevel-mca\",\n \"events\": [\n \"deal.created\",\n \"offer.received\",\n \"document.uploaded\"\n ],\n \"description\": \"Zapier — new deals\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nextlevelmca.com/v1/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/hooks/nextlevel-mca\",\n \"events\": [\n \"deal.created\",\n \"offer.received\",\n \"document.uploaded\"\n ],\n \"description\": \"Zapier — new deals\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nextlevelmca.com/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/hooks/nextlevel-mca\",\n \"events\": [\n \"deal.created\",\n \"offer.received\",\n \"document.uploaded\"\n ],\n \"description\": \"Zapier — new deals\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"url": "<string>",
"events": [
"<string>"
],
"description": "<string>",
"status": "active",
"disabled_reason": "<string>",
"failing_since": "<string>",
"last_success_at": "<string>",
"last_failure_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"secret": "whsec_3fK8…"
},
"meta": {}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}Create a webhook subscription
Registers an HTTPS endpoint and returns the signing secret once.
Delivery. Each event is a POST with a JSON body { id, type, created_at, location_id, data } and the headers Content-Type: application/json, User-Agent: NextLevelMCA-Webhooks/1.0, X-NLMCA-Event (the type), X-NLMCA-Delivery (unique per attempt group — use it to de-duplicate) and X-NLMCA-Signature: t=<unix seconds>,v1=<hex>.
Verification. Compute HMAC-SHA256(secret, t + "." + rawBody) over the raw request body (before JSON parsing), compare it to v1 in constant time, and reject when t is more than 5 minutes from your clock. Example (Node): crypto.createHmac("sha256", secret).update(t.).digest("hex").
Retries. Answer 2xx within 10 seconds. Any other response, a redirect or a timeout is retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours, then the delivery is marked dead (replayable from Settings → Developers). Deliveries are at-least-once and may arrive out of order.
Disabling. A subscription that has failed continuously for 3 days is set to disabled and the location admins are emailed. Fix the endpoint, then re-enable it from Settings → Developers → Webhooks. POST /v1/webhooks/{id}/test checks an endpoint without waiting for a real event.
curl --request POST \
--url https://api.nextlevelmca.com/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://example.com/hooks/nextlevel-mca",
"events": [
"deal.created",
"offer.received",
"document.uploaded"
],
"description": "Zapier — new deals"
}
'import requests
url = "https://api.nextlevelmca.com/v1/webhooks"
payload = {
"url": "https://example.com/hooks/nextlevel-mca",
"events": ["deal.created", "offer.received", "document.uploaded"],
"description": "Zapier — new deals"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://example.com/hooks/nextlevel-mca',
events: ['deal.created', 'offer.received', 'document.uploaded'],
description: 'Zapier — new deals'
})
};
fetch('https://api.nextlevelmca.com/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nextlevelmca.com/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://example.com/hooks/nextlevel-mca',
'events' => [
'deal.created',
'offer.received',
'document.uploaded'
],
'description' => 'Zapier — new deals'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nextlevelmca.com/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://example.com/hooks/nextlevel-mca\",\n \"events\": [\n \"deal.created\",\n \"offer.received\",\n \"document.uploaded\"\n ],\n \"description\": \"Zapier — new deals\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nextlevelmca.com/v1/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://example.com/hooks/nextlevel-mca\",\n \"events\": [\n \"deal.created\",\n \"offer.received\",\n \"document.uploaded\"\n ],\n \"description\": \"Zapier — new deals\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nextlevelmca.com/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://example.com/hooks/nextlevel-mca\",\n \"events\": [\n \"deal.created\",\n \"offer.received\",\n \"document.uploaded\"\n ],\n \"description\": \"Zapier — new deals\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"url": "<string>",
"events": [
"<string>"
],
"description": "<string>",
"status": "active",
"disabled_reason": "<string>",
"failing_since": "<string>",
"last_success_at": "<string>",
"last_failure_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"secret": "whsec_3fK8…"
},
"meta": {}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}Authorizations
API key (nlmca_live_…) or OAuth access token
Body
Absolute HTTPS endpoint that receives POSTed events. http://localhost and http://127.0.0.1 are accepted for local development only; hosts that resolve to private, loopback or link-local addresses are rejected.
2048"https://example.com/hooks/nextlevel-mca"
Event types to deliver. An empty array subscribes to every event, including types added later.
deal.created, deal.stage_changed, deal.funded, deal.dead, submission.sent, submission.responded, offer.received, offer.primary_changed, document.uploaded, document.processed, statement.analyzed, advance.renewal_ready, advance.status_changed, business.created, person.created [
"deal.created",
"offer.received",
"document.uploaded"
]
Label shown in Settings → Developers, e.g. the name of the system that consumes the events.
255"Zapier — new deals"
Was this page helpful?