# Config

## Retrieving a list of webhook configs

> Retrieves a list of webhook configurations for a given tenant. <br>

```json
{"openapi":"3.0.0","info":{"title":"Webhook Service","version":"0.0.1"},"tags":[{"name":"Config"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["webhook.subscription_read"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"scopes":{"webhook.subscription_read":"Needed to read subscriptions.","webhook.subscription_manage":"Needed to manage subscriptions."},"tokenUrl":"https://api.emporix.io/oauth/token"}}}},"responses":{"WebhookConfigsResponse":{"description":"Returning list of webhook configs.","content":{"application/json":{"schema":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/AbstractWebhookConfig"},{"type":"object","properties":{"code":{"$ref":"#/components/schemas/ConfigCode"},"configuration":{"$ref":"#/components/schemas/ConfigurationGet"}}}]}}}}},"Unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"Forbidden_403":{"description":"Given authorization scopes are not sufficient and do not match the scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"InternalServerError_500":{"description":"Some server-side error occurred. Details are provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"schemas":{"AbstractWebhookConfig":{"type":"object","properties":{"active":{"type":"boolean","description":"Indicates whether a given configuration is active. Only one configuration can be active."},"provider":{"$ref":"#/components/schemas/Provider","description":"Indicates which provider should be used."}}},"Provider":{"type":"string","enum":["SVIX_SHARED","SVIX","HTTP"]},"ConfigCode":{"type":"string","description":"Unique identifier of webhook configuration."},"ConfigurationGet":{"oneOf":[{"type":"object","properties":{"destinationUrl":{"type":"string","description":"Destination URL where event should be sent."},"secretKeyExists":{"type":"boolean","description":"Information if secret key for securing the messages has been provided."},"headers":{"allOf":[{"$ref":"#/components/schemas/HttpHeadersConfig"}],"description":"List of key-value pairs which can decorate outgoing HTTP POST request as headers."},"eventsConfiguration":{"type":"array","items":{"type":"object","properties":{"eventType":{"type":"string","description":"Type of the event."},"destinationUrl":{"type":"string","description":"Destination URL where event should be sent."},"secretKeyExists":{"type":"boolean","description":"Information if secret key for securing the messages has been provided."},"headers":{"allOf":[{"$ref":"#/components/schemas/HttpHeadersConfig"}],"description":"List of key-value pairs which can decorate outgoing HTTP POST request as headers."}}}}}}]},"HttpHeadersConfig":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/HttpHeaderConfigValue"}},"HttpHeaderConfigValue":{"type":"object","properties":{"value":{"type":"string"}}},"ErrorMessage":{"title":"Error message","description":"Object returned in error responses.","type":"object","properties":{"code":{"description":"Original HTTP error code. Must be consistent with the response HTTP code.","type":"integer"},"status":{"type":"string"},"message":{"description":"Descriptive error message for debugging.","type":"string"},"details":{"description":"List of problems causing the error.","type":"array","items":{"type":"string"}}},"required":["code","status"]}}},"paths":{"/webhook/{tenant}/config":{"get":{"summary":"Retrieving a list of webhook configs","operationId":"GET-webhook-list-configs","responses":{"200":{"$ref":"#/components/responses/WebhookConfigsResponse"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/Forbidden_403"},"500":{"$ref":"#/components/responses/InternalServerError_500"}},"tags":["Config"],"description":"Retrieves a list of webhook configurations for a given tenant. \n"}}}}
```

## Creating a single webhook config

> Creates a new webhook config for a given tenant. Currently the service supports the following webhook providers:\
> \
> \* Svix Emporix Shared Account\
> \* Svix Custom Account\
> \* HTTP Webhook Strategy \
> \
> \
> \*\*NOTE\*\*\
> Svix supports a maximum message payload size of approximately 350kb. However, it is generally advisable to keep webhook payloads small, ideally under 40kb. For larger message sizes, consider using the HTTP Webhook Strategy.<br>

