Rest API
Create or update a quality control question
POST /api/v1/ai/quality/control
POST
/api/v1/ai/quality/control
Add a control question and the answer the AI is expected to give, or update an existing one by sending its id.
Notes
- Omit
idto create. The server generates theidand setscreatedAt - Send
idto update. Every other field is overwritten with what you send, so send the whole question accountIdandwebsiteIdare taken from the request headers and ignored in the body
Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ” x-api-key
required
string
Your API key from account settings.
x-user-email
required
string
The email address of your user.
x-account-id
required
string
The ID of your account. You can find this in the account settings.
x-website-id
required
string
The ID of the workspace you want to use.
Request Body required
Section titled “Request Body required ”object
id
Omit to create a new question, send it to update an existing one.
string
question
required
string
answer
required
The answer the AI is graded against.
string
segmentId
string
audienceId
string
Example
{ "question": "How long does delivery take?", "answer": "Standard delivery takes three to five working days."}Responses
Section titled “ Responses ”The question was created or updated.
object
message
string
Example
{ "message": "Quality control question upserted"}Bad request - missing request body or websiteId.
Unauthorized - invalid API key.