Submit smart edit job
Submits a smart edit job for therapy notes and documents. The job can include text snippets to be processed by smart edit.
Once the job is submitted, you can consume the result in one of two ways:
- Polling: Call
GET /smart-edit/job/{jobId}to check the status and retrieve results when complete. - Webhook: Receive a
SMART_EDIT_JOB_COMPLETEDorSMART_EDIT_JOB_FAILEDevent to your registered webhook URL.
Note: The job will be automatically removed 5 minutes after it reaches a completed or failed state.
See Using webhooks for more details about webhook delivery, payload format, and security.
- application/json
Request Body required
- text string required
The text content to be processed.
- contextBefore string
Context before the text snippet, if any. This can help the AI understand the context better.
- contextAfter string
Context after the text snippet, if any. This can help the AI understand the context better.
- commandType string required
Possible values: [
Shorten,ConvertToBullets,ConvertToParagraph,ImproveWriting,Anonymize,Custom,FindRelevantQuote,AddMoreDetail]The type of smart edit to execute.
CustomcommandType requirescustomPromptto be set. CommandsFindRelevantQuoteandAddMoreDetailrequireextendedTranscriptto be set. - customPrompt string
Custom prompt for the smart edit. Required when
commandTypeisCustom. - ownerUserId string
user identifier of the owner of the session. Required when
extendedTranscriptis set. speakerNames object
Dictionary of all participants and their first names. Needs to include mapping for the ownerUserId.
property name*stringspeakerPronouns object
Dictionary of all participants and their pronouns. If participant pronoun is unknown, then it's omitted from the dictionary. Otherwise it can have value "MasculineHim" (standing for He/Him/His), "FeminineHer" (She/Her/Hers) and "NeutralThem" (They/Them/Theirs). Specifying participant's pronoun improves AI insights accuracy.
property name*stringextendedTranscript object
Transcript of the recorded session. Value becomes available during session processing.
utterances object[]
List of all utterances.
Array [text string requiredText of the utterance.
start integer requiredRelative start time in milliseconds of this utterance in the recording.
end integer requiredRelative end time in milliseconds of this utterance in the recording.
speaker string requiredSpeaker of the utterance. Speakers are labeled with letters, starting with 'A'.
words object[] required
List of words in the utterance.
Array [text string requiredtext of the single word
start integer requiredRelative start time [ms] of this word occurrence in the recording
end integer requiredRelative end time [ms] of this word occurrence in the recording
]]speakerMapping object
Mapping of speakers (present in utterances) to user identifiers. One user identifier can be assigned to multiple speakers.
property name*string
- 200
- 400
- 401
Smart edit job was submitted successfully.
- application/json
- Schema
- Example (from schema)
Schema
- jobId string required
The ID of the smart edit job.
- status string required
Possible values: [
processing,completed,failed]Status of the smart edit job. One of "processing", "completed", "failed".
- result string
This field contains the generated text output. The content grows progressively while the task is processing until it reaches completed/failed status. If the module failed, this field will contain a human-readable reason.
{
"jobId": "ec40b282-8cf3-4659-9976-50d411203c2f",
"status": "completed",
"result": "string"
}
Invalid input.
Authentication problem.