{ "openapi" : "3.1.0", "info" : { "title" : "Webhook", "version" : "1.0.0" }, "paths" : { "/api/v1/webhooks" : { "get" : { "tags" : [ "Webhook" ], "summary" : "Get Webhooks", "description" : "This API lists all webhooks configured in your help desk.", "operationId" : "getWebhooks", "parameters" : [ { "$ref" : "./Common.json#/components/parameters/orgId" } ], "responses" : { "204" : { "$ref" : "./Common.json#/components/responses/emptyResponse" }, "200" : { "$ref" : "#/components/responses/webhookGetALLresponse" } }, "security" : [ { "iam-oauth2-schema" : [ "Desk.webhooks.READ" ] }, { "deprecated-iam-oauth2-schema" : [ "Desk.events.READ", "Desk.settings.READ" ] } ] }, "post" : { "tags" : [ "Webhook" ], "summary" : "Create webhook", "description" : "This API creates a webhook in your help desk. When the API is invoked, a validation GET request is sent to the subscription URL. That subscription end-point must return a 200 OK message to confirm the subscription. If the 200 OK message is not received, a validation POST request is initiated to the subscription URL. Failure to receive a 200 OK message will result in the failure of webhook creation.", "operationId" : "createWebhook", "parameters" : [ { "$ref" : "./Common.json#/components/parameters/orgId" } ], "requestBody" : { "$ref" : "#/components/requestBodies/webhookjson" }, "responses" : { "422" : { "$ref" : "./Common.json#/components/responses/invalidDataErrorResponse" }, "200" : { "$ref" : "#/components/responses/webhookResponse" } }, "security" : [ { "iam-oauth2-schema" : [ "Desk.webhooks.CREATE" ] }, { "deprecated-iam-oauth2-schema" : [ "Desk.events.CREATE", "Desk.settings.CREATE" ] } ] } }, "/api/v1/webhooks/{webhookId}" : { "get" : { "tags" : [ "Webhook" ], "summary" : "Get webhook", "description" : "This API fetches a single webhook from your help desk.", "operationId" : "getWebhook", "parameters" : [ { "name" : "webhookId", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : [ "string", "integer" ], "format" : "int64", "pattern" : "([0-9]+)" } }, { "$ref" : "./Common.json#/components/parameters/orgId" } ], "responses" : { "200" : { "$ref" : "#/components/responses/webhookResponse" } }, "security" : [ { "iam-oauth2-schema" : [ "Desk.webhooks.READ" ] }, { "deprecated-iam-oauth2-schema" : [ "Desk.events.READ", "Desk.settings.READ" ] } ] }, "delete" : { "tags" : [ "Webhook" ], "summary" : "Delete Webhook", "description" : "This API deletes an existing webhook. After this API is executed, the URL in the webhook stops receiving event information.", "operationId" : "deleteWebhook", "parameters" : [ { "name" : "webhookId", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : [ "string", "integer" ], "format" : "int64", "pattern" : "([0-9]+)" } }, { "$ref" : "./Common.json#/components/parameters/orgId" } ], "responses" : { "200" : { "$ref" : "./Common.json#/components/responses/emptyResponse" } }, "security" : [ { "iam-oauth2-schema" : [ "Desk.webhooks.DELETE" ] }, { "deprecated-iam-oauth2-schema" : [ "Desk.events.DELETE", "Desk.settings.DELETE" ] } ] }, "patch" : { "tags" : [ "Webhook" ], "summary" : "Update Webhook", "description" : "This API updates the details of an existing webhook. When the webhook's URL is altered, a validation GET request is sent to the new URL. If the 200 OK message is not received, a validation POST request is initiated.", "operationId" : "updateWebhook", "parameters" : [ { "name" : "webhookId", "in" : "path", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : [ "string", "integer" ], "format" : "int64", "pattern" : "([0-9]+)" } }, { "$ref" : "./Common.json#/components/parameters/orgId" } ], "requestBody" : { "$ref" : "#/components/requestBodies/updateWebhook_webhookjson" }, "responses" : { "422" : { "$ref" : "./Common.json#/components/responses/invalidDataErrorResponse" }, "200" : { "$ref" : "#/components/responses/webhookResponse" } }, "security" : [ { "iam-oauth2-schema" : [ "Desk.webhooks.UPDATE" ] }, { "deprecated-iam-oauth2-schema" : [ "Desk.events.UPDATE", "Desk.settings.UPDATE" ] } ] } } }, "components" : { "schemas" : { "subscriptions" : { "type" : [ "object", "null" ], "additionalProperties" : false, "properties" : { "Account_Add" : { "type" : [ "object", "null" ], "description" : "Pass null if no criteria is needed for this event", "additionalProperties" : false, "properties" : { "criteria" : { "type" : "object", "description" : "Field-based criteria to conditionally trigger the webhook for this event" } } }, "Event_Delete" : { "type" : [ "string", "null" ] }, "Article_Translation_Add" : { "type" : [ "string", "null" ] }, "Article_Translation_Delete" : { "type" : [ "string", "null" ] }, "Ticket_Attachment_Add" : { "type" : [ "object", "null" ], "additionalProperties" : false, "properties" : { "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 } } }, "Ticket_Attachment_Update" : { "type" : [ "object", "null" ], "additionalProperties" : false, "properties" : { "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 } } }, "Event_Update" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 3, "minProperties" : 2, "properties" : { "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 }, "includePrevState" : { "type" : [ "boolean", "null" ] }, "criteria" : { "type" : [ "object", "null" ], "description" : "Field-based criteria to conditionally trigger the webhook for this event" } }, "required" : [ "departmentIds", "includePrevState" ] }, "Agent_Presence_Update" : { "type" : [ "string", "null" ] }, "Ticket_Update" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 5, "minProperties" : 4, "properties" : { "departmentId" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false }, "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 }, "fields" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "null" ], "maxLength" : 100, "minLength" : 0, "pattern" : "([0-9a-zA-Z_\\-\\.\\$@\\?\\,\\:\\'\\/\\!\\P{InBasicLatin}\\s])+" }, "maxItems" : 20, "minItems" : 0, "uniqueItems" : false }, "includePrevState" : { "type" : [ "boolean", "null" ] }, "criteria" : { "type" : [ "object", "null" ], "description" : "Field-based criteria to conditionally trigger the webhook for this event" } }, "required" : [ "departmentId", "departmentIds", "fields", "includePrevState" ] }, "Contact_Delete" : { "type" : [ "string", "null" ] }, "Ticket_Comment_Update" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 3, "minProperties" : 2, "properties" : { "departmentId" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false }, "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 } }, "required" : [ "departmentId", "departmentIds" ] }, "Task_Add" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 2, "minProperties" : 1, "properties" : { "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 } }, "required" : [ "departmentIds" ] }, "Ticket_Add" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 3, "minProperties" : 2, "properties" : { "departmentId" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false }, "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 } }, "required" : [ "departmentId", "departmentIds" ] }, "Task_Update" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 3, "minProperties" : 2, "properties" : { "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 }, "includePrevState" : { "type" : [ "boolean", "null" ] }, "criteria" : { "type" : [ "object", "null" ], "description" : "Field-based criteria to conditionally trigger the webhook for this event" } }, "required" : [ "departmentIds", "includePrevState" ] }, "Task_Delete" : { "type" : [ "string", "null" ] }, "KBRootCategory_Update" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 1, "minProperties" : 1, "properties" : { "includePrevState" : { "type" : [ "boolean", "null" ] } }, "required" : [ "includePrevState" ] }, "Call_Add" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 2, "minProperties" : 1, "properties" : { "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 } }, "required" : [ "departmentIds" ] }, "Article_Update" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 1, "minProperties" : 1, "properties" : { "includePrevState" : { "type" : [ "boolean", "null" ] } }, "required" : [ "includePrevState" ] }, "KBRootCategory_Delete" : { "type" : [ "string", "null" ] }, "Article_Delete" : { "type" : [ "string", "null" ] }, "KBRootCategory_Add" : { "type" : [ "string", "null" ] }, "Agent_Update" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 1, "minProperties" : 1, "properties" : { "includePrevState" : { "type" : [ "boolean", "null" ] } }, "required" : [ "includePrevState" ] }, "Department_Add" : { "type" : [ "string", "null" ] }, "Contact_Add" : { "type" : [ "object", "null" ], "description" : "Pass null if no criteria is needed for this event", "additionalProperties" : false, "properties" : { "criteria" : { "type" : "object", "description" : "Field-based criteria to conditionally trigger the webhook for this event" } } }, "KBSection_Delete" : { "type" : [ "string", "null" ] }, "Agent_Delete" : { "type" : [ "string", "null" ] }, "KBSection_Update" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 1, "minProperties" : 1, "properties" : { "includePrevState" : { "type" : [ "boolean", "null" ] } }, "required" : [ "includePrevState" ] }, "Account_Delete" : { "type" : [ "string", "null" ] }, "Event_Add" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 2, "minProperties" : 1, "properties" : { "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 } }, "required" : [ "departmentIds" ] }, "Call_Update" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 3, "minProperties" : 2, "properties" : { "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 }, "includePrevState" : { "type" : [ "boolean", "null" ] }, "criteria" : { "type" : [ "object", "null" ], "description" : "Field-based criteria to conditionally trigger the webhook for this event" } }, "required" : [ "departmentIds", "includePrevState" ] }, "Call_Delete" : { "type" : [ "string", "null" ] }, "Article_Add" : { "type" : [ "string", "null" ] }, "Ticket_Comment_Add" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 3, "minProperties" : 2, "properties" : { "departmentId" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false }, "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 } }, "required" : [ "departmentId", "departmentIds" ] }, "KBSection_Add" : { "type" : [ "string", "null" ] }, "Contact_Update" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 1, "minProperties" : 1, "properties" : { "includePrevState" : { "type" : [ "boolean", "null" ] } }, "required" : [ "includePrevState" ] }, "Agent_Add" : { "type" : [ "string", "null" ] }, "Account_Update" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 1, "minProperties" : 1, "properties" : { "includePrevState" : { "type" : [ "boolean", "null" ] } }, "required" : [ "includePrevState" ] }, "Article_Feedback_Add" : { "type" : [ "string", "null" ] }, "IM_Message_Add" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 2, "minProperties" : 1, "properties" : { "departmentId" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false }, "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 } }, "required" : [ "departmentIds" ] }, "IM_Message_Status" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 2, "minProperties" : 1, "properties" : { "departmentId" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false }, "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 } }, "required" : [ "departmentIds" ] }, "Article_Translation_Update" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 1, "minProperties" : 1, "properties" : { "includePrevState" : { "type" : [ "boolean", "null" ] } }, "required" : [ "includePrevState" ] }, "Department_Update" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 1, "minProperties" : 1, "properties" : { "includePrevState" : { "type" : [ "boolean", "null" ] } }, "required" : [ "includePrevState" ] }, "Ticket_Thread_Add" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 4, "minProperties" : 3, "properties" : { "departmentId" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false }, "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 }, "direction" : { "type" : [ "string", "null" ], "enum" : [ "in", "out" ] }, "criteria" : { "type" : [ "object", "null" ], "description" : "Field-based criteria to conditionally trigger the webhook for this event" } }, "required" : [ "departmentId", "departmentIds", "direction" ] }, "Ticket_Delete" : { "type" : [ "string", "null" ] }, "Agent_Channel_Preference_Update" : { "type" : [ "string", "null" ], "description" : "Agent channel preference update Event: This event does not support filters. Therefore, pass the value as null in the API request." }, "IM_Session_Status" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 2, "minProperties" : 2, "properties" : { "departmentId" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false }, "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 } }, "required" : [ "departmentId", "departmentIds" ] }, "Ticket_Attachment_Trashed" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 1, "minProperties" : 1, "properties" : { "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 } }, "required" : [ "departmentIds" ] }, "Ticket_Attachment_Restored" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 1, "minProperties" : 1, "properties" : { "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 } }, "required" : [ "departmentIds" ] }, "Ticket_Attachment_Delete" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 1, "minProperties" : 1, "properties" : { "departmentIds" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "uniqueItems" : false, "maxItems" : 100, "minItems" : 0 } }, "required" : [ "departmentIds" ] }, "Ticket_Comment_Attachment_Add" : { "type" : [ "string", "null" ], "description" : "Ticket Comment Attachment Add Event: This event does not support filters. Therefore, pass the value as null in the API request." }, "Ticket_Comment_Attachment_Delete" : { "type" : [ "string", "null" ], "description" : "Ticket Comment Attachment Delete Event: This event does not support filters. Therefore, pass the value as null in the API request." }, "TimeEntry_Add" : { "type" : [ "string", "null" ], "description" : "Time Entry Add Event: This event does not support filters. Therefore, pass the value as null in the API request." }, "TimeEntry_Update" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 1, "minProperties" : 1, "properties" : { "includePrevState" : { "type" : [ "boolean", "null" ] } }, "required" : [ "includePrevState" ] }, "TimeEntry_Delete" : { "type" : [ "string", "null" ], "description" : "Time Entry Delete Event: This event does not support filters. Therefore, pass the value as null in the API request." }, "Ticket_Approval_Add" : { "type" : [ "string", "null" ], "description" : "Ticket Approval Add Event: This event does not support filters. Therefore, pass the value as null in the API request." }, "Ticket_Approval_Update" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 1, "minProperties" : 1, "properties" : { "includePrevState" : { "type" : [ "boolean", "null" ] } }, "required" : [ "includePrevState" ] } } }, "webhookjson" : { "type" : [ "object", "null" ], "additionalProperties" : false, "properties" : { "subscriptions" : { "$ref" : "#/components/schemas/subscriptions" }, "includeEventsFrom" : { "type" : [ "array", "null" ], "items" : { "type" : [ "string", "null" ], "maxLength" : 100, "minLength" : 0, "pattern" : "(AUTOMATION)" }, "uniqueItems" : false }, "isEnabled" : { "type" : [ "boolean", "null" ] }, "name" : { "type" : [ "string", "null" ], "maxLength" : 100, "minLength" : 0 }, "description" : { "type" : [ "string", "null" ], "maxLength" : 3000, "minLength" : 0 }, "ignoreSourceId" : { "type" : [ "string", "null" ], "maxLength" : 100, "minLength" : 0, "pattern" : "^([0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12})$|^$" }, "url" : { "type" : [ "string", "null" ], "maxLength" : 100, "minLength" : 0, "pattern" : "(^(ht|f)tp(s?)\\://[-.\\w]*(/?)([a-zA-Z0-9\\-\\.\\?\\,\\:\\'/\\\\+=&%\\$#_@]*)?$)" } }, "required" : [ "description", "ignoreSourceId", "includeEventsFrom", "isEnabled", "name", "subscriptions", "url" ] }, "listViewJSON" : { "additionalProperties" : false, "allOf" : [ { "$ref" : "#/components/schemas/webhookjson" }, { "type" : [ "object", "null" ], "properties" : { "modifiedTime" : { "type" : [ "string", "null" ], "maxLength" : 100, "minLength" : 0, "pattern" : "(((19|20)\\d\\d)[-/.]{1}(0?[1-9]|1[012])[-/.]{1}(0?[1-9]|[12][0-9]|3[01])(T)([01]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]([/.][\\d]{0,3})?(Z))" }, "createdBy" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "createdTime" : { "type" : [ "string", "null" ], "maxLength" : 100, "minLength" : 0, "pattern" : "(((19|20)\\d\\d)[-/.]{1}(0?[1-9]|1[012])[-/.]{1}(0?[1-9]|[12][0-9]|3[01])(T)([01]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]([/.][\\d]{0,3})?(Z))" }, "id" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "type" : { "type" : [ "string", "null" ], "enum" : [ "CUSTOMER_WEBHOOK", "EXTENSION_WEBHOOK" ] } }, "required" : [ "createdBy", "createdTime", "id", "modifiedTime", "type" ], "additionalProperties" : false } ] }, "listViewData" : { "type" : [ "array", "null" ], "items" : { "$ref" : "#/components/schemas/listViewJSON" } } }, "responses" : { "webhookGetALLresponse" : { "description" : "webhookGetALLresponse template definitions", "content" : { "application/json" : { "schema" : { "allOf" : [ { "type" : [ "object" ], "properties" : { "data" : { "type" : [ "array" ], "items" : { "type" : [ "object" ], "properties" : { "extension" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 10, "minProperties" : 10, "properties" : { "extensionName" : { "type" : [ "string", "null" ], "maxLength" : 100, "minLength" : 0 }, "hashkey" : { "type" : [ "string", "null" ], "maxLength" : 100, "minLength" : 0, "pattern" : "^[a-zA-Z0-9]+$" }, "isPermissionsEnabled" : { "type" : [ "boolean", "null" ] }, "latestVersion" : { "type" : [ "string", "null" ], "maxLength" : 100, "minLength" : 0, "pattern" : "\\d+(\\.\\d{1,2})?" }, "installationId" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "isPrivate" : { "type" : [ "boolean", "null" ] }, "isChannelApp" : { "type" : [ "boolean", "null" ] }, "widgets" : { "type" : [ "array", "null" ], "items" : { "type" : [ "object", "null" ], "additionalProperties" : false, "maxProperties" : 5, "minProperties" : 5, "properties" : { "icon" : { "type" : [ "string", "null" ], "maxLength" : 100, "minLength" : 0 }, "name" : { "type" : [ "string", "null" ], "maxLength" : 100, "minLength" : 0 }, "logo" : { "type" : [ "string", "null" ], "maxLength" : 100, "minLength" : 0 }, "location" : { "type" : [ "string", "null" ], "enum" : [ "desk.ticket.detail.rightpanel", "desk.ticket.detail.subtab", "desk.bottomband", "desk.background", "desk.topband", "desk.task.detail.rightpanel", "desk.extension.preference", "desk.ticket.detail.lefttab", "desk.contact.detail.lefttab", "desk.account.detail.lefttab", "desk.ticket.detail.moreaction", "desk.ticket.thread.moreaction", "desk.ticket.form.rightpanel", "desk.contact.form.rightpanel", "desk.account.form.rightpanel", "desk.extension.telephony", "desk.contact.detail.subtab", "desk.account.detail.subtab", "desk.contact.detail.rightpanel", "desk.account.detail.rightpanel", "helpcenter.ticket.list", "helpcenter.ticket.detail", "helpcenter.ticket.form", "helpcenter.homepage", "helpcenter.kb.homepage", "helpcenter.kb.article.list", "helpcenter.kb.article.detail", "helpcenter.community.homepage", "helpcenter.community.topic.list", "helpcenter.community.topic.detail", "desk.kb.article.detail.subtab" ] }, "url" : { "type" : [ "string", "null" ], "maxLength" : 65535, "minLength" : 0 } }, "required" : [ "icon", "location", "logo", "name", "url" ] }, "uniqueItems" : false }, "uuId" : { "type" : [ "string", "null" ], "maxLength" : 100, "minLength" : 0, "pattern" : "^[A-z0-9_.,@:\\-\\s/]*$" }, "version" : { "type" : [ "string", "null" ], "maxLength" : 100, "minLength" : 0, "pattern" : "\\d+(\\.\\d{1,2})?" } }, "required" : [ "extensionName", "hashkey", "installationId", "isChannelApp", "isPermissionsEnabled", "isPrivate", "latestVersion", "uuId", "version", "widgets" ] } }, "additionalProperties" : false } } }, "additionalProperties" : false }, { "type" : [ "object", "null" ], "additionalProperties" : false, "properties" : { "data" : { "$ref" : "#/components/schemas/listViewData" } }, "required" : [ "data" ] } ] }, "examples" : { "Valid responses Definitions" : { "value" : { "data" : [ { "modifiedTime" : 1528130625304, "subscriptions" : { "Account_Add" : null, "Contact_Update" : null, "Account_Update" : null, "Ticket_Update" : { "departmentIds" : [ "1234567890", "1234567891" ] }, "Ticket_Add" : { "departmentIds" : [ "1234567891", "1234567895" ] }, "Ticket_Comment_Add" : { "departmentIds" : [ "1234567890" ] }, "Ticket_Thread_Add" : { "departmentIds" : [ "1234567890" ] }, "Contact_Add" : null }, "includeEventsFrom" : [ "AUTOMATION" ], "createdBy" : "100000002344", "isEnabled" : false, "name" : "Test webhook", "createdTime" : 1528128140737, "description" : "This webhook listen to ticket events", "ignoreSourceId" : "49ad222a-f812-11e7-8c3f-9a214cf093ae", "id" : "1234567800", "type" : [ "CUSTOMER_WEBHOOK" ], "url" : "www.demoServer.com/webhookTest" }, { "modifiedTime" : 1528130625304, "subscriptions" : { "Ticket_Update" : { "departmentIds" : [ "1234567890", "1234567895" ] }, "Ticket_Add" : { "departmentIds" : [ "1234567891", "1234567895" ] } }, "createdBy" : "100000002344", "isEnabled" : true, "name" : "Test webhook", "createdTime" : 1528128140737, "description" : "This webhook handles desk events and trigger actions in google extension ", "ignoreSourceId" : "49ad222a-f812-11e7-8c3f-9a204cf194bf", "id" : "1234567801", "type" : [ "EXTENSION_WEBHOOK" ], "url" : "www.demoServer2.com/webhookTest" } ] } } } } } }, "webhookResponse" : { "description" : "webhookResponse template definitions", "content" : { "application/json" : { "schema" : { "additionalProperties" : false, "allOf" : [ { "$ref" : "#/components/schemas/webhookjson" }, { "type" : [ "object", "null" ], "properties" : { "modifiedTime" : { "type" : [ "string", "null" ], "maxLength" : 100, "minLength" : 0, "pattern" : "(((19|20)\\d\\d)[-/.]{1}(0?[1-9]|1[012])[-/.]{1}(0?[1-9]|[12][0-9]|3[01])(T)([01]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]([/.][\\d]{0,3})?(Z))" }, "createdBy" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "createdTime" : { "type" : [ "string", "null" ], "maxLength" : 100, "minLength" : 0, "pattern" : "(((19|20)\\d\\d)[-/.]{1}(0?[1-9]|1[012])[-/.]{1}(0?[1-9]|[12][0-9]|3[01])(T)([01]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]([/.][\\d]{0,3})?(Z))" }, "id" : { "type" : [ "string", "integer", "null" ], "format" : "int64", "pattern" : "([0-9]+)" }, "type" : { "type" : [ "string", "null" ], "enum" : [ "CUSTOMER_WEBHOOK", "EXTENSION_WEBHOOK" ] } }, "required" : [ "createdBy", "createdTime", "id", "modifiedTime", "type" ], "additionalProperties" : false } ] }, "examples" : { "Valid responses Definitions" : { "value" : null } } } } } }, "requestBodies" : { "webhookjson" : { "content" : { "application/json" : { "schema" : { "type" : [ "object" ], "additionalProperties" : false, "properties" : { "subscriptions" : { "$ref" : "#/components/schemas/subscriptions" }, "includeEventsFrom" : { "type" : [ "array" ], "items" : { "type" : [ "string" ], "maxLength" : 100, "minLength" : 0, "pattern" : "(AUTOMATION)" }, "uniqueItems" : false }, "isEnabled" : { "type" : [ "boolean" ] }, "name" : { "type" : [ "string" ], "maxLength" : 100, "pattern" : "[0-9a-zA-Z_\\-\\&\\.\\$\\@\\^\\(\\)\\{\\}\\~\\=\\-\\|\\*\\+\\?\\[\\]\\,\\:\\\"\\'\\/\\!\\P{InBasicLatin}\\s]+" }, "description" : { "type" : [ "string" ], "maxLength" : 3000, "pattern" : "[0-9a-zA-Z_\\-\\.\\$@\\?\\,\\:\\'\\/\\!\\P{InBasicLatin}\\s]+" }, "ignoreSourceId" : { "type" : [ "string" ], "maxLength" : 250, "pattern" : "^([0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12})$|^$" }, "url" : { "type" : [ "string" ], "maxLength" : 500, "pattern" : "(^(ht|f)tp(s?)\\:\\/\\/[0-9a-zA-Z][-.\\w]*(:[0-9])*(\\/?)([a-zA-Z0-9\\-\\.\\?\\,|\\:\\'\\/\\\\\\+=&%\\$#_\\[\\]@!\\(\\)\\*;~]*)?$)|[*]" } }, "required" : [ "subscriptions", "url" ] }, "examples" : { "Valid requestBody Definitions" : { "value" : { "subscriptions" : { "Account_Add" : null, "Contact_Update" : null, "Account_Update" : null, "Ticket_Update" : { "departmentIds" : [ "1234567890", "1234567895" ] }, "Ticket_Add" : { "departmentIds" : [ "1234567891", "1234567895" ] }, "Ticket_Comment_Add" : { "departmentIds" : [ "1234567890" ] }, "Ticket_Thread_Add" : { "departmentIds" : [ "1234567891" ] }, "Contact_Add" : null }, "includeEventsFrom" : [ "AUTOMATION" ], "name" : "Test webhook", "description" : "This webhook listen to ticket events", "ignoreSourceId" : "49ad222a-f812-11e7-8c3f-9a214cf093ae", "url" : "www.demoServer.com/webhookTest" } } } } } }, "updateWebhook_webhookjson" : { "content" : { "application/json" : { "schema" : { "type" : [ "object" ], "additionalProperties" : false, "properties" : { "subscriptions" : { "$ref" : "#/components/schemas/subscriptions" }, "includeEventsFrom" : { "type" : [ "array" ], "items" : { "type" : [ "string" ], "maxLength" : 100, "minLength" : 0, "pattern" : "(AUTOMATION)" }, "uniqueItems" : false }, "isEnabled" : { "type" : [ "boolean" ] }, "name" : { "type" : [ "string" ], "maxLength" : 100, "minLength" : 0 }, "description" : { "type" : [ "string" ], "maxLength" : 3000, "minLength" : 0 }, "ignoreSourceId" : { "type" : [ "string" ], "maxLength" : 100, "minLength" : 0, "pattern" : "^([0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12})$|^$" }, "url" : { "type" : [ "string" ], "maxLength" : 100, "minLength" : 0, "pattern" : "(^(ht|f)tp(s?)\\://[-.\\w]*(/?)([a-zA-Z0-9\\-\\.\\?\\,\\:\\'/\\\\+=&%\\$#_@]*)?$)" } }, "required" : [ "subscriptions" ] }, "examples" : { "Valid requestBody Definitions" : { "value" : null } } } } } }, "securitySchemes" : { "cookie-auth" : { "$ref" : "./Common.json#/components/securitySchemes/cookie-auth" }, "org-oauth" : { "$ref" : "./Common.json#/components/securitySchemes/org-oauth" }, "iam-oauth2-schema" : { "$ref" : "./Common.json#/components/securitySchemes/iam-oauth2-schema" }, "deprecated-iam-oauth2-schema" : { "$ref" : "./Common.json#/components/securitySchemes/deprecated-iam-oauth2-schema" } } }, "x-entity" : "Webhook" }