Webhook Endpoints
Manage Outgoing Webhooks
This operation returns a list of webhook endpoints with pagination.
Note: This operation needs Authentication.
Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
The number of resources to return in a single response.
Unique identifier.
^[a-zA-Z0-9-]+$Unique identifier.
^[a-zA-Z0-9-]+$Successful response with webhook endpoints data in JSON:API format.
Bad request.
Unauthorized.
Too many requests.
Internal Server Error.
Service is unavailable.
GET /pos/v1/webhook-endpoints HTTP/1.1
Host: api.mews.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": [
{
"id": "83f93e1c-b6e1-4040-90cf-3274b6f3c82d",
"type": "webhookEndpoints",
"attributes": {
"targetUrl": "https://example.com/webhooks/receive",
"secret": "secret",
"events": [
"booking.status.updated",
"product.availability.updated"
],
"createdAt": "2024-10-24T08:44:45.409Z",
"updatedAt": "2024-10-24T08:44:45.409Z"
}
},
{
"id": "7f5d9c2a-1b34-4d7e-b2a3-9c51b4f4fabc",
"type": "webhookEndpoints",
"attributes": {
"targetUrl": "https://another.example.com/webhooks",
"secret": "secret",
"events": [
"order.status.updated"
],
"createdAt": "2024-10-23T10:30:00.000Z",
"updatedAt": "2024-10-23T10:30:00.000Z"
}
}
],
"links": {
"prev": "https://api.mews-demo.com/pos/v1/webhook-endpoints?page%5Bbefore%5D=NA&page%5Bsize%5D=10",
"next": "https://api.mews-demo.com/pos/v1/webhook-endpoints?page%5Bafter%5D=NA&page%5Bsize%5D=10"
}
}Use this operation to register a Webhook with Mews to receive notification events that you subscribed to. For more information, including details about supported events, see API Events.
Note: This operation needs Authentication.
Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Webhook endpoint was successfully created.
Bad request.
Unauthorized.
Unprocessable entity.
Too many requests.
Internal Server Error.
Service is unavailable.
POST /pos/v1/webhook-endpoints HTTP/1.1
Host: api.mews.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 102
{
"data": {
"type": "webhookEndpoints",
"attributes": {
"targetUrl": "https://example.com/webhooks/receive"
}
}
}{
"data": {
"id": "83f93e1c-b6e1-4040-90cf-3274b6f3c82d",
"type": "webhookEndpoints",
"attributes": {
"targetUrl": "https://example.com/webhooks/receive",
"secret": "secret",
"createdAt": "2024-10-24T08:44:45.409Z",
"updatedAt": "2024-10-24T08:44:45.409Z"
}
}
}This operation updates a webhook endpoint. It allows to subscribe or unsubscribe from events.
Note: This operation needs Authentication.
Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>
Universally unique ID UUID4.
83f93e1c-b6e1-4040-90cf-3274b6f3c82dThe WebhookEndpoint was successfully updated.
Bad request.
Unauthorized.
Not found.
Unprocessable entity.
Too many requests.
Internal Server Error.
Service is unavailable.
PATCH /pos/v1/webhook-endpoints/{id} HTTP/1.1
Host: api.mews.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 182
{
"data": {
"type": "webhookEndpoints",
"id": "83f93e1c-b6e1-4040-90cf-3274b6f3c82d",
"attributes": {
"events": [
"booking.status.updated"
],
"targetUrl": "https://example.com/webhooks/receive"
}
}
}{
"data": {
"id": "83f93e1c-b6e1-4040-90cf-3274b6f3c82d",
"type": "webhookEndpoints",
"attributes": {
"events": [
"booking.status.updated"
],
"targetUrl": "https://example.com/webhooks/receive",
"createdAt": "2024-10-24T08:44:45.409Z",
"updatedAt": "2024-10-24T08:44:45.409Z"
}
}
}Last updated
Was this helpful?