REST APIPrompt
Create prompts
Bulk-create prompts for a brand. Each prompt is grouped under the named topic, or an auto-managed topic for the given location if no topic name is provided. Returns a report detailing created prompts, skipped duplicates, and row-level errors.
Authorization
BearerAuth AuthorizationBearer <token>
API token authentication. Use format: Bearer ot_your-token-here
In: header
Path Parameters
brand*string
Unique identifier for the brand
Format
uuidRequest 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/brands/550e8400-e29b-41d4-a716-446655440000/prompts" \ -H "Content-Type: application/json" \ -d '{ "prompts": [ { "query": "What is the best CRM for small businesses?", "location": "us" } ] }'{
"data": {
"summary": {
"total": 0,
"created": 0,
"skipped": 0,
"errors": 0
},
"errors": [
{
"index": 0,
"prompt": "What is the best CRM for small businesses?",
"reason": "Country code 'xx' is not a valid ISO 3166-1 alpha-2 code"
}
],
"skipped": [
{
"index": 0,
"prompt": "What is the best CRM for small businesses?"
}
]
}
}{
"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"
}
}