```json
{"openapi":"3.0.0","info":{"title":"Webhook Service","version":"0.0.1"},"tags":[{"name":"Config"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["webhook.subscription_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"scopes":{"webhook.subscription_read":"Needed to read subscriptions.","webhook.subscription_manage":"Needed to manage subscriptions."},"tokenUrl":"https://api.emporix.io/oauth/token"}}}},"responses":{"CreateConfigResponse":{"description":"Result of creating config","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"}}}}}},"BadRequest_400":{"description":"Request was syntactically incorrect. Details are provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"Unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"Forbidden_403":{"description":"Given authorization scopes are not sufficient and do not match the scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"Conflict_409":{"description":"Conflict. The resource already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"InternalServerError_500":{"description":"Some server-side error occurred. Details are provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"schemas":{"ErrorMessage":{"title":"Error message","description":"Object returned in error responses.","type":"object","properties":{"code":{"description":"Original HTTP error code. Must be consistent with the response HTTP code.","type":"integer"},"status":{"type":"string"},"message":{"description":"Descriptive error message for debugging.","type":"string"},"details":{"description":"List of problems causing the error.","type":"array","items":{"type":"string"}}},"required":["code","status"]},"WebhookConfigCreation":{"allOf":[{"$ref":"#/components/schemas/WebhookConfigUpdate"},{"type":"object","required":["code"],"properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ConfigCode"}]}}}]},"WebhookConfigUpdate":{"allOf":[{"$ref":"#/components/schemas/AbstractWebhookConfig"},{"type":"object","required":["provider"],"properties":{"configuration":{"$ref":"#/components/schemas/Configuration"}}}]},"AbstractWebhookConfig":{"type":"object","properties":{"active":{"type":"boolean","description":"Indicates whether a given configuration is active. Only one configuration can be active."},"provider":{"$ref":"#/components/schemas/Provider","description":"Indicates which provider should be used."}}},"Provider":{"type":"string","enum":["SVIX_SHARED","SVIX","HTTP"]},"Configuration":{"type":"object","oneOf":[{"$ref":"#/components/schemas/EmptyConfiguration"},{"$ref":"#/components/schemas/SvixConfig"},{"$ref":"#/components/schemas/HttpConfig"}]},"EmptyConfiguration":{"type":"object","description":"SVIX_SHARED config"},"SvixConfig":{"type":"object","properties":{"apiKey":{"type":"string","description":"API Key for connecting to SVIX. This API Key will be then used in `Authorization` header while sending requests to SVIX, so the value should include `Bearer` prefix if necessary."}},"description":"SVIX config"},"HttpConfig":{"type":"object","properties":{"secretKey":{"type":"string","description":"Optional secret key which could be used to sign the message. This secret is used in `HMAC SHA 256` algorithm which encrypts the payload. Then this value is encoded to `BASE256` and included in `emporix-event-signature` header of HTTP request."},"destinationUrl":{"type":"string","description":"Destination URL where event should be sent."},"headers":{"allOf":[{"$ref":"#/components/schemas/HttpHeadersConfig"}],"description":"List of key-value pairs which can decorate outgoing HTTP POST request as headers. The size limit for this list is `10`."},"eventsConfiguration":{"$ref":"#/components/schemas/EventConfiguration"}},"description":"HTTP config"},"HttpHeadersConfig":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/HttpHeaderConfigValue"}},"HttpHeaderConfigValue":{"type":"object","properties":{"value":{"type":"string"}}},"EventConfiguration":{"type":"object","properties":{"eventType":{"type":"string","description":"Unique identifier of the event."},"secretKey":{"type":"string","description":"Optional secret key which could be used to sign the message. This secret is used in `HMAC SHA 256` algorithm which encrypts the payload. Then this value is encoded to `BASE256` and included in `emporix-event-signature` header of HTTP request. It has higher priority than `secretKey` on root level. Each event can have defined a separated secret key."},"destinationUrl":{"type":"string","description":"Destination URL where event should be sent. It has higher priority than `destinationUrl` on root level. Each event can have defined a separated destination url."},"headers":{"allOf":[{"$ref":"#/components/schemas/HttpHeadersConfig"}],"description":"List of key-value pairs which can decorate outgoing HTTP POST request as headers. The size limit for this list is `10`. It has higher priority than `headers` on root level. Each event can have defined a separated headers."}}},"ConfigCode":{"type":"string","description":"Unique identifier of webhook configuration."}}},"paths":{"/webhook/{tenant}/config":{"post":{"summary":"Creating a single webhook config","responses":{"201":{"$ref":"#/components/responses/CreateConfigResponse"},"400":{"$ref":"#/components/responses/BadRequest_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/Forbidden_403"},"409":{"$ref":"#/components/responses/Conflict_409"},"500":{"$ref":"#/components/responses/InternalServerError_500"}},"description":"Creates a new webhook config for a given tenant. Currently the service supports the following webhook providers:\n\n* Svix Emporix Shared Account\n* Svix Custom Account\n* HTTP Webhook Strategy \n\n\n**NOTE**\nSvix supports a maximum message payload size of approximately 350kb. However, it is generally advisable to keep webhook payloads small, ideally under 40kb. For larger message sizes, consider using the HTTP Webhook Strategy.\n","operationId":"POST-webhook-create-config","tags":["Config"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfigCreation"}}},"description":""}}}}}
```

