{
"openapi" : "3.1.0",
"info" : {
"title" : "Thread",
"version" : "1.0.0"
},
"paths" : {
"/api/v1/tickets/{ticketId}/draftReply/{threadId}" : {
"patch" : {
"tags" : [ "Thread" ],
"summary" : "Update Draft",
"description" : "This API updates a draft thread created via the @EMAIL@, @FACEBOOK@, or @FORUM@ channel.",
"operationId" : "updateDrafts",
"parameters" : [ {
"$ref" : "#/components/parameters/threadId"
}, {
"$ref" : "#/components/parameters/ticketId"
}, {
"$ref" : "./Common.json#/components/parameters/orgId"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"discriminator" : {
"propertyName" : "channel",
"mapping" : {
"EMAIL" : "#/components/schemas/emailThreadSendReply",
"FACEBOOK" : "#/components/schemas/facebookSendReply",
"FORUMS" : "#/components/schemas/forumSendReply"
}
},
"oneOf" : [ {
"$ref" : "#/components/schemas/emailThreadSendReply"
}, {
"$ref" : "#/components/schemas/facebookSendReply"
}, {
"$ref" : "#/components/schemas/forumSendReply"
} ]
}
}
}
},
"responses" : {
"422" : {
"$ref" : "./Common.json#/components/responses/invalidDataErrorResponse"
},
"200" : {
"description" : "updateDrafts Response definition",
"content" : {
"application/json" : {
"schema" : {
"discriminator" : {
"propertyName" : "channel",
"mapping" : {
"EMAIL" : "#/components/schemas/emailThreadResponseJson",
"FACEBOOK" : "#/components/schemas/faceBookThreadResponse",
"FORUMS" : "#/components/schemas/fourmsThreadResponse"
}
},
"oneOf" : [ {
"$ref" : "#/components/schemas/emailThreadResponseJson"
}, {
"$ref" : "#/components/schemas/faceBookThreadResponse"
}, {
"$ref" : "#/components/schemas/fourmsThreadResponse"
} ]
}
}
}
}
},
"security" : [ {
"iam-oauth2-schema" : [ "Desk.tickets.UPDATE" ]
} ],
"x-audience" : [ "external-public" ]
}
},
"/api/v1/tickets/{requestId}/threads/{threadId}/originalContent" : {
"get" : {
"tags" : [ "Thread" ],
"summary" : "Get Original Mail Content",
"description" : "This API get the orginal mail content including mail headers",
"operationId" : "getOriginalMailContent",
"parameters" : [ {
"$ref" : "#/components/parameters/threadId"
}, {
"name" : "requestId",
"in" : "path",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : [ "string", "null", "integer" ],
"format" : "int64",
"pattern" : "([0-9]+)"
}
}, {
"$ref" : "./Common.json#/components/parameters/orgId"
} ],
"responses" : {
"200" : {
"$ref" : "#/components/responses/getOriginalMailContent"
}
},
"security" : [ {
"iam-oauth2-schema" : [ "Desk.tickets.READ" ]
} ],
"x-audience" : [ "external-public" ]
}
},
"/api/v1/tickets/{ticketId}/sendReply" : {
"post" : {
"tags" : [ "Thread" ],
"summary" : "Send Email Reply",
"description" : "This API sends an email reply. The from address in the email must be a from address configured in your help desk portal.",
"operationId" : "sendReply",
"parameters" : [ {
"$ref" : "#/components/parameters/ticketId"
}, {
"$ref" : "#/components/parameters/parentConversationId"
}, {
"name" : "impersonatedUserId",
"in" : "header",
"required" : false,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : [ "string", "null", "integer" ],
"format" : "int64",
"pattern" : "([0-9]+)"
}
}, {
"$ref" : "./Common.json#/components/parameters/orgId"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"discriminator" : {
"propertyName" : "channel",
"mapping" : {
"EMAIL" : "#/components/schemas/emailThreadSendReply",
"FACEBOOK" : "#/components/schemas/facebookSendReply",
"TWITTER" : "#/components/schemas/twitterSendReply",
"FORUMS" : "#/components/schemas/forumSendReply"
}
},
"oneOf" : [ {
"$ref" : "#/components/schemas/emailThreadSendReply"
}, {
"$ref" : "#/components/schemas/facebookSendReply"
}, {
"$ref" : "#/components/schemas/twitterSendReply"
}, {
"$ref" : "#/components/schemas/forumSendReply"
} ]
}
}
}
},
"responses" : {
"422" : {
"$ref" : "./Common.json#/components/responses/invalidDataErrorResponse"
},
"200" : {
"description" : "sendReply Response definition",
"content" : {
"application/json" : {
"schema" : {
"discriminator" : {
"propertyName" : "channel",
"mapping" : {
"EMAIL" : "#/components/schemas/emailThreadResponseJson",
"FACEBOOK" : "#/components/schemas/faceBookThreadResponse",
"TWITTER" : "#/components/schemas/twitterThreadResponse",
"FORUMS" : "#/components/schemas/fourmsThreadResponse"
}
},
"oneOf" : [ {
"$ref" : "#/components/schemas/emailThreadResponseJson"
}, {
"$ref" : "#/components/schemas/faceBookThreadResponse"
}, {
"$ref" : "#/components/schemas/twitterThreadResponse"
}, {
"$ref" : "#/components/schemas/fourmsThreadResponse"
} ]
}
}
}
}
},
"security" : [ {
"iam-oauth2-schema" : [ "Desk.tickets.UPDATE" ]
} ],
"x-audience" : [ "external-public" ]
}
},
"/api/v1/tickets/{ticketId}/draftReply" : {
"post" : {
"tags" : [ "Thread" ],
"summary" : "Draft Email Reply",
"description" : "This API drafts an email reply. The from address in the email must be a from address configured in your help desk portal.",
"operationId" : "draftsReply",
"parameters" : [ {
"$ref" : "#/components/parameters/ticketId"
}, {
"$ref" : "./Common.json#/components/parameters/orgId"
}, {
"$ref" : "#/components/parameters/parentConversationId"
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"discriminator" : {
"propertyName" : "channel",
"mapping" : {
"EMAIL" : "#/components/schemas/emailThreadSendReply",
"FACEBOOK" : "#/components/schemas/facebookSendReply",
"FORUMS" : "#/components/schemas/forumSendReply"
}
},
"oneOf" : [ {
"$ref" : "#/components/schemas/emailThreadSendReply"
}, {
"$ref" : "#/components/schemas/facebookSendReply"
}, {
"$ref" : "#/components/schemas/forumSendReply"
} ]
}
}
}
},
"responses" : {
"422" : {
"$ref" : "./Common.json#/components/responses/invalidDataErrorResponse"
},
"200" : {
"description" : "draftsReply Response definition",
"content" : {
"application/json" : {
"schema" : {
"discriminator" : {
"propertyName" : "channel",
"mapping" : {
"EMAIL" : "#/components/schemas/emailThreadResponseJson",
"FACEBOOK" : "#/components/schemas/faceBookThreadResponse",
"FORUMS" : "#/components/schemas/fourmsThreadResponse"
}
},
"oneOf" : [ {
"$ref" : "#/components/schemas/emailThreadResponseJson"
}, {
"$ref" : "#/components/schemas/faceBookThreadResponse"
}, {
"$ref" : "#/components/schemas/fourmsThreadResponse"
} ]
}
}
}
}
},
"security" : [ {
"iam-oauth2-schema" : [ "Desk.tickets.UPDATE" ]
} ],
"x-audience" : [ "external-public" ]
}
},
"/api/v1/tickets/{ticketId}/threads" : {
"get" : {
"tags" : [ "Thread" ],
"summary" : "List all threads ",
"description" : "This API lists all threads in your helpdesk.",
"operationId" : "getThreads",
"parameters" : [ {
"name" : "limit",
"in" : "query",
"description" : "Number of threads to fetch",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : [ "string", "null", "integer" ],
"format" : "int32",
"description" : "Number of threads to fetch",
"pattern" : "([0-9]+)"
}
}, {
"name" : "from",
"in" : "query",
"description" : "Index number, starting from which the threads must be fetched",
"required" : false,
"style" : "form",
"explode" : true,
"schema" : {
"type" : [ "string", "null", "integer" ],
"format" : "int32",
"description" : "Index number, starting from which the threads must be fetched",
"pattern" : "([0-9]+)"
}
}, {
"name" : "sortBy",
"in" : "query",
"description" : "Key that sorts the threads by sendDateTime.
If the value of sortBy key is: