Dasha Quick Start GuidePlatform REST API

Job analysis API

Job analysis API

Use the job analysis API to analyze a job's recording and transcript. The endpoint supports the built-in quality analysis and custom analysis with a prompt and JSON Schema.

The API stores each analysis request and its result. By default, repeated requests reuse an existing queued, processing, or completed analysis for the same job, prompt, and schema. Use force=true to create a new analysis.

Authentication

Use regular Dasha customer authentication:

Authorization: Bearer <DASHA_API_KEY>

The token's customer must own the job. The account must also have job analysis enabled.

Start analysis

POST /api/v1/jobs/{jobId}/analyze

Query parameters:

ParameterTypeDefaultDescription
forcebooleanfalseCreate a new analysis instead of reusing an existing queued, processing, or completed analysis for the same inputs.
syncbooleanfalseKeep the HTTP request open while the service polls for a terminal result.
syncTimeoutSecondsinteger60Maximum wait time when sync=true. Accepted range: 1 to 120.

The request body is optional. Omit it, or send {}, to run the built-in quality analysis:

curl -X POST "$DASHA_API_BASE_URL/api/v1/jobs/$JOB_ID/analyze" \ -H "Authorization: Bearer $DASHA_API_KEY" \ -H "Content-Type: application/json" \ -d '{}'

Send both prompt and schema to run a custom analysis:

curl -X POST "$DASHA_API_BASE_URL/api/v1/jobs/$JOB_ID/analyze?sync=true&syncTimeoutSeconds=90" \ -H "Authorization: Bearer $DASHA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Analyze the conversation. Return an NPS score from 0 to 10. Also report whether the agent greeted the customer and asked if it was a good time to talk.", "schema": { "type": "object", "properties": { "nps": { "type": "integer", "minimum": 0, "maximum": 10 }, "scorecard": { "type": "object", "properties": { "greetedCustomer": { "type": "boolean" }, "askedGoodTimeToTalk": { "type": "boolean" } }, "required": ["greetedCustomer", "askedGoodTimeToTalk"] } }, "required": ["nps", "scorecard"] } }'

Custom analysis requests must meet these rules:

  • Provide prompt and schema together.
  • Keep prompt at 8000 characters or fewer.
  • Keep serialized schema at 32000 characters or fewer.
  • Use object as the root schema type.
  • Use only these schema keywords: type, properties, required, items, enum, description, additionalProperties, minItems, maxItems, minLength, maxLength, minimum, and maximum.

Response

POST returns 202 Accepted while analysis is queued or processing. It returns 200 OK when it can return a terminal result, including a cached completed result or a sync request that finishes before the timeout.

{ "analysisId": "0b716598-3d3a-4fd9-8b8c-4a6b27710f3a", "jobId": "019df6cf-6526-7277-b742-cb19ba6fdfec", "analysisType": "custom", "status": "completed", "createdAt": "2026-05-25T08:10:11.123456+00:00", "updatedAt": "2026-05-25T08:10:35.123456+00:00", "result": { "nps": 7, "scorecard": { "greetedCustomer": true, "askedGoodTimeToTalk": false } }, "error": null }

Response fields:

FieldTypeDescription
analysisIdstringUnique analysis request ID.
jobIdstringJob ID from the URL.
analysisTypestringquality for built-in analysis or custom for prompt/schema analysis.
statusstringqueued, processing, completed, or failed.
createdAtstringAnalysis creation timestamp.
updatedAtstringLast analysis update timestamp.
resultobject or nullJSON result when status is completed; otherwise null.
errorobject or nullError details when status is failed; otherwise null.

Error response codes:

StatusMeaning
400 Bad RequestThe request body, schema, or sync timeout is invalid.
403 ForbiddenThe token is not authorized, or the account cannot use job analysis.
404 Not FoundThe job or analysis does not exist for the authenticated customer.

Retrieve analyses

List all stored analyses for a job:

curl "$DASHA_API_BASE_URL/api/v1/jobs/$JOB_ID/analyze" \ -H "Authorization: Bearer $DASHA_API_KEY"

Response:

{ "items": [ { "analysisId": "0b716598-3d3a-4fd9-8b8c-4a6b27710f3a", "jobId": "019df6cf-6526-7277-b742-cb19ba6fdfec", "analysisType": "custom", "status": "completed", "createdAt": "2026-05-25T08:10:11.123456+00:00", "updatedAt": "2026-05-25T08:10:35.123456+00:00", "result": { "nps": 7, "scorecard": { "greetedCustomer": true, "askedGoodTimeToTalk": false } }, "error": null } ] }

Get one analysis by ID:

curl "$DASHA_API_BASE_URL/api/v1/jobs/$JOB_ID/analyze/$ANALYSIS_ID" \ -H "Authorization: Bearer $DASHA_API_KEY"

Delete all stored analyses for a job:

curl -X DELETE "$DASHA_API_BASE_URL/api/v1/jobs/$JOB_ID/analyze" \ -H "Authorization: Bearer $DASHA_API_KEY"

DELETE returns 204 No Content.

Found a mistake? Let us know.

Enroll in beta

Request invite to our private Beta program for developers to join the waitlist. No spam, we promise.