## Retrieving a webhook config

> Retrieves a webhook configuration for a given tenant. <br>

```json
{"openapi":"3.0.0","info":{"title":"Webhook Service","version":"0.0.1"},"tags":[{"name":"Config"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["webhook.subscription_read"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"scopes":{"webhook.subscription_read":"Needed to read subscriptions.","webhook.subscription_manage":"Needed to manage subscriptions."},"tokenUrl":"https://api.emporix.io/oauth/token"}}}},"responses":{"WebhookConfigResponse":{"description":"Returning a webhook config.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AbstractWebhookConfig"},{"type":"object","properties":{"code":{"$ref":"#/components/schemas/ConfigCode"},"configuration":{"$ref":"#/components/schemas/ConfigurationGet"}}}]}}}},"Unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"Forbidden_403":{"description":"Given authorization scopes are not sufficient and do not match the scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"NotFound_404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"InternalServerError_500":{"description":"Some server-side error occurred. Details are provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"schemas":{"AbstractWebhookConfig":{"type":"object","properties":{"active":{"type":"boolean","description":"Indicates whether a given configuration is active. Only one configuration can be active."},"provider":{"$ref":"#/components/schemas/Provider","description":"Indicates which provider should be used."}}},"Provider":{"type":"string","enum":["SVIX_SHARED","SVIX","HTTP"]},"ConfigCode":{"type":"string","description":"Unique identifier of webhook configuration."},"ConfigurationGet":{"oneOf":[{"type":"object","properties":{"destinationUrl":{"type":"string","description":"Destination URL where event should be sent."},"secretKeyExists":{"type":"boolean","description":"Information if secret key for securing the messages has been provided."},"headers":{"allOf":[{"$ref":"#/components/schemas/HttpHeadersConfig"}],"description":"List of key-value pairs which can decorate outgoing HTTP POST request as headers."},"eventsConfiguration":{"type":"array","items":{"type":"object","properties":{"eventType":{"type":"string","description":"Type of the event."},"destinationUrl":{"type":"string","description":"Destination URL where event should be sent."},"secretKeyExists":{"type":"boolean","description":"Information if secret key for securing the messages has been provided."},"headers":{"allOf":[{"$ref":"#/components/schemas/HttpHeadersConfig"}],"description":"List of key-value pairs which can decorate outgoing HTTP POST request as headers."}}}}}}]},"HttpHeadersConfig":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/HttpHeaderConfigValue"}},"HttpHeaderConfigValue":{"type":"object","properties":{"value":{"type":"string"}}},"ErrorMessage":{"title":"Error message","description":"Object returned in error responses.","type":"object","properties":{"code":{"description":"Original HTTP error code. Must be consistent with the response HTTP code.","type":"integer"},"status":{"type":"string"},"message":{"description":"Descriptive error message for debugging.","type":"string"},"details":{"description":"List of problems causing the error.","type":"array","items":{"type":"string"}}},"required":["code","status"]}}},"paths":{"/webhook/{tenant}/config/{code}":{"get":{"summary":"Retrieving a webhook config","operationId":"GET-webhook-retrieve-config","responses":{"200":{"$ref":"#/components/responses/WebhookConfigResponse"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/Forbidden_403"},"404":{"$ref":"#/components/responses/NotFound_404"},"500":{"$ref":"#/components/responses/InternalServerError_500"}},"tags":["Config"],"description":"Retrieves a webhook configuration for a given tenant. \n"}}}}
```

