Webhook API › Webhooks

GET /webhooks

Returns the webhooks linked to your application.

Resource URL

https://api.toornament.com/organizer/v2/webhooks

HTTP headers

  • X-Api-Key
    string

    API key of your application (see Authentication)

  • Authorization
    string

    Access token (see Authorization)

  • Range
    string

    A range of requested items using the webhooks unit. 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)
  • id
    string

    The id of the webhook.

    Example: "880097283784269395"

  • enabled
    boolean

    Whether the webhook is enabled.

    Example: false

  • name
    string

    The name of the webhook.

    Max. length: 40 characters

    Example: "My tournament webhook"

  • url
    string

    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/webhooks

HTTP headers

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)
  • enabled
    boolean

    Whether the webhook is enabled.

    Example: false

  • name
    string

    The name of the webhook.

    Max. length: 40 characters

    Example: "My tournament webhook"

  • url
    string

    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)
  • id
    string

    The id of the webhook.

    Example: "880097283784269395"

  • enabled
    boolean

    Whether the webhook is enabled.

    Example: false

  • name
    string

    The name of the webhook.

    Max. length: 40 characters

    Example: "My tournament webhook"

  • url
    string

    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

Path parameters

  • id
    string

    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)
  • id
    string

    The id of the webhook.

    Example: "880097283784269395"

  • enabled
    boolean

    Whether the webhook is enabled.

    Example: false

  • name
    string

    The name of the webhook.

    Max. length: 40 characters

    Example: "My tournament webhook"

  • url
    string

    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

Path parameters

  • id
    string

    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)
  • enabled
    boolean

    Optional

    Whether the webhook is enabled.

    Example: false

  • name
    string

    Optional

    The name of the webhook.

    Max. length: 40 characters

    Example: "My tournament webhook"

  • url
    string

    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)
  • id
    string

    The id of the webhook.

    Example: "880097283784269395"

  • enabled
    boolean

    Whether the webhook is enabled.

    Example: false

  • name
    string

    The name of the webhook.

    Max. length: 40 characters

    Example: "My tournament webhook"

  • url
    string

    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

Path parameters

  • id
    string

    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

[204] Success.