Webhook API › Webhooks
Endpoints
- GET /webhooks
Retrieve webhooks linked to your application.
- POST /webhooks
Create a new webhook linked to your application.
- GET /webhooks/{id}
Retrieve a single webhook linked to your application.
- PATCH /webhooks/{id}
Update a webhook linked to your application.
- DELETE /webhooks/{id}
Delete a webhook linked to your application.
GET /webhooks
Returns the webhooks linked to your application.
Resource URL
https://api.toornament.com/organizer/v2/webhooksHTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token (see Authorization)
- Rangestring
A range of requested items using the
webhooksunit. The size of the range can not exceed 50. (see Pagination)Example: webhooks=0-49
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": "880097283784269395",
"enabled": false,
"name": "My tournament webhook",
"url": "http:\/\/mytournamentsite.com\/mywebhook"
}
]Structure (collection)
- idstring
The id of the webhook.
Example: "880097283784269395"
- enabledboolean
Whether the webhook is enabled.
Example: false
- namestring
The name of the webhook.
Max. length: 40 characters
Example: "My tournament webhook"
- urlstring
The URL the webhook must call.
Max. length: 255 characters
Example: "http://mytournamentsite.com/mywebhook"
POST /webhooks
Create a new webhook linked to your application.
Resource URL
https://api.toornament.com/organizer/v2/webhooksHTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token (see Authorization)
Query Parameters
This endpoint does not have any query parameters.
Request Body
Webhook data
Example
{
"enabled": false,
"name": "My tournament webhook",
"url": "http:\/\/mytournamentsite.com\/mywebhook"
}Structure (object)
- enabledboolean
Whether the webhook is enabled.
Example: false
- namestring
The name of the webhook.
Max. length: 40 characters
Example: "My tournament webhook"
- urlstring
The URL the webhook must call.
Max. length: 255 characters
Example: "http://mytournamentsite.com/mywebhook"
Response
[201] Webhook created.
Example
{
"id": "880097283784269395",
"enabled": false,
"name": "My tournament webhook",
"url": "http:\/\/mytournamentsite.com\/mywebhook"
}Structure (object)
- idstring
The id of the webhook.
Example: "880097283784269395"
- enabledboolean
Whether the webhook is enabled.
Example: false
- namestring
The name of the webhook.
Max. length: 40 characters
Example: "My tournament webhook"
- urlstring
The URL the webhook must call.
Max. length: 255 characters
Example: "http://mytournamentsite.com/mywebhook"
GET /webhooks/{id}
Returns a single webhook linked to your application.
Resource URL
https://api.toornament.com/organizer/v2/webhooks/{id}HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token (see Authorization)
Path parameters
- idstring
The id of the webhook.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.
Response
[200] Webhook retrieved.
Example
{
"id": "880097283784269395",
"enabled": false,
"name": "My tournament webhook",
"url": "http:\/\/mytournamentsite.com\/mywebhook"
}Structure (object)
- idstring
The id of the webhook.
Example: "880097283784269395"
- enabledboolean
Whether the webhook is enabled.
Example: false
- namestring
The name of the webhook.
Max. length: 40 characters
Example: "My tournament webhook"
- urlstring
The URL the webhook must call.
Max. length: 255 characters
Example: "http://mytournamentsite.com/mywebhook"
PATCH /webhooks/{id}
Updates a single webhook linked to your application.
Resource URL
https://api.toornament.com/organizer/v2/webhooks/{id}HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token (see Authorization)
Path parameters
- idstring
The id of the webhook.
Query Parameters
This endpoint does not have any query parameters.
Request Body
Webhook data
Example
{
"enabled": false,
"name": "My tournament webhook",
"url": "http:\/\/mytournamentsite.com\/mywebhook"
}Structure (object)
- enabledboolean
Optional
Whether the webhook is enabled.
Example: false
- namestring
Optional
The name of the webhook.
Max. length: 40 characters
Example: "My tournament webhook"
- urlstring
Optional
The URL the webhook must call.
Max. length: 255 characters
Example: "http://mytournamentsite.com/mywebhook"
Response
[200] Success.
Example
{
"id": "880097283784269395",
"enabled": false,
"name": "My tournament webhook",
"url": "http:\/\/mytournamentsite.com\/mywebhook"
}Structure (object)
- idstring
The id of the webhook.
Example: "880097283784269395"
- enabledboolean
Whether the webhook is enabled.
Example: false
- namestring
The name of the webhook.
Max. length: 40 characters
Example: "My tournament webhook"
- urlstring
The URL the webhook must call.
Max. length: 255 characters
Example: "http://mytournamentsite.com/mywebhook"
DELETE /webhooks/{id}
Deletes a single webhook linked to your application.
Resource URL
https://api.toornament.com/organizer/v2/webhooks/{id}HTTP headers
- X-Api-Keystring
API key of your application (see Authentication)
- Authorizationstring
Access token (see Authorization)
Path parameters
- idstring
The id of the webhook.
Query Parameters
This endpoint does not have any query parameters.
Request Body
This endpoint does not require a request body.