Skip to Content

Get a webhook signing secret

Returns the endpoint's current signing secret and when a rotated-out secret stops verifying. It needs the same permission as rotating the secret.

GET
/v1/webhooks/{id}/secret

Returns the endpoint's current signing secret and when a rotated-out secret stops verifying. It needs the same permission as rotating the secret.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^wep_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

WebhookSigningSecret

application/json
  1. response
secret*string
createdAt*string
previousExpiresAt*string|null
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.webhooks.getSecret({
  "id": "example"
});
Example Response
{
  "secret": "string",
  "createdAt": "string",
  "previousExpiresAt": "string"
}

Related documentation