Skip to main content

Inbound Webhooks (Admin)

Create and manage inbound webhooks: schemas and previews, reader roles, settings, signing secrets, docs and deletion.

List inbound webhooks

GET/api/admin/inbound-webhooks

Authentication: Admin session token (Authorization: Bearer <token>)

Parameters

NameInTypeRequiredDescription
projectIdquerystringno

Responses

StatusDescriptionBody
200Webhooks, newest first.

Open in Swagger (opens in a new tab)

Create an inbound webhook

POST/api/admin/inbound-webhooks

The schema is validated up front. Name the Discord roles that may read submissions, or omit allowedRoleIds to use the default reader roles (MC Executive unless changed in the settings). At least one role must result - unlike project_roles, an empty role set means nobody, not everybody. The signing secret is returned exactly once.

Authentication: Admin session token (Authorization: Bearer <token>)

Request body (JSON, required): CreateInboundWebhookDto schema.

Responses

StatusDescriptionBody
201Created; signingSecret returned once.
400Invalid schema, or unknown/foreign roles.
409Slug already used by this project.

Open in Swagger (opens in a new tab)

Check a schema and preview its docs

POST/api/admin/inbound-webhooks/schema/preview

Runs the same validator as create without saving anything, for the admin schema editor. An invalid schema is a normal 200 with ok: false and every problem with its path; a valid one returns the generated developer docs and an example payload, with placeholders for what only exists once the webhook is saved (its ID and readers). Nothing is stored or audited.

Authentication: Admin session token (Authorization: Bearer <token>)

Request body (JSON, required): PreviewInboundWebhookSchemaDto schema.

Responses

StatusDescriptionBody
200{ ok: false, errors: [{ path, code, message }] } or { ok: true, markdown, examplePayload }.
400The request itself is malformed.

Open in Swagger (opens in a new tab)

Get the inbound webhook settings

GET/api/admin/inbound-webhooks/settings

The default reader roles new webhooks get when their creator names none. source is environment until the setting is first saved, when it falls back to the executive role.

Authentication: Admin session token (Authorization: Bearer <token>)

Responses

StatusDescriptionBody
200The effective settings.

Open in Swagger (opens in a new tab)

Replace the default reader roles

PUT/api/admin/inbound-webhooks/settings

Applies to webhooks created afterwards; existing webhooks keep their roles. An empty list means no defaults.

Authentication: Admin session token (Authorization: Bearer <token>)

Request body (JSON, required): UpdateInboundWebhookSettingsDto schema.

Responses

StatusDescriptionBody
200The settings after the change.
400Unknown role IDs.

Open in Swagger (opens in a new tab)

Get one inbound webhook

GET/api/admin/inbound-webhooks/{id}

Authentication: Admin session token (Authorization: Bearer <token>)

Parameters

NameInTypeRequiredDescription
idpathstringyes

Responses

StatusDescriptionBody
200object
404No such webhook.

Open in Swagger (opens in a new tab)

Update an inbound webhook

PATCH/api/admin/inbound-webhooks/{id}

Authentication: Admin session token (Authorization: Bearer <token>)

Parameters

NameInTypeRequiredDescription
idpathstringyes

Request body (JSON, required): UpdateInboundWebhookDto schema.

Responses

StatusDescriptionBody
200object
400Invalid schema.

Open in Swagger (opens in a new tab)

Delete an inbound webhook and all its submissions

DELETE/api/admin/inbound-webhooks/{id}

Authentication: Admin session token (Authorization: Bearer <token>)

Parameters

NameInTypeRequiredDescription
idpathstringyes

Responses

StatusDescriptionBody
204Deleted.

Open in Swagger (opens in a new tab)

Export developer documentation for this webhook

GET/api/admin/inbound-webhooks/{id}/docs

Generated from the live schema, so it can never drift from what the validator enforces. Markdown is a ready-to-share integration guide (endpoint, auth, signing code in JS and Python, every field with its constraints, an example payload, the full error table, and who may read submissions). OpenAPI is an importable 3.1 spec for Postman, Insomnia or client codegen.

