NylorunDocsBeta
Runtime APIAgentsTriggers

Make a webhook trigger's signing secret

POST
/v1/agents/{agentId}/triggers/{triggerId}/secret

A new Standard Webhooks secret (whsec_…) for a webhook trigger, shown this once; the one before stops working at once. Give it to the sender with the trigger's webhookUrl.

Authorization

headerAuthorizationBearer <token>

An application key of the Tenant (PUT /v1/tenant/keys/{keyId}), or Studio's key, derived from the admin key. With Nylorun-Subject and Nylorun-Scopes, it acts for that person, narrowed to those scopes. Never accepted from a browser (Origin).

Path Parameters

agentId*string

The Agent id, percent-encoded

triggerId*string

The trigger's id in the manifest's runtime.triggers

Header Parameters

Nylorun-Protocol*string

The protocol version, 18

Nylorun-Subject?string

The person an application key acts for

Nylorun-Scopes?string

The subject's space-separated scopes; required with a subject

Response Body

The secret, this once

application/json
  1. response
triggerId*string
webhookUrl*string
secret*string
import { createClient } from "@nylorun/agents";const client = await createClient();const { webhookUrl, secret } = await client.agents.rotateWebhookSecret(  "users/alice/assistant",  "github",); // the secret is shown once
{  "triggerId": "string",  "webhookUrl": "string",  "secret": "string"}