chore: Update the documentation for configuring webhooks in the account (#4703)
This commit is contained in:
@@ -4081,6 +4081,129 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/accounts/{account_id}/webhooks": {
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
}
|
||||
],
|
||||
"get": {
|
||||
"tags": [
|
||||
"Webhooks"
|
||||
],
|
||||
"operationId": "list-all-webhooks",
|
||||
"summary": "List all webhooks",
|
||||
"description": "List all webhooks in the account",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"description": "Array of webhook objects",
|
||||
"items": {
|
||||
"$ref": "#/definitions/webhook"
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"tags": [
|
||||
"Webhooks"
|
||||
],
|
||||
"operationId": "create-a-webhook",
|
||||
"summary": "Add a webhook",
|
||||
"description": "Add a webhook subscription to the account",
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/webhook_create_update_payload"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/webhook"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/accounts/{account_id}/webhooks/{webhook_id}": {
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/webhook_id"
|
||||
}
|
||||
],
|
||||
"patch": {
|
||||
"tags": [
|
||||
"Webhooks"
|
||||
],
|
||||
"operationId": "update-a-webhook",
|
||||
"summary": "Update a webhook object",
|
||||
"description": "Update a webhook object in the account",
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/webhook_create_update_payload"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/webhook"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"tags": [
|
||||
"Webhooks"
|
||||
],
|
||||
"operationId": "delete-a-webhook",
|
||||
"summary": "Delete a webhook",
|
||||
"description": "Delete a webhook from the account",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success"
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
},
|
||||
"404": {
|
||||
"description": "The webhook does not exist in the account"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v2/accounts/{account_id}/reports": {
|
||||
"parameters": [
|
||||
{
|
||||
@@ -4772,6 +4895,38 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"webhook": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"description": "The ID of the webhook"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "The url to which the events will be send"
|
||||
},
|
||||
"subscriptions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"conversation_created",
|
||||
"conversation_status_changed",
|
||||
"conversation_updated",
|
||||
"message_created",
|
||||
"message_updated",
|
||||
"webwidget_triggered"
|
||||
]
|
||||
},
|
||||
"description": "The list of subscribed events"
|
||||
},
|
||||
"account_id": {
|
||||
"type": "number",
|
||||
"description": "The id of the account which the webhook object belongs to"
|
||||
}
|
||||
}
|
||||
},
|
||||
"account": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -5223,6 +5378,30 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"webhook_create_update_payload": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "The url where the events should be sent"
|
||||
},
|
||||
"subscriptions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"conversation_created",
|
||||
"conversation_status_changed",
|
||||
"conversation_updated",
|
||||
"message_created",
|
||||
"message_updated",
|
||||
"webwidget_triggered"
|
||||
]
|
||||
},
|
||||
"description": "The events you want to subscribe to."
|
||||
}
|
||||
}
|
||||
},
|
||||
"integrations_hook_create_payload": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -5736,6 +5915,13 @@
|
||||
"required": true,
|
||||
"description": "The numeric ID of the custom filter"
|
||||
},
|
||||
"webhook_id": {
|
||||
"in": "path",
|
||||
"name": "webhook_id",
|
||||
"type": "integer",
|
||||
"required": true,
|
||||
"description": "The numeric ID of the webhook"
|
||||
},
|
||||
"message_id": {
|
||||
"in": "path",
|
||||
"name": "message_id",
|
||||
@@ -5819,17 +6005,18 @@
|
||||
"Agents",
|
||||
"Canned Responses",
|
||||
"Contacts",
|
||||
"Conversations",
|
||||
"Conversation Assignment",
|
||||
"Conversation Labels",
|
||||
"Inboxes",
|
||||
"Messages",
|
||||
"Integrations",
|
||||
"Profile",
|
||||
"Teams",
|
||||
"Conversations",
|
||||
"Custom Attributes",
|
||||
"Custom Filters",
|
||||
"Inboxes",
|
||||
"Integrations",
|
||||
"Messages",
|
||||
"Profile",
|
||||
"Reports",
|
||||
"Custom Attributes"
|
||||
"Teams",
|
||||
"Webhooks"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user