{"openapi":"3.1.0","info":{"title":"Scalign API","version":"v1"},"servers":[{"url":"https://api.scalign.ai"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"An API token from Settings → Connections → API: a workspace token for a system, a personal token to act as its member."}},"schemas":{"Recording":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":["string","null"]},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"classification":{"type":["string","null"],"description":"The kind of meeting, e.g. `discovery_call`. Null until analysed."},"source":{"type":["string","null"],"description":"Where the transcript came from."},"summary":{"type":["string","null"]},"status":{"type":"string","enum":["needs_finalizing","insufficient","not_analysed","ready"]},"voices_to_identify":{"type":"number","description":"Present while `status` is `needs_finalizing`."},"finalize_url":{"type":["string","null"],"description":"Where a member says who spoke; set while that is still open."},"run":{"type":["object","null"],"properties":{"kind":{"type":["string","null"],"enum":["analyse","transcribe","release",null]},"outcome":{"type":"string","enum":["pending","running","failed","no_change"]},"stage":{"type":"string","enum":["pending","queued","transcribing","analysing","identifying_speakers","extracting_insights"]},"error":{"type":["string","null"]}},"required":["kind","outcome","stage","error"],"description":"Processing in flight or just failed; null when there is none."},"participants":{"type":"array","items":{"type":"string"},"description":"Participant emails."},"external_domains":{"type":"array","items":{"type":"string"}}},"required":["id","title","start_time","end_time","classification","source","summary","status","finalize_url","run","participants","external_domains"]},"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}},"parameters":{}},"paths":{"/v1/recordings":{"get":{"summary":"List recordings","description":"Newest first. Page by passing the last item's `start_time` as `before`.","parameters":[{"schema":{"type":"string","format":"date-time","description":"Only recordings that started after this time."},"required":false,"description":"Only recordings that started after this time.","name":"after","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Only recordings that started before this time."},"required":false,"description":"Only recordings that started before this time.","name":"before","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"The recordings.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Recording"}}},"required":["data"]}}}},"400":{"description":"Invalid request; `error` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Import a transcript","description":"A transcript as speaker turns. A new recording starts processing: poll `GET /v1/recordings/{id}` and read `run`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300,"description":"Meeting title."},"started_at":{"type":"string","format":"date-time","description":"When the meeting started (ISO 8601 with offset). The end is the last turn's end, and must have passed."},"meeting_url":{"type":"string","format":"uri","description":"The meeting link (Google Meet, Teams, Zoom). Used to recognise the same meeting across sources."},"turns":{"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","description":"The speaker's email: what places the voice on a person. Find it whenever you can; without it the voice is unattributed and the recording waits in Finalize. Omit only for a speaker nobody can identify, never use someone else's address."},"text":{"type":"string","minLength":1,"maxLength":20000},"start":{"type":"number","minimum":0},"end":{"type":"number","minimum":0}},"required":["speaker","text","start","end"]},"minItems":1,"maxItems":5000,"description":"The transcript as speaker turns in time order (at most 5000; 60000 words in all; 100 distinct speakers, with or without emails). Start and end are seconds from the meeting start, at most 86400 (24 hours)."},"owner_email":{"type":"string","description":"Who the recording belongs to: a member of the workspace. Required with a workspace token, ignored with a personal one."}},"required":["title","started_at","turns"]}}}},"responses":{"200":{"description":"Already imported, or merged into an existing recording.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"outcome":{"type":"string","enum":["imported","already_imported","merged"]},"status":{"type":"string","description":"The outcome in a sentence."}},"required":["id","outcome","status"]}}}},"201":{"description":"Imported; processing has started.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"outcome":{"type":"string","enum":["imported","already_imported","merged"]},"status":{"type":"string","description":"The outcome in a sentence."}},"required":["id","outcome","status"]}}}},"400":{"description":"Invalid request; `error` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/recordings/{id}":{"get":{"summary":"Get a recording","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The recording.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recording"}}}},"401":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such recording for this token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/recordings/{id}/video":{"get":{"summary":"Get a recording's video link","description":"A link to the meeting's video (`ready`), or its audio for an audio-only capture (`audio`), valid for a few hours: fetch it per download, never store it. Any other `kind` says why there is none.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The link, or why there is none.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["none"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["processing"]},"audio_only":{"type":"boolean"}},"required":["kind","audio_only"]},{"type":"object","properties":{"kind":{"type":"string","enum":["failed"]},"audio_only":{"type":"boolean"}},"required":["kind","audio_only"]},{"type":"object","properties":{"kind":{"type":"string","enum":["expired"]},"audio_only":{"type":"boolean"}},"required":["kind","audio_only"]},{"type":"object","properties":{"kind":{"type":"string","enum":["ready"]},"url":{"type":"string","description":"Presigned and short-lived: fetch it per download."},"expires_at":{"type":["string","null"]}},"required":["kind","url","expires_at"]},{"type":"object","properties":{"kind":{"type":"string","enum":["audio"]},"url":{"type":"string","description":"Presigned and short-lived: fetch it per download."},"expires_at":{"type":["string","null"]}},"required":["kind","url","expires_at"]}]}}}},"401":{"description":"Missing or invalid token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such recording for this token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{}}