URL: https://api.stringeex.com/v1/ticket
HTTP method: POST
Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see StringeeX API REST Authentication
POST data (body):
{
"create_reason":0,
"subject":"Tieu de ticket",
"assignee":"ACKZYGJQ6Y",
"assigneeGroup": "GRW9E5OS",
"status":3,
"contact":"CTA83A3GLY",
"type":2,
"priority":2,
"fieldvalues":[
{
"field_value":"Halo",
"field_key":"type-text"
},
...
]
}
| Field | Type | Required | Description |
|---|---|---|---|
| create_reason | Number | Yes | Reason create ticket, 0 = new ticket. Default: 0 |
| subject | Text | Yes | Subject of ticket |
| assignee | Text | No | Account ID of StringeeX, URI: /admin/agent |
| assigneeGroup | Text | Yes | Group ID of StringeeX, URI: /admin/pcc/group |
| status | Number | Yes | 0: New, 1: Processing, 2:Pending, 3:Solved |
| contact | Text | Yes | Contact ID ticket |
| type | Number | Yes | 1: Question; 2: Random |
| priority | Number | Yes | 1: Low; 2: Normal; 3: High; 4: Urgent |
| fieldvalues | Array | No | List field values of ticket with every item is an object has property field_value and field_key |
| fieldvalues['field_key'] | Text | No | The key of custom field |
| fieldvalues['field_value'] | Text | No | The value of custom field |
Response:
{
"r": "response_code",
"msg": "response_message"
}
| Field | Type | Required | Description |
|---|---|---|---|
| r | Number | Yes | r = 0 is success, other value is not success |
| msg | Text | Yes | The message of the response |
Sample request:
{
"create_reason":0,
"subject":"Tieu de ticket",
"assignee":"ACKZYGJQ6Y",
"status":3,
"contact":"CTA83A3GLY",
"type":2,
"priority":2,
"fieldvalues":[
{
"field_value":"Halo",
"field_key":"type-text"
},
{
"field_value":"This allowed multi line",
"field_key":"type-textarea"
},
{
"field_value":[
"CMOHS9O8ZTL",
"CMOUNDREVDQ"
],
"field_key":"type-multi-select"
},
{
"field_value":[
"CMOYPKFIVBF",
"CMODP6SU36X"
],
"field_key":"type-cascader"
},
{
"field_value":"true",
"field_key":"type-checkbox"
},
{
"field_value":0.02,
"field_key":"type-decimal"
},
{
"field_value":1,
"field_key":"type-integer"
},
{
"field_value":"CMOJ8PK2C5G",
"field_key":"type-dropdown"
}
]
}
Sample response:
{
"r": 0,
"msg": "Success",
"res_fieldvalues": [
{
"field_key": "type-text",
"field_value": "Halo",
"res": {
"r": 6,
"msg": "Fieldvalue existed"
}
},
{
"field_key": "type-textarea",
"field_value": "This allowed multi line",
"res": {
"r": 3,
"msg": "Field not found: "
}
},
{
"field_key": "type-multi-select",
"field_value": [
"CMOHS9O8ZTL",
"CMOUNDREVDQ"
],
"res": {
"r": 6,
"msg": "Fieldvalue existed"
}
},
{
"field_key": "type-cascader",
"field_value": [
"CMOYPKFIVBF",
"CMODP6SU36X"
],
"res": {
"r": 6,
"msg": "Fieldvalue existed"
}
},
{
"field_key": "type-checkbox",
"field_value": "true/false",
"res": {
"r": 6,
"msg": "Fieldvalue existed"
}
},
{
"field_key": "type-decimal",
"field_value": 0.02,
"res": {
"r": 6,
"msg": "Fieldvalue existed"
}
},
{
"field_key": "type-integer",
"field_value": 1,
"res": {
"r": 6,
"msg": "Fieldvalue existed"
}
},
{
"field_key": "type-dropdown",
"field_value": "CMOJ8PK2C5G",
"res": {
"r": 6,
"msg": "Fieldvalue existed"
}
}
],
}
URL: https://api.stringeex.com/v1/ticket/tk_867kelft2kwxwiaa
HTTP method: PUT
Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see StringeeX API REST Authentication
PUT data (body):
{
"subject": "Tieu de ticket222",
"assignee": "huy",
"status": 3,
"contact": "ac_yr8fq5vtpbdzqn5p",
"type": 2,
"priority": 2,
"ccs": ["ac_blxmbplvkxarvqjp"]
}
| Field | Type | Required | Description |
|---|---|---|---|
| subject | Text | No | Subject of ticket |
| assignee | Text | No | Account ID of StringeeX, URI: /admin/agent |
| assigneeGroup | Text | No | Group ID of StringeeX, URI: /admin/pcc/group |
| status | Number | No | 0: New, 1: Processing, 2:Pending, 3:Solved |
| contact | Text | No | Contact ID ticket |
| type | Number | No | 1: Question; 2: Random |
| priority | Number | No | 1: Low; 2: Normal; 3: High; 4: Urgent |
| ccs | Array | No | List agents StringeeX |
Response:
{
"r": "response_code",
"msg": "response_message"
}
| Field | Type | Required | Description |
|---|---|---|---|
| r | Number | Yes | r = 0 is success, other value is not success |
| msg | Text | Yes | The message of the response |
Sample response:
{
"r": 0,
"msg": "Success"
}
URL: https://api.stringeex.com/v1/ticket/ticket_1
HTTP method: DELETE
Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see StringeeX API REST Authentication
Response:
{
"r": 0,
"msg": "Success"
}
HTTP method: GET
Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see StringeeX API REST Authentication
GET params:
| Field | Type | Required | Description |
|---|---|---|---|
| limit | Number | No | Default: 15 |
| page | Number | No | Default: 1 |
| sort_by | Text | No | Field to sort 'created' | 'updated' | 'priority'. Default: created |
| sort_order | Text | No | Field to sort 'desc' | 'asc'. Default: desc |
| assignee | Text | No | Account ID of StringeeX |
| status | Number | No | 0: New, 1: Processing, 2:Pending, 3:Solved |
| contact | Text | No | Contact ID of ticket |
| company | Text | No | Company ID of ticket |
| type | Number | No | 1: Question; 2: Random |
| priority | Number | No | 1: Low; 2: Normal; 3: High; 4: Urgent |
| serial | Number | No | Serial is a unique number of ticket, used to get a ticket detail |
| id | Text | No | Ticket ID is uniqe represent a ticket, used to get a ticket detail |
Sample request:
GET /v1/ticket?page=1&limit=20 HTTP/1.1
Host: https://api.stringeex.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json
Response:
{
"r": "response_code",
"msg": "response_message"
}
| Field | Type | Required | Description |
|---|---|---|---|
| r | Number | Yes | r = 0 is success, other value is not success |
| msg | Text | Yes | The message of the response |
| data | Array | No | The data of the response |
Sample response:
{
"r": 0,
"data": {
"rows": [
{
...
},
{
...
}
],
"totalPages": 1,
"totalCount": 2
}
}
URL: https://api.stringeex.com/v1/ticket
HTTP method: GET
Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see StringeeX API REST Authentication
| GET params: | Field | Type | Required | Description |
|---|---|---|---|---|
| serial | Number | No | Serial is a unique number of ticket, used to get a ticket detail | |
| id | Text | No | Ticket ID is uniqe represent a ticket, used to get a ticket detail |
Sample request:
GET /v1/ticket?id=TK123456 HTTP/1.1
Host: https://api.stringeex.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json
Response:
{
"r": "response_code",
"msg": "response_message"
}
| Field | Type | Required | Description |
|---|---|---|---|
| r | Number | Yes | r = 0 is success, other value is not success |
| msg | Text | Yes | The message of the response |
| data | Array | No | The data of the response |
Sample response:
{
"r": 0,
"data": {
"rows": [
{
"creator": "AC5QK9CR7C",
"create_reason": 0,
"ticket_role": 0,
"object_type": "ticket",
"subject": "ticket test trigger",
"created": 1620792526,
"type": 2,
"priority": 4,
"serial": 12461,
"assigneeGroup": "GRTYPY8K",
"contact": "CTNA7IHH72",
"id": "TK9KCWEYG8",
"assignee": "AC5QK9CR7C",
"portal": "PT8LB2FD3Q",
"last_modified": 1620792526,
"status": 0,
"contact_type": 1,
"ticket_contact_name": "Contact btncall_036666",
"custom_field_a": [
"1"
],
"graph": {
"assignee": {
"id": "AC5QK9CR7C",
"name": "Nguyễn Duyên Thái"
},
"contact": {
"id": "CTNA7IHH72",
"name": "Contact btncall_036666",
"avatar": ""
}
},
"assignee_name": "Nguyễn Duyên Thái",
"contact_name": "Contact btncall_036666",
"company_name": "",
"assignee_group_name": "giang",
"creator_name": "Nguyễn Duyên Thái",
"viet_nam": "",
"this-is-custom-field-text": "",
"loai-san-pham": "",
"chu-bat-buoc": "",
"a": "1",
"abc": "",
"test_short_text": "",
"toi-thieu-6-so": "",
"loai-tu-van-nghiep-vu": "",
"dfff": "",
"10": "",
"tuychon": "",
"ngay-thang": "",
"hahaa": "",
"ccs": [],
"company": null,
"call_id": null,
"updated": 0,
"in_call": 0
}
],
"totalPages": 1,
"totalCount": 1
}
}
Ticket detail fields:
| Field | Type | Required | Description |
|---|---|---|---|
| create_reason | Number | Yes | Channel/reason the ticket was created. See Create reason values below |
| ticket_role | Number | Yes | Role of the ticket in a merge/link relationship. 0: Free (standalone); 1: Tracker; 2: Linked; 3: Parent; 4: Child |
| type | Number | Yes | 1: Question; 2: Random |
| status | Number | Yes | 0: New; 1: Processing; 2: Pending; 3: Solved |
Create reason values:
| create_reason | Description |
|---|---|
| 0 | Created manually (new ticket) |
| 1 | Outbound call |
| 2 | Inbound call |
| 3 | Outbound email |
| 4 | Inbound email |
| 5 | Live chat |
| 6 | Voicemail |
| 8 | Missed call |
| 9 | Facebook (post/comment) |
| 10 | Facebook Messenger chat |
| 12 | Zalo chat |
| 13 | Internal email |
| 14 | Gmail |
| 15 | Callback |
| 16 | Inbound SMS |
| 17 | Outbound SMS |
Returns the change log of a ticket: which agent changed which field, from which value to which value, and when. The log is written automatically by the system every time a ticket is created or updated (through the web app or through the ticket APIs), so there is no public API to create a history record.
URL: https://api.stringeex.com/v1/tickethistory?serial=65318
HTTP method: GET
Content-Type: application/json
Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see StringeeX API REST Authentication
Permission: the account must have the common_ticket_view permission.
Query parameters:
| Field | Type | Required | Description |
|---|---|---|---|
| serial | Number | Yes | Serial of the ticket (the ticket number shown in the web app, e.g. 65318). A ticket ID (e.g. TK5EIVA5JI) is also accepted: the system resolves it to the matching serial |
The API returns the 30 most recent records of the ticket, sorted by action_time descending. Pagination is not supported.
Response:
{
"r": 0,
"message": "Get ticket history ok",
"data": [
{
"id": 2199334,
"ticket_id": "TK5EIVA5JI",
"ticket_serial": 604054,
"value_before": "{\"subject\":\"Outbound call: +84979322392\",\"status\":0,\"type\":2,\"priority\":2,\"assigneeArr\":[\"GR8OY0M1\"],\"ccs\":[]}",
"value_after": "{\"Call Remark\":{\"key\":\"call-remark\",\"value\":\"CMOV6ND3OED\"},\"subject\":\"Outbound call: +84979322392\",\"status\":3,\"type\":2,\"priority\":2,\"assigneeArr\":[\"GR8OY0M1\",\"ACL6E70XFU\"],\"ccs\":[]}",
"value_changed": "{\"0\":{\"key\":\"call-remark\",\"value\":\"CMOV6ND3OED\"},\"status\":{\"before\":0,\"after\":3},\"assigneeArr\":{\"before\":[\"GR8OY0M1\"],\"after\":[\"GR8OY0M1\",\"ACL6E70XFU\"]}}",
"account_id": "ACL6E70XFU",
"account_name": "Nikitha",
"portal_id": "PT1EOBW8JG",
"action_time": 1787222951336
}
]
}
| Field | Type | Description |
|---|---|---|
| r | Number | r = 0 is success, other value is not success |
| message | Text | The message of the response |
| data | Array | List of history records, newest first. Empty array when the ticket has no history yet |
| data['id'] | Number | ID of the history record |
| data['ticket_id'] | Text | ID of the ticket |
| data['ticket_serial'] | Number | Serial of the ticket |
| data['value_before'] | Text | JSON string: snapshot of the ticket fields before the change. "null" or [] when the record is the creation of the ticket |
| data['value_after'] | Text | JSON string: snapshot of the ticket fields after the change |
| data['value_changed'] | Text | JSON string: only the fields that actually changed in this record. See the section below |
| data['account_id'] | Text | ID of the account that made the change |
| data['account_name'] | Text | Display name of the account that made the change at the moment of the change |
| data['portal_id'] | Text | ID of the portal the ticket belongs to |
| data['action_time'] | Number | Time of the change, Unix timestamp in milliseconds |
value_before, value_after and value_changed are JSON strings, so the client has to parse them one more time.
A snapshot contains the system fields of the ticket plus every custom field that has a value:
{
"subject": "Outbound call: +84979322392",
"status": 3,
"type": 2,
"priority": 2,
"assigneeArr": ["GR8OY0M1", "ACL6E70XFU"],
"ccs": [],
"Call Remark": { "key": "call-remark", "value": "CMOV6ND3OED" }
}
| Field | Type | Description |
|---|---|---|
| subject | Text | Subject of the ticket |
| status | Number | 0: New, 1: Processing, 2: Pending, 3: Solved |
| type | Number | 1: Question; 2: Random |
| priority | Number | 1: Low; 2: Normal; 3: High; 4: Urgent |
| assigneeArr | Array | Assignee of the ticket: [group ID, account ID]. May contain only the group ID when the ticket is assigned to a group |
| ccs | Array | List of account IDs in CC of the ticket |
| <field name> | Object | Custom field, keyed by the field name. key is the field key (see StringeeX Field), value is the field value. For dropdown / multi-select / cascader fields the value is the field-value ID, see StringeeX Field value |
value_changed holds only what changed in that record. It mixes two shapes:
"status": { "before": 0, "after": 3 }
"0": { "key": "call-remark", "value": "CMOV6ND3OED" }
An empty string in before means the field had no value before the change.
If the portal enables encryption for some ticket fields, values of those fields are masked in value_before, value_after and value_changed exactly the same way they are masked in the ticket detail API, according to the encryption configuration of the service the ticket belongs to. Date fields are returned as dd/mm/yyyy text instead of a timestamp.
Sample request:
curl -X GET 'https://api.stringeex.com/v1/tickethistory?serial=65318' \
-H 'X-STRINGEE-AUTH: <JWT>'
Error responses:
{
"r": -2,
"message": "Ticket Id is missing"
}
| r | message | Description |
|---|---|---|
| -1 | Failed to get details of ticket <serial> | Could not read the history of the ticket |
| -1 | Not supported request method | The HTTP method is not supported |
| -2 | Ticket Id is missing | The serial parameter is missing |