ApiAnalysis Templates
Create analysis template
Create a new analysis template for your organization
Create a new analysis template for your organization
Authorization
BearerAuth AuthorizationBearer <token>
API key authentication. Get your key from the dashboard.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/analysis-templates" \ -H "Content-Type: application/json" \ -d '{ "name": "Lead Qualification", "system_prompt": "You are a sales analyst. Extract lead qualification information from sales calls.", "user_prompt": "Analyze this sales call and extract: budget mentioned, timeline, decision maker involvement, and pain points.\\n\\nTranscript: {transcript}", "schema": { "type": "object", "properties": { "budget_mentioned": { "type": "boolean", "description": "Whether budget was discussed" }, "timeline": { "type": "string", "description": "Expected timeline for purchase" }, "decision_maker": { "type": "boolean", "description": "Whether speaking with decision maker" } } } }'{
"id": "550e8400-e29b-41d4-a716-446655440000",
"org_id": "7461b868-afc1-4fe2-871a-5e7c0f3d5772",
"name": "Customer Satisfaction Survey",
"description": "Extract customer satisfaction metrics and feedback from support calls",
"system_prompt": "You are analyzing a customer service call. Extract key satisfaction indicators and feedback.",
"user_prompt": "Analyze this call transcript and extract: customer satisfaction level, main issues discussed, and whether the issue was resolved.\n\nTranscript: {transcript}",
"schema": {
"type": "object",
"properties": {
"satisfaction_level": {
"type": "string",
"description": "Overall customer satisfaction",
"enum": [
"very_satisfied",
"satisfied",
"neutral",
"dissatisfied",
"very_dissatisfied"
]
},
"main_issues": {
"type": "array",
"description": "List of issues discussed during the call"
},
"issue_resolved": {
"type": "boolean",
"description": "Whether the customer's issue was resolved"
}
}
},
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}{
"error": "Invalid API key",
"message": "string"
}{
"error": "Invalid API key",
"message": "string"
}