Skip to main content
This guide shows how to create an Interaction with the Corti API. See detailed spec here.
1

Authentication

See details here
2

Calling the Endpoint to Create an Interaction

Endpoint:
POST https://api.{environment}.corti.app/v2/interactions/
Headers:
  • Authorization: Bearer <access_token>
  • Tenant-Name: <tenant-name>
  • Content-Type: application/json
Request Example:
JavaScript
{
"assignedUserId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"encounter": {
    "identifier": "<string>",
    "status": "planned",
    "type": "first_consultation",
    "period": {
    "startedAt": "2023-11-07T05:31:56Z",
    "endedAt": "2023-11-07T05:31:56Z"
    },
    "title": "<string>"
},
"patient": {
    "identifier": "<string>",
    "name": "<string>",
    "gender": "male",
    "birthDate": "2023-11-07T05:31:56Z",
    "pronouns": "<string>"
}
}
3

Server Response

Following successful request, the server will respond with the following information:
  • interactionId: a unique session identifier for audio, transcripts, facts, documents
  • websocketUrl: a unique URL to stream audio/ data for the interaction
Store these values for subsequent requests.
4

Next Steps

  1. Save the interactionId for future API calls associated with the interaction (uploading audio, retrieving transcripts, generating documents).
  2. Use the websocketUrl (appending &token=Bearer <access_token>) to open the real-time audio or data stream for that interaction.
  3. Proceed with your workflow (e.g., upload recording, stream audio, generate transcript/document).