docs: Add documentation for integration APIs (#2300)
This commit is contained in:
@@ -957,7 +957,7 @@
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"type": "number",
|
||||
"description": "id of the contact",
|
||||
"description": "ID of the contact",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
@@ -987,7 +987,7 @@
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"type": "number",
|
||||
"description": "id of the contact",
|
||||
"description": "ID of the contact",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
@@ -1027,7 +1027,7 @@
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"type": "number",
|
||||
"description": "id of the contact",
|
||||
"description": "ID of the contact",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
@@ -1107,7 +1107,7 @@
|
||||
"properties": {
|
||||
"inbox_id": {
|
||||
"type": "number",
|
||||
"description": "The id of the inbox",
|
||||
"description": "The ID of the inbox",
|
||||
"required": true
|
||||
},
|
||||
"source_id": {
|
||||
@@ -1269,7 +1269,7 @@
|
||||
"description": "Unauthorized"
|
||||
},
|
||||
"404": {
|
||||
"description": "The given team id does not exist in the account"
|
||||
"description": "The given team ID does not exist in the account"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1321,6 +1321,131 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/accounts/{account_id}/integrations/apps": {
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
}
|
||||
],
|
||||
"get": {
|
||||
"tags": [
|
||||
"Integrations"
|
||||
],
|
||||
"operationId": "get-details-of-all-integrations",
|
||||
"summary": "List all the Integrations",
|
||||
"description": "Get the details of all Integrations available for the account",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/integrations_app"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
},
|
||||
"404": {
|
||||
"description": "Url not found"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/accounts/{account_id}/integrations/hooks": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"Integrations"
|
||||
],
|
||||
"operationId": "create-an-integration-hook",
|
||||
"summary": "Create an integration hook",
|
||||
"description": "Create an integration hook",
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/integrations_hook_create_payload"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/integrations_hook"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"tags": [
|
||||
"Integrations"
|
||||
],
|
||||
"operationId": "update-an-integrations-hook",
|
||||
"summary": "Update an Integration Hook",
|
||||
"description": "Update an Integration Hook",
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/hook_id"
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/integrations_hook_update_payload"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/integrations_hook"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"tags": [
|
||||
"Integrations"
|
||||
],
|
||||
"operationId": "delete-an-integration-hook",
|
||||
"summary": "Delete an Integration Hook",
|
||||
"description": "Delete an Integration Hook",
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/parameters/account_id"
|
||||
},
|
||||
{
|
||||
"$ref": "#/parameters/hook_id"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Success"
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized"
|
||||
},
|
||||
"404": {
|
||||
"description": "The hook does not exist in the account"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
@@ -1662,7 +1787,7 @@
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"description": "The id of the team"
|
||||
"description": "The ID of the team"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
@@ -1678,7 +1803,7 @@
|
||||
},
|
||||
"account_id": {
|
||||
"type": "number",
|
||||
"description": "The id of the account with the team is a part of"
|
||||
"description": "The ID of the account with the team is a part of"
|
||||
},
|
||||
"is_member": {
|
||||
"type": "boolean",
|
||||
@@ -1686,6 +1811,72 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"integrations_app": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The ID of the integration"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the integration"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": "The description about the team"
|
||||
},
|
||||
"hook_type": {
|
||||
"type": "string",
|
||||
"description": "Whether the integration is an account or inbox integration"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the integration is enabled for the account"
|
||||
},
|
||||
"allow_multiple_hooks": {
|
||||
"type": "boolean",
|
||||
"description": "Whether multiple hooks can be created for the integration"
|
||||
},
|
||||
"hooks": {
|
||||
"type": "array",
|
||||
"description": "If there are any hooks created for this integration"
|
||||
}
|
||||
}
|
||||
},
|
||||
"integrations_hook": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The ID of the integration hook"
|
||||
},
|
||||
"app_id": {
|
||||
"type": "string",
|
||||
"description": "The ID of the integration app"
|
||||
},
|
||||
"inbox_id": {
|
||||
"type": "string",
|
||||
"description": "Inbox ID if its an Inbox integration"
|
||||
},
|
||||
"account_id": {
|
||||
"type": "string",
|
||||
"description": "Account ID of the integration"
|
||||
},
|
||||
"status": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the integration hook is enabled for the account"
|
||||
},
|
||||
"hook_type": {
|
||||
"type": "boolean",
|
||||
"description": "Whether its an account or inbox integration hook"
|
||||
},
|
||||
"settings": {
|
||||
"type": "object",
|
||||
"description": "The associated settings for the integration"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extended_contact": {
|
||||
"allOf": [
|
||||
{
|
||||
@@ -2048,6 +2239,32 @@
|
||||
"description": "If this setting is turned on, the system would automatically assign the conversation to an agent in the team while assigning the conversation to a team"
|
||||
}
|
||||
}
|
||||
},
|
||||
"integrations_hook_create_payload": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"app_id": {
|
||||
"type": "string",
|
||||
"description": "The ID of app for which integration hook is being created"
|
||||
},
|
||||
"inbox_id": {
|
||||
"type": "string",
|
||||
"description": "The inbox ID, if the hook is an inbox hook"
|
||||
},
|
||||
"settings": {
|
||||
"type": "object",
|
||||
"description": "The settings required by the integration"
|
||||
}
|
||||
}
|
||||
},
|
||||
"integrations_hook_update_payload": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"settings": {
|
||||
"type": "object",
|
||||
"description": "The settings required by the integration"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
@@ -2067,7 +2284,16 @@
|
||||
"type": "integer"
|
||||
},
|
||||
"required": true,
|
||||
"description": "The id of the team to be updated"
|
||||
"description": "The ID of the team to be updated"
|
||||
},
|
||||
"hook_id": {
|
||||
"in": "path",
|
||||
"name": "hook_id",
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"required": true,
|
||||
"description": "The numeric ID of the integration hook"
|
||||
},
|
||||
"source_id": {
|
||||
"type": "string",
|
||||
|
||||
Reference in New Issue
Block a user