## Updating a single webhook config

> Updates a webhook config for a given tenant. Currently the service supports the following webhook providers:\
> \
> \* Svix Emporix Shared Account\
> \* Svix Custom Account<br>

```json
{"openapi":"3.0.0","info":{"title":"Webhook Service","version":"0.0.1"},"tags":[{"name":"Config"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["webhook.subscription_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"scopes":{"webhook.subscription_read":"Needed to read subscriptions.","webhook.subscription_manage":"Needed to manage subscriptions."},"tokenUrl":"https://api.emporix.io/oauth/token"}}}},"responses":{"BadRequest_400":{"description":"Request was syntactically incorrect. Details are provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"Unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"Forbidden_403":{"description":"Given authorization scopes are not sufficient and do not match the scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"Conflict_409":{"description":"Conflict. The resource already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"InternalServerError_500":{"description":"Some server-side error occurred. Details are provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"schemas":{"ErrorMessage":{"title":"Error message","description":"Object returned in error responses.","type":"object","properties":{"code":{"description":"Original HTTP error code. Must be consistent with the response HTTP code.","type":"integer"},"status":{"type":"string"},"message":{"description":"Descriptive error message for debugging.","type":"string"},"details":{"description":"List of problems causing the error.","type":"array","items":{"type":"string"}}},"required":["code","status"]},"WebhookConfigUpdate":{"allOf":[{"$ref":"#/components/schemas/AbstractWebhookConfig"},{"type":"object","required":["provider"],"properties":{"configuration":{"$ref":"#/components/schemas/Configuration"}}}]},"AbstractWebhookConfig":{"type":"object","properties":{"active":{"type":"boolean","description":"Indicates whether a given configuration is active. Only one configuration can be active."},"provider":{"$ref":"#/components/schemas/Provider","description":"Indicates which provider should be used."}}},"Provider":{"type":"string","enum":["SVIX_SHARED","SVIX","HTTP"]},"Configuration":{"type":"object","oneOf":[{"$ref":"#/components/schemas/EmptyConfiguration"},{"$ref":"#/components/schemas/SvixConfig"},{"$ref":"#/components/schemas/HttpConfig"}]},"EmptyConfiguration":{"type":"object","description":"SVIX_SHARED config"},"SvixConfig":{"type":"object","properties":{"apiKey":{"type":"string","description":"API Key for connecting to SVIX. This API Key will be then used in `Authorization` header while sending requests to SVIX, so the value should include `Bearer` prefix if necessary."}},"description":"SVIX config"},"HttpConfig":{"type":"object","properties":{"secretKey":{"type":"string","description":"Optional secret key which could be used to sign the message. This secret is used in `HMAC SHA 256` algorithm which encrypts the payload. Then this value is encoded to `BASE256` and included in `emporix-event-signature` header of HTTP request."},"destinationUrl":{"type":"string","description":"Destination URL where event should be sent."},"headers":{"allOf":[{"$ref":"#/components/schemas/HttpHeadersConfig"}],"description":"List of key-value pairs which can decorate outgoing HTTP POST request as headers. The size limit for this list is `10`."},"eventsConfiguration":{"$ref":"#/components/schemas/EventConfiguration"}},"description":"HTTP config"},"HttpHeadersConfig":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/HttpHeaderConfigValue"}},"HttpHeaderConfigValue":{"type":"object","properties":{"value":{"type":"string"}}},"EventConfiguration":{"type":"object","properties":{"eventType":{"type":"string","description":"Unique identifier of the event."},"secretKey":{"type":"string","description":"Optional secret key which could be used to sign the message. This secret is used in `HMAC SHA 256` algorithm which encrypts the payload. Then this value is encoded to `BASE256` and included in `emporix-event-signature` header of HTTP request. It has higher priority than `secretKey` on root level. Each event can have defined a separated secret key."},"destinationUrl":{"type":"string","description":"Destination URL where event should be sent. It has higher priority than `destinationUrl` on root level. Each event can have defined a separated destination url."},"headers":{"allOf":[{"$ref":"#/components/schemas/HttpHeadersConfig"}],"description":"List of key-value pairs which can decorate outgoing HTTP POST request as headers. The size limit for this list is `10`. It has higher priority than `headers` on root level. Each event can have defined a separated headers."}}}}},"paths":{"/webhook/{tenant}/config/{code}":{"put":{"summary":"Updating a single webhook config","responses":{"204":{"description":"No content"},"400":{"$ref":"#/components/responses/BadRequest_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/Forbidden_403"},"409":{"$ref":"#/components/responses/Conflict_409"},"500":{"$ref":"#/components/responses/InternalServerError_500"}},"description":"Updates a webhook config for a given tenant. Currently the service supports the following webhook providers:\n\n* Svix Emporix Shared Account\n* Svix Custom Account\n","operationId":"PUT-webhook-update-config","tags":["Config"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfigUpdate"}}},"description":""}}}}}
```

