API Reference
Key Admin
Messaging and integrations

Event subscriptions (webhooks)

Event subscriptions push real-time events (calls, call records, voicemail, messages, presence and more) to a URL on your server, so you don't have to poll.

In the Key Admin this is the Event subscriptions (webhooks) switch. Read lets a key call the GET endpoints below. Write lets it call the ones that change data.

List event subscriptions

GET/domains/~/subscriptions

Returns the event subscriptions on the account.

Read Key Admin switch: Event subscriptions (webhooks), Read. Read only keys also work.

Example request

curl -X GET "https://api.noodlevoice.com/ns-api/v2/domains/~/subscriptions" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY"
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/subscriptions", {
  method: "GET",
  headers: {
    Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
  },
});
const data = await res.json();
import os, requests

r = requests.get(
    "https://api.noodlevoice.com/ns-api/v2/domains/~/subscriptions",
    headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
)
print(r.status_code, r.json())

Response 200

[
  {
    "id": "string",
    "model": "agent",
    "post-url": "https://example.com/webhooks/noodlevoice",
    "subscription-geo-support": "yes",
    "user-scope": "Basic User",
    "reseller": "string",
    "domain": "*",
    "user": "*",
    "...": "7 more fields"
  }
]
Response fields (15)
FieldTypeNotes
idstringThe item's ID.
modelstringWhich kind of event to send. One of: agent, auditlog, auditlog_lite, call, call_origid, cdr, message, messagesession, subscriber, presence, voicemail
post-urlstringThe HTTPS address events are sent to. It needs a valid certificate.
subscription-geo-supportstring One of: yes, no Default yes
user-scopestringThe user's permission level, such as Basic User or Office Manager. One of: Basic User, Simple User, Advanced User, Call Center Agent, Site Manager, Call Center Supervisor, Office Manager, Reseller, Super User, NDP, No Portal Default Basic User
resellerstringThe parent account group. Set by the platform.
domainstringThe account the item belongs to. Default *
userstringThe user ID (extension). Default *
subscription-creation-datetimestring (date-time)Subscription creation (date and time).
subscription-expires-datetimestring (date-time)Subscription expires (date and time).
preferred-serverstring (hostname)
current-active-serverstring (hostname)
statusstringCurrent status. One of: pending, active, error
error-countintegerNumber of error.
posts-countintegerNumber of posts.

Create an event subscription

POST/domains/~/subscriptions

Adds a new event subscription on the account.

Write Key Admin switch: Event subscriptions (webhooks), Write.

Request body application/json

FieldTypeNotes
modelstringWhich kind of event to send. One of: agent, auditlog, auditlog_lite, call, call_origid, cdr, message, messagesession, subscriber, presence, voicemail
post-urlstringThe HTTPS address events are sent to. It needs a valid certificate.
subscription-geo-supportstring One of: yes, no Default yes
resellerstringThe parent account group. Set by the platform.
domainstringThe account the item belongs to. Default *
userstringThe user ID (extension). Default *
subscription-expires-datetimestring (date-time)Subscription expires (date and time).
preferred-serverstring (hostname)

Example request

curl -X POST "https://api.noodlevoice.com/ns-api/v2/domains/~/subscriptions" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "agent",
    "post-url": "https://example.com/webhooks/noodlevoice",
    "subscription-geo-support": "yes",
    "reseller": "string",
    "domain": "*"
  }'
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/subscriptions", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "agent",
    "post-url": "https://example.com/webhooks/noodlevoice",
    "subscription-geo-support": "yes",
    "reseller": "string",
    "domain": "*"
  }),
});
const data = await res.json();
import os, requests

r = requests.post(
    "https://api.noodlevoice.com/ns-api/v2/domains/~/subscriptions",
    headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
    json={
        "model": "agent",
        "post-url": "https://example.com/webhooks/noodlevoice",
        "subscription-geo-support": "yes",
        "reseller": "string",
        "domain": "*"
    },
)
print(r.status_code, r.json())

Response 200

Returns a status code with a short JSON message.

Other responses: 400, 401, 404, 409. See errors.

Update an event subscription

PUT/domains/~/subscriptions/{id}

Changes an existing event subscription. Send the fields you want to set in the body.

Write Key Admin switch: Event subscriptions (webhooks), Write.

Parameters

NameInTypeNotes
id requiredpathstringThe ID of the item, as returned when you list or create it.

Request body application/json

FieldTypeNotes
modelstringWhich kind of event to send. One of: agent, auditlog, auditlog_lite, call, call_origid, cdr, message, messagesession, subscriber, presence, voicemail
post-urlstringThe HTTPS address events are sent to. It needs a valid certificate.
subscription-geo-supportstring One of: yes, no Default yes
subscription-expires-datetimestring (date-time)Subscription expires (date and time).
preferred-serverstring (hostname)
error-countintegerNumber of error.
posts-countintegerNumber of posts.

Example request

curl -X PUT "https://api.noodlevoice.com/ns-api/v2/domains/~/subscriptions/{id}" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "agent",
    "post-url": "https://example.com/webhooks/noodlevoice",
    "subscription-geo-support": "yes",
    "subscription-expires-datetime": "2026-11-02 09:00:00",
    "preferred-server": "string"
  }'
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/subscriptions/{id}", {
  method: "PUT",
  headers: {
    Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "agent",
    "post-url": "https://example.com/webhooks/noodlevoice",
    "subscription-geo-support": "yes",
    "subscription-expires-datetime": "2026-11-02 09:00:00",
    "preferred-server": "string"
  }),
});
const data = await res.json();
import os, requests

r = requests.put(
    "https://api.noodlevoice.com/ns-api/v2/domains/~/subscriptions/{id}",
    headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
    json={
        "model": "agent",
        "post-url": "https://example.com/webhooks/noodlevoice",
        "subscription-geo-support": "yes",
        "subscription-expires-datetime": "2026-11-02 09:00:00",
        "preferred-server": "string"
    },
)
print(r.status_code, r.json())

Response 202

{
  "code": 1,
  "message": "Hello from NoodleVoice"
}
Response fields (2)
FieldTypeNotes
codeintegerHTTP status code.
messagestringWhat happened, in words.

Delete an event subscription

DELETE/domains/~/subscriptions/{id}

Removes an event subscription. This can't be undone.

Write Key Admin switch: Event subscriptions (webhooks), Write.

Parameters

NameInTypeNotes
id requiredpathstringThe ID of the item, as returned when you list or create it.

Example request

curl -X DELETE "https://api.noodlevoice.com/ns-api/v2/domains/~/subscriptions/{id}" \
  -H "Authorization: Bearer $NOODLEVOICE_KEY"
const res = await fetch("https://api.noodlevoice.com/ns-api/v2/domains/~/subscriptions/{id}", {
  method: "DELETE",
  headers: {
    Authorization: "Bearer " + process.env.NOODLEVOICE_KEY,
  },
});
const data = await res.json();
import os, requests

r = requests.delete(
    "https://api.noodlevoice.com/ns-api/v2/domains/~/subscriptions/{id}",
    headers={"Authorization": "Bearer " + os.environ["NOODLEVOICE_KEY"]},
)
print(r.status_code, r.json())

Response 202

{
  "code": 1,
  "message": "Hello from NoodleVoice"
}
Response fields (2)
FieldTypeNotes
codeintegerHTTP status code.
messagestringWhat happened, in words.