Skip to guide
NightCrew Docs

Documentation›Platform›Developer API & Webhooks

Platform

Developer API & Webhooks

Connect websites and services using server-scoped credentials and signed event deliveries.

Updated October 21, 20262 min read

Getting started

1

Choose scopes

Create a named read-only API key with only the server.read, modules.read, or analytics.read scopes the integration needs.

2

Set a policy

Choose an expiration period and a per-key rate limit from 10 to 600 requests per minute, then copy the key once.

3

Call the API

Send the key as `Authorization: Bearer nc_live_...` to /api/v1/server, /api/v1/modules, or /api/v1/analytics.

4

Debug responses

Use the response _meta request ID, API version, and response time plus the dashboard request activity stream.

5

Create a webhook

Enter a public HTTPS endpoint, select events, copy the signing secret once, and run Test.

6

Verify delivery

Compute HMAC-SHA256 over the raw request body and compare it to X-NightCrew-Signature before processing JSON.

7

Operate access

Rotate or revoke API keys; test, pause, enable, rotate the signing secret, or delete webhooks; review sanitized delivery receipts and failures.

Settings reference

Use this reference when you need to check what a setting does.

Key prefix

Safe identifier shown after the one-time secret disappears.

Scopes

Explicit server.read, modules.read, and analytics.read permissions.

Expiration

Date after which authentication returns API key expired.

Rate limit

Maximum successful calls per rolling minute for one key.

Request ID

Diagnostic identifier returned in _meta and shown in activity.

Signing secret

HMAC-SHA256 secret shown once for one webhook.

Delivery receipt

Sanitized event, status, HTTP code, and response time without payload or IP retention.

How it works

Here’s what happens once you’ve finished setup.

  1. 1
    Client

    Sends the API key only from a trusted server environment.

  2. 2
    NightCrew

    Hashes authentication, checks scope, expiration, and rate limit, then returns v1 data with _meta.

  3. 3
    Event

    NightCrew signs the raw webhook body and sends delivery headers.

  4. 4
    Receiver

    Verifies the signature before parsing or acting on the payload.

Example

EXAMPLE
Read-only website integration

Create a 90-day key with server.read and analytics.read, use a conservative rate limit, store it in the host secret manager, and rotate it before expiration.

Tips

i

Store secrets in environment variables or a secret manager, never client-side JavaScript.

Things to know

!

Never place API keys or signing secrets in browser JavaScript, public repositories, screenshots, or support messages.

Troubleshooting

401 API key expired

Create or rotate the credential and update the trusted server secret.

403 Missing API scope

Create a least-privilege key containing the endpoint's required scope.

429 rate limit

Honor Retry-After and reduce polling.

Webhook disables itself

Ten consecutive failures pause it; correct the endpoint, enable it, and run Test.