post https://api.imiconnect.io/api/v1/apps/$(appid)/threads
The in-app API is used to create a thread when a user wants to send MO. Gateway will return threadId as response.
Request
The create thread request is specified as follows:
Request Headers
The following table describes the request headers:
| Request Header | Description |
|---|---|
| secretKey | Secret key generated in backend application. |
| content-type | Application/JSON |
Request Body
The following table describes the request parameters:
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| appid | String | Yes | Specifies the application ID. |
Request Example
{
"externalid": "anything text or number",
"type": "Conversation/Announcement",
"title": "Sample title",
"category": "Samplecategory",
"extras": {
"Custom_Param1": "value1",
"Custom_Param2": "value1",
"Custom_Param3": "value1",
"Custom_Param4": "value1",
"Custom_Param10": ["value1","value2"]
}
}
Request Body
The following table describes the elements in the request URL:
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| externalid | String | No | Specifies the external ID |
| type | String | Yes | Specifies the type of thread. Conversation/Announcement |
| title | String | No | Specifies the thread title. |
| category | String | No | Specifies the thread category |
| extras | Numeric | No | Specifies custom parameters |
Response Example
{
"code": "0",
"description": "success",
"thread": {
"id": "UUID",
"created_on": "2017-05-03T13:14:37.985Z"
}
}