Noma

Get a Webhook

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 segmentDescription
{webhook}Webhook UUID

Requires the admin ability on the token.

Query parameters

None.

Response (200)

JSON object:

FieldTypeDescription
uuidstringWebhook UUID
namestringDisplay name
descriptionstring | nullNotes
urlstringDelivery URL
eventsstring[]Subscribed events
sourcesstring[]cms and/or api
payloadbooleanInclude full entry in deliveries when applicable
statusbooleanEnabled or disabled
collectionsarrayLinked collections (id, uuid, name, slug) — see List Webhooks
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp

The secret is never returned.

Errors

StatusWhen
400Missing project-id or project cannot be resolved
401Missing or invalid bearer token
403Token does not have admin (or *)
404Unknown UUID, or webhook belongs to another project (Webhook not found.)
429Rate 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"
  • List Webhooks — All webhooks
  • Webhook Logs — Delivery history
  • JavaScript SDK — Webhookswebhooks.get

Search documentation

Find guides and reference pages