Webhook API › Webhook subscriptions

GET /webhooks/{webhook_id}/subscriptions

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

    The unique identifier of the subscription.

    Example: "378426939508809728"

  • 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, registration.payment_pending, registration.payment_skipped, registration.payment_completed, registration.payment_refund, registration.payment_failed, tournament.created, tournament.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed, tournament.custom_fields_updated, tournament.sponsors_updated, tournament.standing_updated, tournament.deleted, stage.created, stage.info_updated, stage.structure_updated, stage.status_updated, stage.deleted, team.created, team.lineup_changed, team.disbanded

  • scope
    string

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

    Possible values: tournament, project, platform

  • scope_id
    string

    The unique identifier of the entity linked to the scope.

    Example: "842693950880972837"

POST /webhooks/{webhook_id}/subscriptions

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, registration.payment_pending, registration.payment_skipped, registration.payment_completed, registration.payment_refund, registration.payment_failed, tournament.created, tournament.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed, tournament.custom_fields_updated, tournament.sponsors_updated, tournament.standing_updated, tournament.deleted, stage.created, stage.info_updated, stage.structure_updated, stage.status_updated, stage.deleted, team.created, team.lineup_changed, team.disbanded

  • scope
    string

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

    Possible values: tournament, project, platform

  • scope_id
    string

    The unique identifier of the entity linked to the scope.

    Example: "842693950880972837"

Response

[201] Subscription created

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

    The unique identifier of the subscription.

    Example: "378426939508809728"

  • 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, registration.payment_pending, registration.payment_skipped, registration.payment_completed, registration.payment_refund, registration.payment_failed, tournament.created, tournament.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed, tournament.custom_fields_updated, tournament.sponsors_updated, tournament.standing_updated, tournament.deleted, stage.created, stage.info_updated, stage.structure_updated, stage.status_updated, stage.deleted, team.created, team.lineup_changed, team.disbanded

  • scope
    string

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

    Possible values: tournament, project, platform

  • scope_id
    string

    The unique identifier of the entity linked to the scope.

    Example: "842693950880972837"

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

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

    The unique identifier of the subscription.

    Example: "378426939508809728"

  • 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, registration.payment_pending, registration.payment_skipped, registration.payment_completed, registration.payment_refund, registration.payment_failed, tournament.created, tournament.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed, tournament.custom_fields_updated, tournament.sponsors_updated, tournament.standing_updated, tournament.deleted, stage.created, stage.info_updated, stage.structure_updated, stage.status_updated, stage.deleted, team.created, team.lineup_changed, team.disbanded

  • scope
    string

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

    Possible values: tournament, project, platform

  • scope_id
    string

    The unique identifier of the entity linked to the scope.

    Example: "842693950880972837"

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

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, registration.payment_pending, registration.payment_skipped, registration.payment_completed, registration.payment_refund, registration.payment_failed, tournament.created, tournament.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed, tournament.custom_fields_updated, tournament.sponsors_updated, tournament.standing_updated, tournament.deleted, stage.created, stage.info_updated, stage.structure_updated, stage.status_updated, stage.deleted, team.created, team.lineup_changed, team.disbanded

  • scope
    string

    Optional

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

    Possible values: tournament, project, platform

  • scope_id
    string

    Optional

    The unique identifier of the entity linked to the scope.

    Example: "842693950880972837"

Response

[200] Success

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

    The unique identifier of the subscription.

    Example: "378426939508809728"

  • 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, registration.payment_pending, registration.payment_skipped, registration.payment_completed, registration.payment_refund, registration.payment_failed, tournament.created, tournament.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed, tournament.custom_fields_updated, tournament.sponsors_updated, tournament.standing_updated, tournament.deleted, stage.created, stage.info_updated, stage.structure_updated, stage.status_updated, stage.deleted, team.created, team.lineup_changed, team.disbanded

  • scope
    string

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

    Possible values: tournament, project, platform

  • scope_id
    string

    The unique identifier of the entity linked to the scope.

    Example: "842693950880972837"

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

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