# Register a webhook for project

Register a new webhook for a project. The webhook will be used to communicate updates to resources. Maximum of `15` webhooks allowed per project.

Endpoint: POST /v1/projects/{projectId}/webhooks
Version: 1.2.126
Security: BasicAuth, BearerAuth, OAuth2Production

## Security:

  - `BasicAuth` (unknown)
    http basic

  - `BearerAuth` (unknown)
    http bearer JWT

  - `OAuth2Production` (unknown)
    oauth2

## Path parameters:

  - `projectId` (string, required)
    The unique ID of the project. You can find this on the Sinch Dashboard.

## Request body:

  - `application/json` (unknown)
    Webhook to register

## Request fields (application/json):

  - `target` (string, required)
    A valid target url where events should be sent to.

  - `secret` (string, required)
    Secret to be used to sign contents of webhooks sent by the provisioning API. You can then use the secret to verify the signature. Please not that secret should have a high entropy to be considered secure.

  - `triggers` (array, required)
    List of triggers you want to be notified about on your webhook. To be able to listen to all type of events use `ALL`.
- Common:
`ALL`
- Bundles:
`BUNDLE_DONE`
- WhatsApp Sender:
`WHATSAPP_SENDER_ACTIVE`
,
`WHATSAPP_SENDER_COMMENT_ADDED`
,
`WHATSAPP_SENDER_DAILY_LIMIT_CHANGED`
,
`WHATSAPP_SENDER_DELETED`
,
`WHATSAPP_SENDER_DISPLAY_NAME_UPDATED`
,
`WHATSAPP_SENDER_ERROR`
,
`WHATSAPP_SENDER_INACTIVE`
,
`WHATSAPP_SENDER_PENDING_VERIFICATION`
,
`WHATSAPP_SENDER_QUALITY_RATING_CHANGED`
,
`WHATSAPP_SENDER_REJECTED`
 or
`WHATSAPP_SENDER_USERNAME_UPDATED`
- WhatsApp Template:
`WHATSAPP_TEMPLATE_APPROVED`
,
`WHATSAPP_TEMPLATE_CATEGORY_FUTURE_UPDATE`
,
`WHATSAPP_TEMPLATE_CATEGORY_UPDATED`
,
`WHATSAPP_TEMPLATE_COMMENT_ADDED`
,
`WHATSAPP_TEMPLATE_DELETED`
,
`WHATSAPP_TEMPLATE_QUALITY_SCORE_UPDATED`
,
`WHATSAPP_TEMPLATE_REJECTED`
 or
`WHATSAPP_TEMPLATE_STATUS_UPDATED`
- WhatsApp Account:
`WHATSAPP_ACCOUNT_COMMENT_ADDED`
,
`WHATSAPP_ACCOUNT_DAILY_LIMIT_CHANGED`
,
`WHATSAPP_ACCOUNT_ONBOARDED`
,
`WHATSAPP_ACCOUNT_PENDING_VERIFICATION`
,
`WHATSAPP_ACCOUNT_REJECTED`
 or
`WHATSAPP_WABA_ACCOUNT_CHANGED`
- RCS Sender:
`RCS_BRAND_REGISTRATION_PROCESS_STATUS_UPDATED`
,
`RCS_SENDER_COMMENT_ADDED`
,
`RCS_SENDER_OPERATOR_STATUS_UPDATED`
 or
`RCS_SENDER_STATUS_UPDATED`
- KakaoTalk Sender:
`KAKAOTALK_SENDER_ACTIVE`
,
`KAKAOTALK_SENDER_COMMENT_ADDED`
,
`KAKAOTALK_SENDER_INACTIVE`
 or
`KAKAOTALK_SENDER_REJECTED`
- KakaoTalk Template:
`KAKAOTALK_TEMPLATE_APPROVED`
,
`KAKAOTALK_TEMPLATE_COMMENT_ADDED`
 or
`KAKAOTALK_TEMPLATE_REJECTED`

## Request examples:

  - `Register a webhook for all events` (unknown)

  - `Register a webhook with specific event triggers` (unknown)

## Response 201:

  - `201` (unknown)
    Webhook created

## Response 201 fields (application/json):

  - `id` (string, required)
    The ID of the webhook.

  - `target` (string, required)
    The target url where events will be sent to.

  - `projectId` (string, required)
    The project that this webhook belongs to.

  - `triggers` (array, required)
    List of triggers this webhook is triggered by.

## Response 400:

  - `400` (unknown)
    BadRequest

## Response 400 fields (application/json):

  - `errorCode` (string, required)
    Error code identifying the type of error.

  - `message` (string, required)
    Human-readable error message.

  - `resolution` (string, required)
    Suggested resolution for the error.

  - `additionalInformation` (object)
    Additional context about the error.

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `errorCode` (string, required)
    Error code identifying the type of error.

  - `message` (string, required)
    Human-readable error message.

  - `resolution` (string, required)
    Suggested resolution for the error.

  - `additionalInformation` (object)
    Additional context about the error.

## Response 409:

  - `409` (unknown)
    Conflict

## Response 409 fields (application/json):

  - `errorCode` (string, required)
    Error code identifying the type of error.

  - `message` (string, required)
    Human-readable error message.

  - `resolution` (string, required)
    Suggested resolution for the error.

  - `additionalInformation` (object)
    Additional context about the error.

## Response 424:

  - `424` (unknown)
    FailedDependency

## Response 424 fields (application/json):

  - `errorCode` (string, required)
    Error code identifying the type of error.

  - `message` (string, required)
    Human-readable error message.

  - `resolution` (string, required)
    Suggested resolution for the error.

  - `additionalInformation` (object)
    Additional context about the error.

## Response 500:

  - `500` (unknown)
    InternalServerError

## Response 500 fields (application/json):

  - `errorCode` (string, required)
    Error code identifying the type of error.

  - `message` (string, required)
    Human-readable error message.

  - `resolution` (string, required)
    Suggested resolution for the error.

  - `additionalInformation` (object)
    Additional context about the error.

## Response 201 examples:

  - `Register a webhook for all events` (unknown)
    Example of a response when registering for all triggers.

  - `Register a webhook with specific event triggers` (unknown)
    Example of a response when registering for specific triggers.

## Response 400 examples:

  - `InvalidInputError` (unknown)

  - `InvalidPayloadError` (unknown)

## Response 401 examples:

  - `UnauthorizedErrorError` (unknown)

## Response 409 examples:

  - `WebhookExistsError` (unknown)

## Response 424 examples:

  - `WebhookLimitReachedError` (unknown)

## Response 500 examples:

  - `InternalErrorError` (unknown)