## Removing a webhook config

> Removes a webhook configuration for a given tenant. <br>

```json
{"openapi":"3.0.0","info":{"title":"Webhook Service","version":"0.0.1"},"tags":[{"name":"Config"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["webhook.subscription_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"scopes":{"webhook.subscription_read":"Needed to read subscriptions.","webhook.subscription_manage":"Needed to manage subscriptions."},"tokenUrl":"https://api.emporix.io/oauth/token"}}}},"responses":{"Unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"Forbidden_403":{"description":"Given authorization scopes are not sufficient and do not match the scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"InternalServerError_500":{"description":"Some server-side error occurred. Details are provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"schemas":{"ErrorMessage":{"title":"Error message","description":"Object returned in error responses.","type":"object","properties":{"code":{"description":"Original HTTP error code. Must be consistent with the response HTTP code.","type":"integer"},"status":{"type":"string"},"message":{"description":"Descriptive error message for debugging.","type":"string"},"details":{"description":"List of problems causing the error.","type":"array","items":{"type":"string"}}},"required":["code","status"]}}},"paths":{"/webhook/{tenant}/config/{code}":{"delete":{"parameters":[{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"This flag set to \"true\" allows to delete active config"}],"summary":"Removing a webhook config","operationId":"DELETE-webhook-remove-config","responses":{"204":{"description":"No content"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/Forbidden_403"},"500":{"$ref":"#/components/responses/InternalServerError_500"}},"tags":["Config"],"description":"Removes a webhook configuration for a given tenant. \n"}}}}
```

## Partially updating a webhook config

