Webhook API › Webhook subscriptions
Endpoints
- GET /webhooks/{webhook_id}/subscriptions
Retrieve the subscriptions to a webhook.
- POST /webhooks/{webhook_id}/subscriptions
Create a new subscription to a webhook.
- GET /webhooks/{webhook_id}/subscriptions/{id}
Retrieve a single subscription of a webhook.
- PATCH /webhooks/{webhook_id}/subscriptions/{id}
Update a subscription to a webhook.
- DELETE /webhooks/{webhook_id}/subscriptions/{id}
Delete a subscription to a webhook.
GET /webhooks/{webhook_id}/subscriptions
Returns the subscriptions to a webhook.
Resource URL
https://api.toornament.com/organizer/v2/webhooks/{webhook_id}/subscriptions
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token (see Authorization)
- Rangestring
A range of requested items using the
subscriptions
unit. The size of the range can not exceed 50. (see Pagination)Example: subscriptions=0-49
Path parameters
- webhook_idstring
The id of the subscription's webhook.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.
Response
[206] Webhooks retrieved
Example
[ { "id": "378426939508809728", "event_name": "registration.created", "scope": "tournament", "scope_id": "842693950880972837" } ]
Structure (collection)
- idstring
The unique identifier of the subscription.
Example: "378426939508809728"
- event_namestring
The type of event you want to subscribe to.
Possible values: registration.created, registration.info_updated, registration.accepted, registration.refused, registration.reset, registration.cancelled, registration.deleted, participant.checked_in, participant.unchecked_in, participant.created, participant.deleted, participant.info_updated, registration.payment_pending, registration.payment_skipped, registration.payment_completed, registration.payment_refund, registration.payment_failed, tournament.created, tournament.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed, tournament.custom_fields_updated, tournament.sponsors_updated, tournament.standing_updated, tournament.deleted, stage.created, stage.info_updated, stage.structure_updated, stage.status_updated, stage.deleted, team.created, team.lineup_changed, team.disbanded
- scopestring
The scope the event you are subscribing to is a part of.
Possible values: tournament, project, platform
- scope_idstring
The unique identifier of the entity linked to the scope.
Example: "842693950880972837"
POST /webhooks/{webhook_id}/subscriptions
Creates a new subscription to a webhook.
Resource URL
https://api.toornament.com/organizer/v2/webhooks/{webhook_id}/subscriptions
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token (see Authorization)
Path parameters
- webhook_idstring
The id of the subscription's webhook.
Query Parameters
This endpoint does not have any query parameters.
Request Body
Subscription data
Example
{ "event_name": "registration.created", "scope": "tournament", "scope_id": "842693950880972837" }
Structure (object)
- event_namestring
The type of event you want to subscribe to.
Possible values: registration.created, registration.info_updated, registration.accepted, registration.refused, registration.reset, registration.cancelled, registration.deleted, participant.checked_in, participant.unchecked_in, participant.created, participant.deleted, participant.info_updated, registration.payment_pending, registration.payment_skipped, registration.payment_completed, registration.payment_refund, registration.payment_failed, tournament.created, tournament.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed, tournament.custom_fields_updated, tournament.sponsors_updated, tournament.standing_updated, tournament.deleted, stage.created, stage.info_updated, stage.structure_updated, stage.status_updated, stage.deleted, team.created, team.lineup_changed, team.disbanded
- scopestring
The scope the event you are subscribing to is a part of.
Possible values: tournament, project, platform
- scope_idstring
The unique identifier of the entity linked to the scope.
Example: "842693950880972837"
Response
[201] Subscription created
Example
{ "id": "378426939508809728", "event_name": "registration.created", "scope": "tournament", "scope_id": "842693950880972837" }
Structure (object)
- idstring
The unique identifier of the subscription.
Example: "378426939508809728"
- event_namestring
The type of event you want to subscribe to.
Possible values: registration.created, registration.info_updated, registration.accepted, registration.refused, registration.reset, registration.cancelled, registration.deleted, participant.checked_in, participant.unchecked_in, participant.created, participant.deleted, participant.info_updated, registration.payment_pending, registration.payment_skipped, registration.payment_completed, registration.payment_refund, registration.payment_failed, tournament.created, tournament.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed, tournament.custom_fields_updated, tournament.sponsors_updated, tournament.standing_updated, tournament.deleted, stage.created, stage.info_updated, stage.structure_updated, stage.status_updated, stage.deleted, team.created, team.lineup_changed, team.disbanded
- scopestring
The scope the event you are subscribing to is a part of.
Possible values: tournament, project, platform
- scope_idstring
The unique identifier of the entity linked to the scope.
Example: "842693950880972837"
GET /webhooks/{webhook_id}/subscriptions/{id}
Returns a subscription identified with the given id.
Resource URL
https://api.toornament.com/organizer/v2/webhooks/{webhook_id}/subscriptions/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token (see Authorization)
Path parameters
- webhook_idstring
The id of the subscription's webhook.
- idstring
The id of the subscription.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.
Response
[200] Subscription retrieved
Example
{ "id": "378426939508809728", "event_name": "registration.created", "scope": "tournament", "scope_id": "842693950880972837" }
Structure (object)
- idstring
The unique identifier of the subscription.
Example: "378426939508809728"
- event_namestring
The type of event you want to subscribe to.
Possible values: registration.created, registration.info_updated, registration.accepted, registration.refused, registration.reset, registration.cancelled, registration.deleted, participant.checked_in, participant.unchecked_in, participant.created, participant.deleted, participant.info_updated, registration.payment_pending, registration.payment_skipped, registration.payment_completed, registration.payment_refund, registration.payment_failed, tournament.created, tournament.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed, tournament.custom_fields_updated, tournament.sponsors_updated, tournament.standing_updated, tournament.deleted, stage.created, stage.info_updated, stage.structure_updated, stage.status_updated, stage.deleted, team.created, team.lineup_changed, team.disbanded
- scopestring
The scope the event you are subscribing to is a part of.
Possible values: tournament, project, platform
- scope_idstring
The unique identifier of the entity linked to the scope.
Example: "842693950880972837"
PATCH /webhooks/{webhook_id}/subscriptions/{id}
Updates a single subscription to a webhook.
Resource URL
https://api.toornament.com/organizer/v2/webhooks/{webhook_id}/subscriptions/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token (see Authorization)
Path parameters
- webhook_idstring
The id of the subscription's webhook.
- idstring
The id of the subscription.
Query Parameters
This endpoint does not have any query parameters.
Request Body
Subscription data
Example
{ "event_name": "registration.created", "scope": "tournament", "scope_id": "842693950880972837" }
Structure (object)
- event_namestring
Optional
The type of event you want to subscribe to.
Possible values: registration.created, registration.info_updated, registration.accepted, registration.refused, registration.reset, registration.cancelled, registration.deleted, participant.checked_in, participant.unchecked_in, participant.created, participant.deleted, participant.info_updated, registration.payment_pending, registration.payment_skipped, registration.payment_completed, registration.payment_refund, registration.payment_failed, tournament.created, tournament.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed, tournament.custom_fields_updated, tournament.sponsors_updated, tournament.standing_updated, tournament.deleted, stage.created, stage.info_updated, stage.structure_updated, stage.status_updated, stage.deleted, team.created, team.lineup_changed, team.disbanded
- scopestring
Optional
The scope the event you are subscribing to is a part of.
Possible values: tournament, project, platform
- scope_idstring
Optional
The unique identifier of the entity linked to the scope.
Example: "842693950880972837"
Response
[200] Success
Example
{ "id": "378426939508809728", "event_name": "registration.created", "scope": "tournament", "scope_id": "842693950880972837" }
Structure (object)
- idstring
The unique identifier of the subscription.
Example: "378426939508809728"
- event_namestring
The type of event you want to subscribe to.
Possible values: registration.created, registration.info_updated, registration.accepted, registration.refused, registration.reset, registration.cancelled, registration.deleted, participant.checked_in, participant.unchecked_in, participant.created, participant.deleted, participant.info_updated, registration.payment_pending, registration.payment_skipped, registration.payment_completed, registration.payment_refund, registration.payment_failed, tournament.created, tournament.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed, tournament.custom_fields_updated, tournament.sponsors_updated, tournament.standing_updated, tournament.deleted, stage.created, stage.info_updated, stage.structure_updated, stage.status_updated, stage.deleted, team.created, team.lineup_changed, team.disbanded
- scopestring
The scope the event you are subscribing to is a part of.
Possible values: tournament, project, platform
- scope_idstring
The unique identifier of the entity linked to the scope.
Example: "842693950880972837"
DELETE /webhooks/{webhook_id}/subscriptions/{id}
Deletes a single subscription to a webhook.
Resource URL
https://api.toornament.com/organizer/v2/webhooks/{webhook_id}/subscriptions/{id}
HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token (see Authorization)
Path parameters
- webhook_idstring
The id of the subscription's webhook.
- idstring
The id of the subscription.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.