Webhooks
Crux can emit webhooks for certain events. This allows you to develop integrations with Crux that are notified when certain events occur.
Webhook Typesβ
We have two types of webhook types, user
and gym
webhooks.
User webhooks pertain to your own user and are triggered when you do different things on Crux. You can only register user webhooks for yourself.
Gym webhooks pertain to a specific gym and can be triggered by anyone at the gym. You can only register gym webhooks if you are a gym admin.
Registering a webhookβ
To register a user webhook, head to the user settings and tap User webhooks
. To register a gym webhook, head to the gym settings and tap Gym webhooks
.
Webhooks must be registered with a publically accessible http or https endpoint.
Webhook Deliveryβ
Webhook events are delivered via POST request to the URL you provided. The body of the request will be a JSON object containing the event data.
You must return a HTTP 200 response to acknowledge receipt of the webhook. If you do not respond, the delivery will be retried up to 3 times before failing.
All webhook deliveries have a timeout of 5 seconds.
Delivery Introspectionβ
We do not currently have a UI to view details about webhook deliveries. You can view details about recent delivery attempts via the webhook_registrations APIs however.
Available Webhook Eventsβ
Gym Eventsβ
climb.created
β
This event is triggered when any climb is created at the gym.
Returns a WebhookDelivery object with a
payload
field of type Climb (full).
climb.sent
β
This event is triggered when any climb at the gym is sent by any climber.
Returns a WebhookDelivery object with a
payload
field of type Send (full).
gym_wall.created
β
This event is triggered when a gym wall is created at the gym.
Returns a WebhookDelivery object with a
payload
field of type GymWall.
User Eventsβ
climb.created
β
This event is triggered when a climb is set by the user.
Returns a WebhookDelivery object with a
payload
field of type Climb (full).
climb.sent
β
This event is triggered when a climb is sent by the user.
Returns a WebhookDelivery object with a
payload
field of type Send (full).
climb.viewed
β
This event is triggered when a climb is viewed by the user in the Crux app. Specifically, the event is triggered when the user taps on a climb in the climb directory or a climb list to view it.
Returns a WebhookDelivery object with a
payload
field of type Climb (full).