REST APITopic
Bulk import prompts
Bulk-import prompts from parsed CSV rows. Rows missing a topic are grouped via automatic topic discovery. Returns a report detailing created topics, skipped duplicates, and row-level errors.
Deprecated: Returns a 410 Gone error once Topics are disabled for your account due to deprecation — if so, use POST /api/v1/brands/{brand}/prompts instead.
Authorization
BearerAuth AuthorizationBearer <token>
API token authentication. Use format: Bearer ot_your-token-here
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://app.useomnia.com/api/v1/topics/import" \ -H "Content-Type: application/json" \ -d '{ "brandId": "550e8400-e29b-41d4-a716-446655440000", "rows": [ { "prompt": "What is the best project management software?", "country": "us" } ] }'{
"data": {
"summary": {
"totalRows": 0,
"created": 0,
"skipped": 0,
"errors": 0,
"monitoringActivated": 0,
"monitoringDeactivated": 0
},
"topics": [
{
"name": "Project Management",
"country": "us",
"isNew": true,
"promptsCreated": 0,
"promptsSkipped": 0,
"tags": [
"product",
"high-priority"
]
}
],
"errors": [
{
"row": 0,
"prompt": "What is the best project management software?",
"reason": "Country code 'xx' is not a valid ISO 3166-1 alpha-2 code"
}
],
"skipped": [
{
"row": 0,
"prompt": "What is the best project management software?",
"existingTopicName": "Project Management"
}
]
}
}{
"error": {
"code": 1002,
"description": "Invalid input parameters"
}
}{
"error": {
"code": 1004,
"description": "Invalid or expired API token"
}
}{
"error": {
"code": 1006,
"description": "Item not found"
}
}{
"error": {
"code": 1001,
"description": "Internal error"
}
}