---
title: "Create a webhook subscription"
method: POST
path: "/api/webhooksubscriptions"
tags: ["Webhook subscriptions"]
---

# Create a webhook subscription

`POST /api/webhooksubscriptions`

## Request

- Base URL: `https://api.gymflexa.com`
- URL: `https://api.gymflexa.com/api/webhooksubscriptions`
- Auth: API key in header `Authorization`

The response includes the signing `secret` exactly once — store it; it cannot be retrieved again.

## Request body

- object
  - `gymId` string, required
  - `url` string, required
  - `events` string[]: Empty array subscribes to all events

## Response `200`

The created subscription, including its secret

---

[API](https://skmtc.dev/gymflexa/apis/gymflexa-api.md) · [All operations](https://skmtc.dev/gymflexa/apis/gymflexa-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gymflexa/apis/gymflexa-api/revisions/23c38326a799?raw)
