Skip to main content
This guide walks through submitting your first analysis, polling it to completion, and reading the result. We’ll start with mock fixtures (free, instant) and end with real audio.

What you need

  • A sandbox API key (pk_sandbox_…)
  • An HTTP client (curl, Postman, or your language’s HTTP library)

Step 1 — Mock fixture (free, ~1 second)

Submit a deterministic test analysis. No real audio required.
curl -X POST https://parlay-api-dev-o7nogixtqq-uc.a.run.app/v1/analyses \
  -H "Authorization: Bearer pk_sandbox_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "org_id": "demo-acme",
    "rep_id": "alex-smith",
    "recording_url": "mock://perfect-pitch"
  }'
You get back a 202 with the queued job:
{
  "id": "f2782fc7-5355-48bf-a314-d6bf90bc4907",
  "status": "queued",
  "created_at": "2026-04-24T18:10:36.284444+00:00"
}
Org and rep are created automatically if they don’t exist yet. You don’t need to call POST /v1/orgs first for analyses to work.

Step 2 — Poll until complete

curl https://parlay-api-dev-o7nogixtqq-uc.a.run.app/v1/analyses/<id> \
  -H "Authorization: Bearer pk_sandbox_YOUR_KEY"
status will progress: queuedprocessingcompleted. Mock fixtures usually complete in under a second. When status === "completed", the response includes the full analysis:
{
  "id": "f2782fc7-...",
  "status": "completed",
  "duration_seconds": 312,
  "transcript": { /* full Deepgram-style transcript */ },
  "analysis": {
    "scores": {
      "clarity": 94,
      "influence": 95,
      "objection": 92,
      "discovery": 95,
      "delivery": 96,
      "close": 93
    },
    "feedback": {
      "clarity": { "positive": "...", "negative": "..." },
      "influence": { "positive": "...", "negative": "..." }
      // ...
    },
    "kpis": {
      "words_per_minute": 142,
      "filler_word_count": 3,
      "questions_asked": 11
    },
    "double_down": "...",
    "summary": "...",
    "action_plan": {
      "double_down_implementation": "...",
      "general_communication_improvement": "...",
      "quoted_principle": "..."
    }
  }
}

Step 3 — Real audio

Replace the mock URL with a publicly reachable HTTPS URL to an audio file:
{
  "org_id": "demo-acme",
  "rep_id": "alex-smith",
  "recording_url": "https://my-cdn.com/calls/2026-04-24-acme.mp3",
  "options": {
    "environment": "video_conference",
    "sales_motion": "outbound_ae",
    "recording_type": "discovery_call"
  }
}
Requirements for the URL:
  • HTTPS (no plain HTTP)
  • No additional auth headers required (pre-signed S3 / GCS URLs are perfect)
  • Codec: MP3, WAV, M4A, or FLAC
  • Length: 10 seconds to 60 minutes
Latency: typically 30–90 seconds end-to-end for a 5-minute call.

Step 4 — Stop polling, use webhooks

Polling works for prototyping but isn’t sustainable for production. Register a webhook once and Parlay will notify you when each analysis completes:
curl -X POST https://parlay-api-dev-o7nogixtqq-uc.a.run.app/v1/webhooks \
  -H "Authorization: Bearer pk_sandbox_YOUR_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.com/parlay-webhook",
    "enabled_events": ["analysis.completed", "analysis.failed"]
  }'
The response includes a signing_secret (shown once — store it). Verify every webhook with HMAC-SHA256. See the webhooks guide.

Common pitfalls

Parlay fetches the file from the URL you provide. If the URL requires auth (Authorization header, custom token), it will fail. Use a pre-signed URL instead.
org_id + rep_id + recording_url does NOT deduplicate. Use Idempotency-Key with the same value on retries to avoid duplicates.
Likely the audio is corrupt or unreachable. Call GET /v1/analyses/:id and check the error field. The crash recovery scanner marks stuck jobs failed automatically after 10 min.
Parlay caps at 60 minutes. For longer calls, split before upload. There’s no built-in concatenation across analyses (yet).

What’s next

Rep intelligence

Persona, methodology, and synthesis at scale

Webhooks

Stop polling — get notified