Webhook subscriptions

GET /webhooks/{webhook_id}/subscriptions

Authorized Access

Returns the subscriptions to a webhook.

Resource URL

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

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 subscriptions unit. The size of the range can not exceed 50. (see Pagination)

    Example: subscriptions=0-49

Path parameters

  • webhook_id
    string

    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
[
    {
        "event_name": "registration.created",
        "scope": "tournament",
        "scope_id": "842693950880972837",
        "id": "378426939508809728"
    }
]
Structure (collection)
  • event_name
    string

    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, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed

  • scope
    string

    The scope the event you are subscribing to is a part of.

    Possible values: tournament

  • scope_id
    string

    The unique identifier of the entity linked to the scope.

    Example: "842693950880972837"

  • id
    string

    The unique identifier of the subscription.

    Example: "378426939508809728"

POST /webhooks/{webhook_id}/subscriptions

Authorized Access

Creates a new subscription to a webhook.

Resource URL

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

HTTP headers

Path parameters

  • webhook_id
    string

    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_name
    string

    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, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed

  • scope
    string

    The scope the event you are subscribing to is a part of.

    Possible values: tournament

  • scope_id
    string

    The unique identifier of the entity linked to the scope.

    Example: "842693950880972837"

Response

[201] Subscription created

Example
{
    "event_name": "registration.created",
    "scope": "tournament",
    "scope_id": "842693950880972837",
    "id": "378426939508809728"
}
Structure (object)
  • event_name
    string

    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, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed

  • scope
    string

    The scope the event you are subscribing to is a part of.

    Possible values: tournament

  • scope_id
    string

    The unique identifier of the entity linked to the scope.

    Example: "842693950880972837"

  • id
    string

    The unique identifier of the subscription.

    Example: "378426939508809728"

GET /webhooks/{webhook_id}/subscriptions/{id}

Authorized Access

Returns a subscription identified with the given id.

Resource URL

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

HTTP headers

Path parameters

  • webhook_id
    string

    The id of the subscription's webhook.

  • id
    string

    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
{
    "event_name": "registration.created",
    "scope": "tournament",
    "scope_id": "842693950880972837",
    "id": "378426939508809728"
}
Structure (object)
  • event_name
    string

    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, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed

  • scope
    string

    The scope the event you are subscribing to is a part of.

    Possible values: tournament

  • scope_id
    string

    The unique identifier of the entity linked to the scope.

    Example: "842693950880972837"

  • id
    string

    The unique identifier of the subscription.

    Example: "378426939508809728"

PATCH /webhooks/{webhook_id}/subscriptions/{id}

Authorized Access

Updates a single subscription to a webhook.

Resource URL

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

HTTP headers

Path parameters

  • webhook_id
    string

    The id of the subscription's webhook.

  • id
    string

    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_name
    string

    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, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed

  • scope
    string

    Optional

    The scope the event you are subscribing to is a part of.

    Possible values: tournament

  • scope_id
    string

    Optional

    The unique identifier of the entity linked to the scope.

    Example: "842693950880972837"

Response

[200] Success

Example
{
    "event_name": "registration.created",
    "scope": "tournament",
    "scope_id": "842693950880972837",
    "id": "378426939508809728"
}
Structure (object)
  • event_name
    string

    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, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed

  • scope
    string

    The scope the event you are subscribing to is a part of.

    Possible values: tournament

  • scope_id
    string

    The unique identifier of the entity linked to the scope.

    Example: "842693950880972837"

  • id
    string

    The unique identifier of the subscription.

    Example: "378426939508809728"

DELETE /webhooks/{webhook_id}/subscriptions/{id}

Authorized Access

Deletes a single subscription to a webhook.

Resource URL

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

HTTP headers

Path parameters

  • webhook_id
    string

    The id of the subscription's webhook.

  • id
    string

    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

[204] Success