Webhooks (WO Warships)

GET /organizer/v2/webhooks

Authorized Access

Returns webhooks link 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 cannot exceed 50. (see Pagination)

    Example: webhooks=0-49

Query Parameters

This endpoint doesn't have any query parameters.

Request Body

This endpoint doesn't 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

    An unique identifier for the webhook

    Example: "880097283784269395"

  • enabled
    boolean

    Whether the webhook is enabled

    Example: false

  • name
    string

    The name of the webhook (maximum 30 characters)

    Example: "My tournament webhook"

  • url
    string

    The url for webhook call

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

POST /organizer/v2/webhooks

Authorized Access

Create a new webhook

Resource URL

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

HTTP headers

Query Parameters

This endpoint doesn't 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 (maximum 30 characters)

    Example: "My tournament webhook"

  • url
    string

    The url for webhook call

    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

    An unique identifier for the webhook

    Example: "880097283784269395"

  • enabled
    boolean

    Whether the webhook is enabled

    Example: false

  • name
    string

    The name of the webhook (maximum 30 characters)

    Example: "My tournament webhook"

  • url
    string

    The url for webhook call

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

GET /organizer/v2/webhooks/{id}

Authorized Access

Returns a webhook identified by the given id.

Resource URL

https://api.toornament.com/organizer/v2/webhooks/{id}

HTTP headers

Path parameters

  • id
    string

    The id of the webhook to retrieve

Query Parameters

This endpoint doesn't have any query parameters.

Request Body

This endpoint doesn't 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

    An unique identifier for the webhook

    Example: "880097283784269395"

  • enabled
    boolean

    Whether the webhook is enabled

    Example: false

  • name
    string

    The name of the webhook (maximum 30 characters)

    Example: "My tournament webhook"

  • url
    string

    The url for webhook call

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

PATCH /organizer/v2/webhooks/{id}

Authorized Access

If you need to make changes on your webhook data, you are able to do so by patching one or several fields of your webhook.

Resource URL

https://api.toornament.com/organizer/v2/webhooks/{id}

HTTP headers

Path parameters

  • id
    string

    The id of the webhook to patch

Query Parameters

This endpoint doesn't 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 (maximum 30 characters)

    Example: "My tournament webhook"

  • url
    string

    Optional

    The url for webhook call

    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

    An unique identifier for the webhook

    Example: "880097283784269395"

  • enabled
    boolean

    Whether the webhook is enabled

    Example: false

  • name
    string

    The name of the webhook (maximum 30 characters)

    Example: "My tournament webhook"

  • url
    string

    The url for webhook call

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

DELETE /organizer/v2/webhooks/{id}

Authorized Access

Delete a webhook.

Resource URL

https://api.toornament.com/organizer/v2/webhooks/{id}

HTTP headers

Path parameters

  • id
    string

    The id of the webhook to delete

Query Parameters

This endpoint doesn't have any query parameters.

Request Body

This endpoint doesn't require a request body.

Response

[204] Success