Authentication: Admin session token (Authorization: Bearer <token>)

Parameters

NameInTypeRequiredDescription
idpathstringyes
formatquery"markdown" or "openapi"noDefaults to markdown.
downloadquerystringnoSet to "true" to receive it as a file attachment.

Responses

StatusDescriptionBody
200The rendered documentation.
404No such webhook.

Open in Swagger (opens in a new tab)

List the Discord roles permitted to read submissions

GET/api/admin/inbound-webhooks/{id}/roles

Authentication: Admin session token (Authorization: Bearer <token>)

Parameters

NameInTypeRequiredDescription
idpathstringyes

Responses

StatusDescriptionBody
200

Open in Swagger (opens in a new tab)

Replace the read-access role grants

PUT/api/admin/inbound-webhooks/{id}/roles

The set can never be emptied - removing the last role is a deletion of the webhook.

Authentication: Admin session token (Authorization: Bearer <token>)

Parameters

NameInTypeRequiredDescription
idpathstringyes

Request body (JSON, required): SetAllowedRolesDto schema.

Responses

StatusDescriptionBody
200
400Empty set, or unknown/foreign roles.

Open in Swagger (opens in a new tab)

Rotate the signing secret

POST/api/admin/inbound-webhooks/{id}/rotate-secret

Returned exactly once. Previously issued signatures stop verifying.

Authentication: Admin session token (Authorization: Bearer <token>)

Parameters

NameInTypeRequiredDescription
idpathstringyes

Responses

StatusDescriptionBody
201

Open in Swagger (opens in a new tab)

Schemas

CreateInboundWebhookDto schema

FieldTypeRequiredDescription
acceptedOriginsarray of stringnoOrigins permitted to call this webhook. Empty = no check.
allowRoleInheritancebooleannoWhen true, a member can also read this webhook's submissions through role inheritance: a role they hold on the main server that is the source of an enabled inheritance rule covering the server of a granted role counts as that granted role, matched by role name. Off by default: data access should be explicit. Default: false.
allowedRoleIdsarray of stringnoDiscord role IDs permitted to READ submissions. When omitted, the configured default reader roles are used (MC Executive unless changed in the inbound webhook settings); when given, exactly these roles are used. At least one role must result.
namestringyes
projectIdstringyesThe project this webhook belongs to.
rejectUnknownFieldsbooleannoDefault: true.
requireSignaturebooleannoDefault: true.
schemaobjectyesThe shape of what callers send. Either steps (a multi-step form; the payload is keyed by step) or fields (a flat payload, for an event or any non-form data), not both. Validated by the Layer-1 schema validator.
slugstringyesURL-safe identifier, unique within the project.

PreviewInboundWebhookSchemaDto schema

FieldTypeRequiredDescription
acceptedOriginsarray of stringnoOrigins the docs list as permitted. Empty = any origin.
namestringnoShown as the title of the generated docs.
rejectUnknownFieldsbooleannoWhether the docs say unknown fields are rejected. Default: true.
requireSignaturebooleannoWhether the docs describe request signing. Default: true.
schemaobjectyesEither steps or flat fields, not both; checked by the same validator that create uses.

SetAllowedRolesDto schema

FieldTypeRequiredDescription
roleIdsarray of stringyes

UpdateInboundWebhookDto schema

FieldTypeRequiredDescription
acceptedOriginsarray of stringno
allowRoleInheritancebooleannoLet role inheritance rules grant read access to this webhook. See the create request for the rule.
isActivebooleanno
namestringno
rejectUnknownFieldsbooleanno
requireSignaturebooleanno
schemaobjectnoEither steps or flat fields, not both; re-validated on update.

UpdateInboundWebhookSettingsDto schema

FieldTypeRequiredDescription
defaultReaderRoleIdsarray of stringyesDiscord role IDs given read access to every NEW inbound webhook whose creator names no roles. An empty list means no defaults. Existing webhooks keep the roles they already have.

Source: apps/api/openapi.json.