# Add webhook for event 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 } } Endpoint: POST /projects/{project_id}/events/{event_type}/webhooks Version: v1 Security: Server ## Path parameters: - `project_id` (string, required) Login project ID from Publisher Account. - `event_type` (string, required) 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 fields (application/json): - `url` (string, required) Valid URL to which the Xsolla Login server sends the webhook. Example: "https://example.com/hook/second" ## Response 200 fields (application/json): - `id` (integer, required) Webhook ID. Example: 2342423 - `url` (string, required) Valid URL to which the Xsolla Login server sends the webhook. Example: "https://example.com/hook/second" ## Response 401 fields (application/json): - `error` (object, required) - `error.code` (string, required) Error code. Example: "003-061" - `error.description` (string, required) Error description. Example: "Object not found." - `error.details` (object) Additional information. ## Response 404 fields (application/json): - `error` (object, required) - `error.code` (string, required) Error code. Example: "003-061" - `error.description` (string, required) Error description. Example: "Object not found." - `error.details` (object) Additional information. ## Response 422 fields (application/json): - `error` (object, required) - `error.code` (string, required) Error code. Example: "003-061" - `error.description` (string, required) Error description. Example: "Object not found." - `error.details` (object) Additional information. ## Response 429 fields (application/json): - `error` (object, required) - `error.code` (string, required) Error code. Example: "003-061" - `error.description` (string, required) Error description. Example: "Object not found." - `error.details` (object) Additional information.