Updated on 2025-08-13 GMT+08:00

Creating an FAQ

Function

This API is used to enter questions, similar questions, and answers to create a single FAQ.

URI

POST /v1/{project_id}/applications/{application_id}/uni-search/faq

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Constraints:

N/A

Value range:

The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter.

Default value:

N/A

application_id

Yes

String

Definition:

Application ID. For details about how to obtain the application ID, see Obtaining an Application ID.

Constraints:

Character string

Value range:

The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter.

Default value:

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition:

Token used for API authentication. For details about how to obtain the token, see Obtaining an IAM User Token.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

question

Yes

String

Definition:

Question.

Constraints:

N/A

Value range:

A maximum of 1,000 characters are allowed.

Default value:

N/A

answer

Yes

String

Definition:

Answer.

Constraints:

N/A

Value range:

The value cannot exceed 10,000 characters.

Default value:

N/A

repo_id

Yes

String

Definition:

Knowledge base ID.

Constraints:

N/A

Value range:

The value can contain a maximum of 64 characters.

Default value:

N/A

question1

No

String

Definition:

Similar questions.

Constraints:

N/A

Value range:

A maximum of 1,000 characters are allowed.

Default value:

N/A

question2

No

String

Definition:

Similar questions.

Constraints:

N/A

Value range:

A maximum of 1,000 characters are allowed.

Default value:

N/A

question3

No

String

Definition:

Similar questions.

Constraints:

N/A

Value range:

A maximum of 1,000 characters are allowed.

Default value:

N/A

question4

No

String

Definition:

Similar questions.

Constraints:

N/A

Value range:

A maximum of 1,000 characters are allowed.

Default value:

N/A

category

No

String

Definition:

Directory, which is a single value and corresponds to a leaf node in the directory tree.

Constraints:

N/A

Value range:

A maximum of 255 characters are allowed. Only non-control characters, non-private characters, and non-proxy characters are allowed.

Default value:

N/A

tags

No

String

Definition:

Tag list. Separate multiple tags by commas (,).

Constraints:

  1. A document can have more than one tag.

  2. It is recommended that the tag value be case insensitive.

  3. Do not use reserved characters (+ - = && || > <!). Otherwise, you will need to escape them in queries. ( ) { } [ ] ^ " ~ * ? : \ /

  4. The tag list must be replaced as a whole. Partial update is not supported.

Value range:

N/A

Default value:

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

faq_id

String

Definition:

ID of the created FAQ.

Value range:

N/A

Example Requests

Create an FAQ instance.

/v1/b25446daeb1a41a7953c5deba2b2677a/applications/fb9731ab-7085-474f-b6c7-64473586f0f3/uni-search/faq

{
  "question" : "Test question",
  "question1" : "",
  "question2" : "",
  "question3" : "",
  "question4" : "",
  "answer" : "Test answer",
  "repo_id" : "0c3fae2d-428e-454c-ad80-2e5c5fa7b33a"
}

Example Responses

Status code: 200

Succeeded.

{
  "faq_id" : "64b4a1bc-3e60-43dd-981c-d24828ddc8ac"
}

Status Codes

Status Code

Description

200

Succeeded.

Error Codes

See Error Codes.