# Webhook subscription

## Create a webhook subscription

 - [POST /v1/webhooks](https://docs.solarisgroup.com/api-reference/onboarding/webhooks/webhook-subscription/paths/~1v1~1webhooks/post.md): Creates a new webhook subscription for a specific event. When you create a webhook subscription, Solaris checks the validity of the provided url by sending a single POST notification. The notification contains an empty body and the SOLARIS-WEBHOOK-EVENT-TYPE header with a value of WEBHOOK-SUBSCRIPTION. The response from this endpoint contains a unique id for the subscription and a secret. Use this secret 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 id and secret.

## Index webhooks

 - [GET /v1/webhooks](https://docs.solarisgroup.com/api-reference/onboarding/webhooks/webhook-subscription/paths/~1v1~1webhooks/get.md): Returns an array containing all of your webhook subscriptions.

## Retrieve a webhook

 - [GET /v1/webhooks/{id}](https://docs.solarisgroup.com/api-reference/onboarding/webhooks/webhook-subscription/paths/~1v1~1webhooks~1%7Bid%7D/get.md): Returns the webhook subscription specified in the request URL. Note that the API only returns secret value when the webhook is created; this endpoint will return null as the value for secret.

## Delete a webhook

 - [DELETE /v1/webhooks/{id}](https://docs.solarisgroup.com/api-reference/onboarding/webhooks/webhook-subscription/paths/~1v1~1webhooks~1%7Bid%7D/delete.md): Deletes the webhook subscription specified in the request URL. Please ensure that you have a replacement for a webhook before deleting it; all stored and unsent notifications will be lost.

