# Create a webhook subscription Creates a new webhook subscription for a specific event. When you create a webhook subscription, Solaris checks the validity of the provided by sending a single notification. The notification contains an empty body and the header with a value of . The response from this endpoint contains a unique for the subscription and a . Use this to verify the authenticity of the notifications. Webhook URLs cannot be changed after creating a webhook subscription. You must delete the existing webhook and register a new one with the new URL. Note that you will receive a new and . Endpoint: POST /v1/webhooks Version: 1.0 ## Request fields (application/json): - `event_type` (string) The type of event to subscribe to. Example: "IDENTIFICATION" - `url` (string) The URL where Solaris should send the webhook notifications. Example: "https://example.com/identification" ## Response 201 fields (application/json): - `id` (string) Unique ID of the webhook. Example: "4c6f93d4c8d427927257e2ce734a5a10" - `event_type` (string) Type of webhook event. Example: "IDENTIFICATION" - `url` (string) The recipient URL of the event notification. Example: "https://example.com/identification" - `secret` (string) A key phrase used to verify the authenticity of received webhook messages. Example: "f82c389fb187274227186b5a58781978" ## Response 400 fields (application/json): - `id` (string) Example: "a95f2aaf-4e0c-4d49-8021-8a16a884ed86" - `status` (string) Example: "400" - `code` (string) Example: "build_pagination_headers_failure" - `title` (string) Example: "Failed to build pagination headers." - `detail` (string) Example: "Cannot connect to database." ## Response 403 fields (application/json): - `id` (string) Example: "a95f2aaf-4e0c-4d49-8021-8a16a884ed86" - `status` (string) Example: "403" - `code` (string) Example: "unauthorized_action" - `title` (string) Example: "Unauthorized Action" - `detail` (string) Example: "Unauthorized action is not allowed." ## Response 404 fields (application/json): - `id` (string) Example: "a95f2aaf-4e0c-4d49-8021-8a16a884ed86" - `status` (string) Example: "404" - `code` (string) Example: "model_not_found" - `title` (string) Example: "Model Not Found" - `detail` (string) Example: "Couldn't find 'Solaris::Identification' for id 'bbbcccfff388923eb899a5852df6cidt'." ## Response 500 fields (application/json): - `id` (string) Example: "e8915041-9d8c-4d96-9dd1-04e8522ecdbf" - `status` (string) Example: "500" - `code` (string) Example: "generic_error" - `title` (string) Example: "Generic Error" - `detail` (string) Example: "There was an error."