Get a Webhook
Returns one webhook by UUID, including linked collections.
Request
GET /api/webhooks/{webhook} HTTP/1.1
Host: app.nomacms.com
project-id: <project-uuid>
Authorization: Bearer <api-token>
Accept: application/json| Path segment | Description |
|---|---|
{webhook} | Webhook UUID |
Requires the admin ability on the token.
Query parameters
None.
Response (200)
JSON object:
| Field | Type | Description |
|---|---|---|
uuid | string | Webhook UUID |
name | string | Display name |
description | string | null | Notes |
url | string | Delivery URL |
events | string[] | Subscribed events |
sources | string[] | cms and/or api |
payload | boolean | Include full entry in deliveries when applicable |
status | boolean | Enabled or disabled |
collections | array | Linked collections (id, uuid, name, slug) — see List Webhooks |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |
The secret is never returned.
Errors
| Status | When |
|---|---|
| 400 | Missing project-id or project cannot be resolved |
| 401 | Missing or invalid bearer token |
| 403 | Token does not have admin (or *) |
| 404 | Unknown UUID, or webhook belongs to another project (Webhook not found.) |
| 429 | Rate limited |
Example
import { createClient } from "@nomacms/js-sdk"
const client = createClient({
projectId: process.env.NOMA_PROJECT_ID!,
apiKey: process.env.NOMA_API_KEY!,
})
const webhook = await client.webhooks.get(process.env.NOMA_WEBHOOK_UUID!)
console.log(webhook)import axios from "axios"
async function main() {
const uuid = process.env.NOMA_WEBHOOK_UUID!
const { data } = await axios.get(`https://app.nomacms.com/api/webhooks/${uuid}`, {
headers: {
"project-id": process.env.NOMA_PROJECT_ID!,
Authorization: `Bearer ${process.env.NOMA_API_KEY}`,
Accept: "application/json",
},
})
console.log(data)
}
void main()curl -sS "https://app.nomacms.com/api/webhooks/$NOMA_WEBHOOK_UUID" \
-H "project-id: $NOMA_PROJECT_ID" \
-H "Authorization: Bearer $NOMA_API_KEY" \
-H "Accept: application/json"Related
- List Webhooks — All webhooks
- Webhook Logs — Delivery history
- JavaScript SDK — Webhooks —
webhooks.get