> Partially updates a webhook config for a given tenant. Single update may contain multiple partial updates in the form of an array. Following operations are allowed:\
> \* \`REMOVE\` - removing an item from the list\
> \* \`UPSERT\` - adding or updating given property<br>

```json
{"openapi":"3.0.0","info":{"title":"Webhook Service","version":"0.0.1"},"tags":[{"name":"Config"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["webhook.subscription_manage"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"scopes":{"webhook.subscription_read":"Needed to read subscriptions.","webhook.subscription_manage":"Needed to manage subscriptions."},"tokenUrl":"https://api.emporix.io/oauth/token"}}}},"responses":{"BadRequest_400":{"description":"Request was syntactically incorrect. Details are provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"Unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"Forbidden_403":{"description":"Given authorization scopes are not sufficient and do not match the scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"InternalServerError_500":{"description":"Some server-side error occurred. Details are provided in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"schemas":{"ErrorMessage":{"title":"Error message","description":"Object returned in error responses.","type":"object","properties":{"code":{"description":"Original HTTP error code. Must be consistent with the response HTTP code.","type":"integer"},"status":{"type":"string"},"message":{"description":"Descriptive error message for debugging.","type":"string"},"details":{"description":"List of problems causing the error.","type":"array","items":{"type":"string"}}},"required":["code","status"]},"WebhookConfigPartialUpdates":{"type":"array","items":{"$ref":"#/components/schemas/WebhookConfigPartialUpdate"}},"WebhookConfigPartialUpdate":{"type":"object","properties":{"op":{"type":"string","enum":["REMOVE","UPSERT"],"description":"Kind of the update operation"},"path":{"type":"string","enum":["/active","/configuration","/configuration/svix/apiKey","/configuration/http/headers","/configuration/http/destinationUrl","/configuration/http/secretKey","/configuration/http/eventsConfiguration","/configuration/http/eventsConfiguration/{eventType}","/configuration/http/eventsConfiguration/{eventType}/destinationUrl","/configuration/http/eventsConfiguration/{eventType}/secretKey","/configuration/http/eventsConfiguration/{eventType}/headers"],"description":"Path for identyifing which properties should be updated"},"value":{"type":"object","anyOf":[{"$ref":"#/components/schemas/SvixConfig"},{"$ref":"#/components/schemas/HttpConfig"},{"type":"string","description":"Svix Api Key"},{"type":"boolean","description":"Active flag"},{"type":"string","description":"Destination URL where event should be sent"},{"type":"string","description":"Secret key needed to sign messages sent via HTTP requests."},{"$ref":"#/components/schemas/EventsConfiguration"},{"$ref":"#/components/schemas/EventConfiguration"}]}},"required":["op","path"]},"SvixConfig":{"type":"object","properties":{"apiKey":{"type":"string","description":"API Key for connecting to SVIX. This API Key will be then used in `Authorization` header while sending requests to SVIX, so the value should include `Bearer` prefix if necessary."}},"description":"SVIX config"},"HttpConfig":{"type":"object","properties":{"secretKey":{"type":"string","description":"Optional secret key which could be used to sign the message. This secret is used in `HMAC SHA 256` algorithm which encrypts the payload. Then this value is encoded to `BASE256` and included in `emporix-event-signature` header of HTTP request."},"destinationUrl":{"type":"string","description":"Destination URL where event should be sent."},"headers":{"allOf":[{"$ref":"#/components/schemas/HttpHeadersConfig"}],"description":"List of key-value pairs which can decorate outgoing HTTP POST request as headers. The size limit for this list is `10`."},"eventsConfiguration":{"$ref":"#/components/schemas/EventConfiguration"}},"description":"HTTP config"},"HttpHeadersConfig":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/HttpHeaderConfigValue"}},"HttpHeaderConfigValue":{"type":"object","properties":{"value":{"type":"string"}}},"EventConfiguration":{"type":"object","properties":{"eventType":{"type":"string","description":"Unique identifier of the event."},"secretKey":{"type":"string","description":"Optional secret key which could be used to sign the message. This secret is used in `HMAC SHA 256` algorithm which encrypts the payload. Then this value is encoded to `BASE256` and included in `emporix-event-signature` header of HTTP request. It has higher priority than `secretKey` on root level. Each event can have defined a separated secret key."},"destinationUrl":{"type":"string","description":"Destination URL where event should be sent. It has higher priority than `destinationUrl` on root level. Each event can have defined a separated destination url."},"headers":{"allOf":[{"$ref":"#/components/schemas/HttpHeadersConfig"}],"description":"List of key-value pairs which can decorate outgoing HTTP POST request as headers. The size limit for this list is `10`. It has higher priority than `headers` on root level. Each event can have defined a separated headers."}}},"EventsConfiguration":{"type":"array","items":{"$ref":"#/components/schemas/EventConfiguration"}}}},"paths":{"/webhook/{tenant}/config/{code}":{"patch":{"summary":"Partially updating a webhook config","operationId":"PATCH-webhook-update-config","responses":{"204":{"description":"No content"},"400":{"$ref":"#/components/responses/BadRequest_400"},"401":{"$ref":"#/components/responses/Unauthorized_401"},"403":{"$ref":"#/components/responses/Forbidden_403"},"500":{"$ref":"#/components/responses/InternalServerError_500"}},"description":"Partially updates a webhook config for a given tenant. Single update may contain multiple partial updates in the form of an array. Following operations are allowed:\n* `REMOVE` - removing an item from the list\n* `UPSERT` - adding or updating given property\n","tags":["Config"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfigPartialUpdates"}}},"description":""}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/api-references-1/readme/api-reference-41/config.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
