Get started
Webhooks

Test your endpoint

Test your endpoint

Send your endpoint a test event of any type, before real events reach it.

curl -s -X POST "https://api.mountaya.com/v1/organizations/$MOUNTAYA_ORGANIZATION_ID/webhook-deliveries" \
  -H "X-API-Key: $MOUNTAYA_MANAGEMENT_KEY" \
  -H "X-Session-Token: $MOUNTAYA_SESSION_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d "{\"webhook_endpoint_id\": \"$MOUNTAYA_WEBHOOK_ENDPOINT_ID\", \"test\": {\"type\": \"organization.member.updated\"}}" \
  | jq '.data | {id, kind, event_type, delivery_id}'
Response
{
  "id": "019a8ef4-07c2-7e18-b3d5-2c6a9f8e1d40",
  "kind": "test",
  "event_type": "organization.member.updated",
  "delivery_id": "019a8ef4-07c5-71a3-9b8d-4e2f6c0a5b19"
}

The samples use the management key and an owner's or admin's session token, as in Webhook endpoints. In the Mountaya app, open the endpoint under Organization → Webhooks and select Send test event.

A test event carries the example payload of its type, as Event types shows it, with an id of its own. It is signed like any delivery, sent once, and never retried.

Receive on your machine

Mountaya delivers only to https URLs on public addresses, never to localhost. Give your local receiver a public https URL with a tunnel, then create an endpoint for it.

1

Run your receiver

Start one of the signature samples on your machine, listening on port 8000.

2

Open a tunnel

Any tunnel that forwards a public https URL to your port works:

Terminal
cloudflared tunnel --url http://localhost:8000

3

Create an endpoint for it

Create an endpoint for the URL the tunnel prints, in an organization you use for development. Store its secret as MOUNTAYA_WEBHOOK_SECRET. See Webhook endpoints.

4

Send a test event

Send a test, as above, and watch your receiver print it.

Delete the endpoint when you are done, so real events stop going to your machine.

Check your verifier offline

The published signature test vectors cover a valid delivery, a rotation, a changed body and an expired timestamp. Run your verifier against them in your test suite.

Next steps

Last updated