# Reply user query results to tickets

This API is used to reply user query results to tickets that are in progress and not handed off to any human agent. Only custom apps are supported.

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/helpdesk/v1/tickets/:ticket_id/answer_user_query
HTTP Method | POST
Rate Limit | [Special Rate Limit](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
Supported app types | Custom App
Required scopes<br>**To use this API, you must have at least 1 of the listed scopes.** | Update resources details of Help Desk(helpdesk:all)

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `tenant_access_token`<br>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer t-7f1bcd13fc57d46bac21793a18e560"<br>[How to choose and get access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)
Content-Type | string | Yes | **Fixed value**: "application/json; charset=utf-8"

**Notice**：The "Help Desk token" parameter also needs to be added to the Help Desk request header:

Key: X-Lark-Helpdesk-Authorization

Value: base64(helpdesk_id:helpdesk_token), a base64-encrypted string that connects helpdesk_id and helpdesk_token with ':'.

[Learn more about how to obtain and use Help Desk token](https://open.feishu.cn/document/ukTMukTMukTM/ugDOyYjL4gjM24CO4IjN)

### Path parameters

Parameter | Type | Description
---|---|---
ticket_id | string | Ticket ID<br>**Example value**: "6945345902185807891"

### Request body

Parameter | Type | Required | Description
---|---|---|---
event_id | string | Yes | Event ID, which can be extracted from subscription events<br>**Example value**: "abcd"
faqs | user_query_faq_info\[\] | No | List of FAQs
id | string | No | FAQ ID<br>**Example value**: "12345"
score | number(float) | No | FAQ score<br>**Example value**: 0.9

### Request body example
```json
{
    "event_id": "abcd",
    "faqs": [
        {
            "id": "12345",
            "score": 0.9
        }
    ]
}
```

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-

### Response body example
```json
{
    "code": 0,
    "msg": "success",
    "data": {}
}
```

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
400 | 154000 | Bad request, please check your request body | Invalid request. Check the parameters.
403 | 154003 | Please check you have the correct access | Check if the correct permission scope is requested.
500 | 155000 | Internal error | Internal error, please contact us
404 | 154004 | Resource not found | Check the ID value.

