Xsolla-logo

Add webhook for event

post/projects/{project_id}/events/{event_type}/webhooks

Creates a webhook for the specified event. The webhook has the following format:

{
    "event_type": "Event type",
    "event_time": "Date and time when the event occurred in the ISO 8601 format",
    "project_id": "Login project ID",
    "data": {
         // Some other data, can be different for different events and include nested objects
     }
}
SecurityServer
Request
path Parameters
project_id
required
string <uuid>

Login project ID from Publisher Account.

event_type
required
string

Event type. Can have the following values:

  • registration is used for user registration by login and password (JWT and OAuth 2.0), social authentication (JWT and OAuth 2.0), silent authentication (JWT and OAuth 2.0), authentication by a phone number (JWT and OAuth 2.0), and registration of a new user from the server as well.
  • authorization is used for user authorization by login and password (JWT and OAuth 2.0), social authentication (JWT and OAuth 2.0), silent authentication (JWT and OAuth 2.0), and authentication by a phone number (JWT and OAuth 2.0).
  • email_confirmation is used for user email address confirmation.
  • link_social_account is used for linking user’s social account.
  • new_verified_user is used for user registration when they pass all the necessary verification steps. These verification steps can be email address confirmation, age confirmation via the okname service, additional data collection, etc. You should configure these steps by yourself.
Enum: "registration" "authorization" "email_confirmation" "link_social_account" "new_verified_user"
Request Body schema: application/json
url
required
string <uri> <= 500 characters

Valid URL to which the Xsolla Login server sends the webhook.

Responses
200

OK

401

Unauthorized

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

Request samples
application/json
Response samples
application/json
{}