Create a topic
curl --request POST \
--url https://www.qwairy.co/api/v1/brands/{brandId}/keywords \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"text": "<string>"
}
'import requests
url = "https://www.qwairy.co/api/v1/brands/{brandId}/keywords"
payload = { "text": "<string>" }
headers = {
"Authorization": "<authorization>",
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
'Idempotency-Key': '<idempotency-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({text: '<string>'})
};
fetch('https://www.qwairy.co/api/v1/brands/{brandId}/keywords', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Topics
Create a topic
Create a topic label to organize prompts in a workspace. The API path keeps the name keywords; assign the topic to prompts with a prompt update.
POST
https://www.qwairy.co
/
api
/
v1
/
brands
/
{brandId}
/
keywords
Create a topic
curl --request POST \
--url https://www.qwairy.co/api/v1/brands/{brandId}/keywords \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"text": "<string>"
}
'import requests
url = "https://www.qwairy.co/api/v1/brands/{brandId}/keywords"
payload = { "text": "<string>" }
headers = {
"Authorization": "<authorization>",
"Idempotency-Key": "<idempotency-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
'Idempotency-Key': '<idempotency-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({text: '<string>'})
};
fetch('https://www.qwairy.co/api/v1/brands/{brandId}/keywords', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Creates a topic label. The API path keeps the name
keywords; the resource
is a topic. Use Update a prompt to assign it.
Requires an active Business, Agency Business or Enterprise plan. Use an API token with write access enabled. See Writing data for
idempotency, conditional requests and error handling.
Response
Returns201 with Location, ETag and a topic containing
id, text, version, createdAt and updatedAt.
Synthetic request and response
curl -X POST "https://www.qwairy.co/api/v1/brands/$BRAND_ID/keywords" \
-H "Authorization: Bearer $QWAIRY_API_TOKEN" \
-H "Idempotency-Key: topic-pricing-001" \
-H "Content-Type: application/json" \
-d '{"text":"Pricing"}'
{
"topic":{
"id":"11111111-0000-4000-8000-000000000000",
"text":"Pricing",
"version":0,
"createdAt":"2026-09-01T09:00:00.000Z",
"updatedAt":"2026-09-01T09:00:00.000Z"
}
}
Related operations
- Get a topic, update it or delete it.
- List topics with
view=configurationto include labels without answers and their current versions. - Create a tag for reusable secondary labels.
Errors
Invalid text returns400 INVALID_REQUEST; an inaccessible workspace returns
404 RESOURCE_NOT_FOUND; a duplicate label returns 409 CONFLICT.
See Error codes for authentication, plan, idempotency
and server errors. On 429, honor Retry-After; writes can return
503 SERVICE_UNAVAILABLE if the write limiter is unavailable.
