Webhooks

GET /webhooks

Authorized Access

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
[
    {
        "enabled": false,
        "name": "My tournament webhook",
        "url": "http:\/\/mytournamentsite.com\/mywebhook",
        "id": "880097283784269395"
    }
]
Structure (collection)
  • enabled
    boolean

    Whether the webhook is enabled.

    Example: false

  • name
    string

    The name of the webhook.

    Max. length: 30 characters

    Example: "My tournament webhook"

  • url
    string

    The URL the webhook must call.

    Max. length: 255 characters

    Example: "http://mytournamentsite.com/mywebhook"

  • id
    string

    The id of the webhook.

    Example: "880097283784269395"

POST /webhooks

Authorized Access

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: 30 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
[
    {
        "enabled": false,
        "name": "My tournament webhook",
        "url": "http:\/\/mytournamentsite.com\/mywebhook",
        "id": "880097283784269395"
    }
]
Structure (collection)
  • enabled
    boolean

    Whether the webhook is enabled.

    Example: false

  • name
    string

    The name of the webhook.

    Max. length: 30 characters

    Example: "My tournament webhook"

  • url
    string

    The URL the webhook must call.

    Max. length: 255 characters

    Example: "http://mytournamentsite.com/mywebhook"

  • id
    string

    The id of the webhook.

    Example: "880097283784269395"

GET /webhooks/{id}

Authorized Access

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
{
    "enabled": false,
    "name": "My tournament webhook",
    "url": "http:\/\/mytournamentsite.com\/mywebhook",
    "id": "880097283784269395"
}
Structure (object)
  • enabled
    boolean

    Whether the webhook is enabled.

    Example: false

  • name
    string

    The name of the webhook.

    Max. length: 30 characters

    Example: "My tournament webhook"

  • url
    string

    The URL the webhook must call.

    Max. length: 255 characters

    Example: "http://mytournamentsite.com/mywebhook"

  • id
    string

    The id of the webhook.

    Example: "880097283784269395"

PATCH /webhooks/{id}

Authorized Access

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: 30 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
{
    "enabled": false,
    "name": "My tournament webhook",
    "url": "http:\/\/mytournamentsite.com\/mywebhook",
    "id": "880097283784269395"
}
Structure (object)
  • enabled
    boolean

    Whether the webhook is enabled.

    Example: false

  • name
    string

    The name of the webhook.

    Max. length: 30 characters

    Example: "My tournament webhook"

  • url
    string

    The URL the webhook must call.

    Max. length: 255 characters

    Example: "http://mytournamentsite.com/mywebhook"

  • id
    string

    The id of the webhook.

    Example: "880097283784269395"

DELETE /webhooks/{id}

Authorized Access

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.