Twofold v2.7

Search pages, sections and endpoints.

    Open the console

    API reference

    Notes

    Reading a linked user's notes and transcripts.

    Environment

    List notes

    get/v2/users/{externalUserId}/notes

    Authenticate with a user access token — the externalUserId in the path must be the linked user the token belongs to.

    Path parameters

    externalUserIdstringrequired

    The partner's id for the linked user, bound at link time. Must match the user the access token belongs to.

    Query parameters

    limitinteger · default 25

    Page size, 1-100.

    cursorstring

    Opaque cursor from the previous page's nextCursor. Omit for the first page.

    patientExternalIdstring

    Only notes about this patient.

    noteExternalIdstring

    Only notes carrying this id — several notes can share one (repeat recordings).

    createdAfterstring

    Only notes created at or after this instant, ISO 8601 UTC.

    createdBeforestring

    Only notes created at or before this instant, ISO 8601 UTC.

    statusstring

    Only notes in this state.

    recordingprocessinggeneratedfailed

    Response200

    The linked user's notes, newest first. Covers their whole account — including notes recorded before the link was created, which the consent screen discloses. Deleted notes are excluded, as are notes generated with a legacy Twofold template that predates the current template system.

    dataarray of object

    One page of notes, newest first.

    noteIdstring

    Twofold's note id.

    noteExternalIdstring | null

    The partner's id for the session, passed on the /launch link; null when the note wasn't started from one. Several notes can share it (repeat recordings for one appointment).

    patientobject | null

    The patient this note is about; null when none was set.

    patientIdstring

    Twofold's stable id for the patient.

    patientExternalIdstring | null

    The partner's id for this patient; null for a patient the user created themselves in Twofold.

    statusenum

    recording: the session is still being recorded. processing: recording finished; transcription and generation are running. generated: the note is ready. failed: user should contact Twofold support.

    recordingprocessinggeneratedfailed

    createdAtstring

    When the session was created, ISO 8601 UTC.

    generatedAtstring | null

    When the note was first generated successfully; null until then.

    updatedAtstring

    When the note last changed, ISO 8601 UTC.

    recordingDurationSecondsinteger | null

    Length of the recorded session in seconds; null while recording or when unknown.

    titlestring | null

    The note's title; null until it is generated.

    templateobject | null

    The template the note was generated with; null when it can no longer be resolved.

    templateIdstring

    The template the note was generated with — a partner base template or a user's clone of one. Always a Twofold template id.

    namestring

    The template's name, as the user sees it in Twofold.

    nextCursorstring | null

    Opaque cursor for the next page; null when this is the last page. A page can hold fewer notes than the limit, or none, while more remain: keep paging until this is null.

    Example request

    bash
    curl https://partner-api.trytwofold.com/v2/users/provider-1042/notes \
      -H "Authorization: Bearer twofold_access_prod_…"
    bash
    curl https://partner-api.staging.trytwofold.com/v2/users/provider-1042/notes \
      -H "Authorization: Bearer twofold_access_staging_…"

    Example response

    json
    {
      "data": [
        {
          "noteId": "n_ab12Cd34Ef56",
          "noteExternalId": "appointment-9",
          "patient": {
            "patientId": "p_ab12Cd34Ef56",
            "patientExternalId": "client-2048"
          },
          "status": "generated",
          "createdAt": "2026-04-01T17:32:04.000Z",
          "generatedAt": "2026-04-14T09:18:22.517Z",
          "updatedAt": "2026-04-01T17:32:04.000Z",
          "recordingDurationSeconds": 1432,
          "title": "Follow-up consultation",
          "template": {
            "templateId": "ct_ab12Cd34Ef56",
            "name": "Consultation note"
          }
        }
      ],
      "nextCursor": null
    }
    json
    {
      "data": [
        {
          "noteId": "n_ab12Cd34Ef56",
          "noteExternalId": "appointment-9",
          "patient": {
            "patientId": "p_ab12Cd34Ef56",
            "patientExternalId": "client-2048"
          },
          "status": "generated",
          "createdAt": "2026-04-01T17:32:04.000Z",
          "generatedAt": "2026-04-14T09:18:22.517Z",
          "updatedAt": "2026-04-01T17:32:04.000Z",
          "recordingDurationSeconds": 1432,
          "title": "Follow-up consultation",
          "template": {
            "templateId": "ct_ab12Cd34Ef56",
            "name": "Consultation note"
          }
        }
      ],
      "nextCursor": null
    }

    Errors

    400

    The request is invalid. param names the offending parameter when there is one. Possible error.code values: invalid_parameters.

    401

    Authentication failed — the access token is missing, invalid or expired. Refresh and retry. Possible error.code values: missing_access_token, invalid_access_token, access_token_expired, wrong_environment_access_token, partner_key_on_user_endpoint.

    403

    The token is valid but may not access this resource. Possible error.code values: link_revoked, partner_not_activated, external_user_id_mismatch.

    429

    Rate limit exceeded: 100 requests/second (burst 200) per linked user. Wait Retry-After seconds and retry. Possible error.code values: rate_limit_exceeded.

    500

    Something failed on Twofold's side, or the partner API is temporarily paused (temporarily_unavailable). Safe to retry. Possible error.code values: internal_error, temporarily_unavailable.

    Get a note

    get/v2/users/{externalUserId}/notes/{noteId}

    Authenticate with a user access token — the externalUserId in the path must be the linked user the token belongs to.

    Path parameters

    externalUserIdstringrequired

    The partner's id for the linked user, bound at link time. Must match the user the access token belongs to.

    noteIdstringrequired

    Twofold's stable id for the note, as returned by the notes list and every note webhook.

    Response200

    The note with its sections in template order. A note whose content is being regenerated comes back as processing with no sections until the new content is written — it is never answered with the previous content, so what you read here is always what the clinician sees in Twofold.

    noteIdstring

    Twofold's note id.

    noteExternalIdstring | null

    The partner's id for the session, passed on the /launch link; null when the note wasn't started from one. Several notes can share it (repeat recordings for one appointment).

    patientobject | null

    The patient this note is about; null when none was set.

    patientIdstring

    Twofold's stable id for the patient.

    patientExternalIdstring | null

    The partner's id for this patient; null for a patient the user created themselves in Twofold.

    statusenum

    recording: the session is still being recorded. processing: recording finished; transcription and generation are running. generated: the note is ready. failed: user should contact Twofold support.

    recordingprocessinggeneratedfailed

    createdAtstring

    When the session was created, ISO 8601 UTC.

    generatedAtstring | null

    When the note was first generated successfully; null until then.

    updatedAtstring

    When the note last changed, ISO 8601 UTC.

    recordingDurationSecondsinteger | null

    Length of the recorded session in seconds; null while recording or when unknown.

    titlestring | null

    The note's title; null until it is generated.

    templateobject | null

    The template the note was generated with; null when it can no longer be resolved.

    templateIdstring

    The template the note was generated with — a partner base template or a user's clone of one. Always a Twofold template id.

    namestring

    The template's name, as the user sees it in Twofold.

    sectionsarray of object

    The note's sections in template order. Empty until the note has been generated.

    sectionExternalIdstring | null

    The partner's id for this section, carried over from the base template it was authored in; null for sections the user added themselves and for templates the partner did not author. Route sections by this, not by title — users can rename and reorder them.

    titlestring

    The section's heading, as the user sees it in Twofold.

    textstring

    The section's body as plain text — no markup. Empty when unfilled.

    Example request

    bash
    curl https://partner-api.trytwofold.com/v2/users/provider-1042/notes/n_ab12Cd34Ef56 \
      -H "Authorization: Bearer twofold_access_prod_…"
    bash
    curl https://partner-api.staging.trytwofold.com/v2/users/provider-1042/notes/n_ab12Cd34Ef56 \
      -H "Authorization: Bearer twofold_access_staging_…"

    Example response

    json
    {
      "noteId": "n_ab12Cd34Ef56",
      "noteExternalId": "appointment-9",
      "patient": {
        "patientId": "p_ab12Cd34Ef56",
        "patientExternalId": "client-2048"
      },
      "status": "generated",
      "createdAt": "2026-04-01T17:32:04.000Z",
      "generatedAt": "2026-04-14T09:18:22.517Z",
      "updatedAt": "2026-04-01T17:32:04.000Z",
      "recordingDurationSeconds": 1432,
      "title": "Follow-up consultation",
      "template": {
        "templateId": "ct_ab12Cd34Ef56",
        "name": "Consultation note"
      },
      "sections": [
        {
          "sectionExternalId": "charting_note",
          "title": "…",
          "text": "…"
        }
      ]
    }
    json
    {
      "noteId": "n_ab12Cd34Ef56",
      "noteExternalId": "appointment-9",
      "patient": {
        "patientId": "p_ab12Cd34Ef56",
        "patientExternalId": "client-2048"
      },
      "status": "generated",
      "createdAt": "2026-04-01T17:32:04.000Z",
      "generatedAt": "2026-04-14T09:18:22.517Z",
      "updatedAt": "2026-04-01T17:32:04.000Z",
      "recordingDurationSeconds": 1432,
      "title": "Follow-up consultation",
      "template": {
        "templateId": "ct_ab12Cd34Ef56",
        "name": "Consultation note"
      },
      "sections": [
        {
          "sectionExternalId": "charting_note",
          "title": "…",
          "text": "…"
        }
      ]
    }

    Errors

    400

    The request is invalid. param names the offending parameter when there is one. Possible error.code values: invalid_parameters.

    401

    Authentication failed — the access token is missing, invalid or expired. Refresh and retry. Possible error.code values: missing_access_token, invalid_access_token, access_token_expired, wrong_environment_access_token, partner_key_on_user_endpoint.

    403

    The token is valid but may not access this resource. Possible error.code values: link_revoked, partner_not_activated, external_user_id_mismatch.

    404

    The addressed resource does not exist for this credential. Possible error.code values: note_not_found, note_deleted.

    429

    Rate limit exceeded: 100 requests/second (burst 200) per linked user. Wait Retry-After seconds and retry. Possible error.code values: rate_limit_exceeded.

    500

    Something failed on Twofold's side, or the partner API is temporarily paused (temporarily_unavailable). Safe to retry. Possible error.code values: internal_error, temporarily_unavailable.

    Get a note's transcript

    get/v2/users/{externalUserId}/notes/{noteId}/transcript

    Authenticate with a user access token — the externalUserId in the path must be the linked user the token belongs to.

    Path parameters

    externalUserIdstringrequired

    The partner's id for the linked user, bound at link time. Must match the user the access token belongs to.

    noteIdstringrequired

    Twofold's stable id for the note, as returned by the notes list and every note webhook.

    Response200

    The note's transcript, or why it isn't available.

    noteIdstring

    Twofold's stable id for the note.

    statusenum

    available: the transcript is in text. not_ready: the session hasn't been transcribed yet — poll or wait for note.generated_successfully. no_audio: the note was made without audio (typed text), so there is no transcript and never will be — stop polling. deleted: the user deleted the transcript; it is gone for good.

    availablenot_readyno_audiodeleted

    textstring | null

    The transcript as plain text; null unless status is available.

    Example request

    bash
    curl https://partner-api.trytwofold.com/v2/users/provider-1042/notes/n_ab12Cd34Ef56/transcript \
      -H "Authorization: Bearer twofold_access_prod_…"
    bash
    curl https://partner-api.staging.trytwofold.com/v2/users/provider-1042/notes/n_ab12Cd34Ef56/transcript \
      -H "Authorization: Bearer twofold_access_staging_…"

    Example response

    json
    {
      "noteId": "…",
      "status": "available",
      "text": "So what brings you in today?\nMy knee has been bothering me since the weekend.\n..."
    }
    json
    {
      "noteId": "…",
      "status": "available",
      "text": "So what brings you in today?\nMy knee has been bothering me since the weekend.\n..."
    }

    Errors

    400

    The request is invalid. param names the offending parameter when there is one. Possible error.code values: invalid_parameters.

    401

    Authentication failed — the access token is missing, invalid or expired. Refresh and retry. Possible error.code values: missing_access_token, invalid_access_token, access_token_expired, wrong_environment_access_token, partner_key_on_user_endpoint.

    403

    The token is valid but may not access this resource. Possible error.code values: link_revoked, partner_not_activated, external_user_id_mismatch.

    404

    The addressed resource does not exist for this credential. Possible error.code values: note_not_found, note_deleted.

    429

    Rate limit exceeded: 100 requests/second (burst 200) per linked user. Wait Retry-After seconds and retry. Possible error.code values: rate_limit_exceeded.

    500

    Something failed on Twofold's side, or the partner API is temporarily paused (temporarily_unavailable). Safe to retry. Possible error.code values: internal_error, temporarily_unavailable.