Create or Update Webhook Rule

put https://app.mk.io/api/v1/projects/:project_name/webhook/rules/:rule_name

Create or Update Webhook Rule.

Authentication

Authorization Bearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

project_name string Required
rule_name string Required

Request

This endpoint expects an object.

specobjectWebhookRuleSpecSchemaRequired
Webhook rule spec.
Show 6 propertiesHide 6 properties
authenticationobjectAuthenticationSchemaOptional
Authentication details.
Show 2 propertiesHide 2 properties
headersmap from strings to stringOptional
Authentication headers.
Show value schemaHide value schema
[any key]string
queryParamsmap from strings to stringOptional
Authentication query parameters.
Show value schemaHide value schema
[any key]string
enabledbooleanRequired
Indicates whether the webhook is enabled.
eventslist of enumsRequired
List of events that trigger the webhook.
headersmap from strings to stringOptional
Headers to include in the webhook request.
Show value schemaHide value schema
[any key]string
queryParamsmap from strings to stringOptional
Query parameters to include in the webhook request.
Show value schemaHide value schema
[any key]string
urlstringRequired
The URL the webhook should call.

Response

200 Webhook Rule was updated
metadataobjectWebhookRuleMetadataSchemaRequired
Webhook rule metadata.
Show 2 propertiesHide 2 properties
idstringRequiredformat: uuid
The ID of the webhook.
namestringRequired
The name of the webhook. Unique within a project.
specobjectWebhookRuleSpecSchemaRequired
Webhook rule spec.
Show 6 propertiesHide 6 properties
authenticationobjectAuthenticationSchemaOptional
Authentication details.
Show 2 propertiesHide 2 properties
headersmap from strings to stringOptional
Authentication headers.
Show value schemaHide value schema
[any key]string
queryParamsmap from strings to stringOptional
Authentication query parameters.
Show value schemaHide value schema
[any key]string
enabledbooleanRequired
Indicates whether the webhook is enabled.
eventslist of enumsRequired
List of events that trigger the webhook.
headersmap from strings to stringOptional
Headers to include in the webhook request.
Show value schemaHide value schema
[any key]string
queryParamsmap from strings to stringOptional
Query parameters to include in the webhook request.
Show value schemaHide value schema
[any key]string
urlstringRequired
The URL the webhook should call.
201 Webhook Rule was created
metadataobjectWebhookRuleMetadataSchemaRequired
Webhook rule metadata.
Show 2 propertiesHide 2 properties
idstringRequiredformat: uuid
The ID of the webhook.
namestringRequired
The name of the webhook. Unique within a project.
specobjectWebhookRuleSpecSchemaRequired
Webhook rule spec.
Show 6 propertiesHide 6 properties
authenticationobjectAuthenticationSchemaOptional
Authentication details.
Show 2 propertiesHide 2 properties
headersmap from strings to stringOptional
Authentication headers.
Show value schemaHide value schema
[any key]string
queryParamsmap from strings to stringOptional
Authentication query parameters.
Show value schemaHide value schema
[any key]string
enabledbooleanRequired
Indicates whether the webhook is enabled.
eventslist of enumsRequired
List of events that trigger the webhook.
headersmap from strings to stringOptional
Headers to include in the webhook request.
Show value schemaHide value schema
[any key]string
queryParamsmap from strings to stringOptional
Query parameters to include in the webhook request.
Show value schemaHide value schema
[any key]string
urlstringRequired
The URL the webhook should call.

Errors

400 Bad Request
errorobjectErrorDetailRequired
Pertinent information about the error
Show 3 propertiesHide 3 properties
codestringRequired
The error code.
detailstringRequired
The error message.
extraDetailmap from strings to anyOptional
Extra information regarding this error.
Show value schemaHide value schema
[any key]any
refstringRequired
A reference to the request that caused the error.
statusintegerRequired
The HTTP status code
401 Unauthorized
errorobjectErrorDetailRequired
Pertinent information about the error
Show 3 propertiesHide 3 properties
codestringRequired
The error code.
detailstringRequired
The error message.
extraDetailmap from strings to anyOptional
Extra information regarding this error.
Show value schemaHide value schema
[any key]any
refstringRequired
A reference to the request that caused the error.
statusintegerRequired
The HTTP status code
403 Forbidden
errorobjectErrorDetailRequired
Pertinent information about the error
Show 3 propertiesHide 3 properties
codestringRequired
The error code.
detailstringRequired
The error message.
extraDetailmap from strings to anyOptional
Extra information regarding this error.
Show value schemaHide value schema
[any key]any
refstringRequired
A reference to the request that caused the error.
statusintegerRequired
The HTTP status code
404 Not Found
errorobjectErrorDetailRequired
Pertinent information about the error
Show 3 propertiesHide 3 properties
codestringRequired
The error code.
detailstringRequired
The error message.
extraDetailmap from strings to anyOptional
Extra information regarding this error.
Show value schemaHide value schema
[any key]any
refstringRequired
A reference to the request that caused the error.
statusintegerRequired
The HTTP status code
429 Too Many Requests
errorobjectErrorDetailRequired
Pertinent information about the error
Show 3 propertiesHide 3 properties
codestringRequired
The error code.
detailstringRequired
The error message.
extraDetailmap from strings to anyOptional
Extra information regarding this error.
Show value schemaHide value schema
[any key]any
refstringRequired
A reference to the request that caused the error.
statusintegerRequired
The HTTP status code
500 Internal Server Error
errorobjectErrorDetailRequired
Pertinent information about the error
Show 3 propertiesHide 3 properties
codestringRequired
The error code.
detailstringRequired
The error message.
extraDetailmap from strings to anyOptional
Extra information regarding this error.
Show value schemaHide value schema
[any key]any
refstringRequired
A reference to the request that caused the error.
statusintegerRequired
The HTTP status code