Skip to content

Rest API

Create or update a quality control question

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 id to create. The server generates the id and sets createdAt
  • Send id to update. Every other field is overwritten with what you send, so send the whole question
  • accountId and websiteId are taken from the request headers and ignored in the body
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.

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."
}

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.