Skip to main content

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_COMPLETED or SMART_EDIT_JOB_FAILED event 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.

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. Custom commandType requires customPrompt to be set. Commands FindRelevantQuote and AddMoreDetail require extendedTranscript to be set.

  • customPrompt string

    Custom prompt for the smart edit. Required when commandType is Custom.

  • ownerUserId string

    user identifier of the owner of the session. Required when extendedTranscript is set.

  • speakerNames object

    Dictionary of all participants and their first names. Needs to include mapping for the ownerUserId.

  • property name* string
  • speakerPronouns 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* string
  • extendedTranscript object

    Transcript of the recorded session. Value becomes available during session processing.

  • utterances object[]

    List of all utterances.

  • Array [
  • text string required

    Text of the utterance.

  • start integer required

    Relative start time in milliseconds of this utterance in the recording.

  • end integer required

    Relative end time in milliseconds of this utterance in the recording.

  • speaker string required

    Speaker of the utterance. Speakers are labeled with letters, starting with 'A'.

  • words object[] required

    List of words in the utterance.

  • Array [
  • text string required

    text of the single word

  • start integer required

    Relative start time [ms] of this word occurrence in the recording

  • end integer required

    Relative 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
Responses

Smart edit job was submitted successfully.


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.

Loading...