API Documentation

Technical documentation for the CockpitMod API Gateway module.

API Gateway add-on required

The CockpitMod REST API is available exclusively to subscribers of the Dirs21 API Gateway module (€29/mo). Activate the module in your account to receive your API credentials.

Authentication

All API requests must include a Bearer token in the Authorization header. Obtain your token from your CockpitMod account under Settings → API Gateway → Credentials. Tokens expire after 24 hours; use the /auth/refresh endpoint to obtain a new token.

Base URL

https://api.cockpitmod.org/v1

Rate limits

Default rate limit: 500 requests per minute per API key. Rate limit headers are included in all responses: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.

Endpoints

EndpointMethodDescription
/reservationsGETList reservations from your Dirs21 account
/reservations/{id}GETGet a single reservation by ID
/guestsGETList guest profiles
/ratesGETList current rate plans
/availabilityGETQuery room availability by date range
/webhooksPOSTRegister a webhook endpoint
/webhooks/{id}DELETERemove a webhook registration
/auth/refreshPOSTRefresh an expiring Bearer token

Webhooks

Register a webhook URL to receive real-time notifications of Dirs21 events: reservation.created, reservation.modified, reservation.cancelled, guest.created, rate.changed. Webhook payloads are signed with HMAC-SHA256 using your webhook secret, which is shown once at registration time.

Your Cart

Your cart is empty.