Twofold v2.7

Search pages, sections and endpoints.

    Open the console

    Notes

    Fetching a generated note and its transcript, routing its sections, and reconciling missed events.

    Environment

    This is the last step of the integration and the one your product exists to deliver: the provider recorded a session, Twofold generated the note, and now the text belongs back in your system.

    Everything here is read-only and made as the provider, with their access token. Nothing on this page changes anything in Twofold.

    Where a noteId comes from

    Two places, and they are the same id:

    • A webhook. note.generated_successfully carries the noteId the moment the note is ready. That is the trigger to fetch — see Webhooks.
    • The notes list. The reconciliation path, and how you find notes you were never told about.

    Webhooks carry identifiers only, never note text, so a fetch always follows.

    Fetching a note

    bash
    curl https://partner-api.trytwofold.com/v2/users/provider-1042/notes/n_ab12Cd34Ef56 \
      -H "Authorization: Bearer twofold_access_prod_xxxxxxxxxxxx"
    bash
    curl https://partner-api.staging.trytwofold.com/v2/users/provider-1042/notes/n_ab12Cd34Ef56 \
      -H "Authorization: Bearer twofold_access_staging_xxxxxxxxxxxx"
    json
    {
      "noteId": "n_ab12Cd34Ef56",
      "noteExternalId": "appointment-9",
      "patient": { "patientId": "p_ab12Cd34Ef56", "patientExternalId": "client-2048" },
      "status": "generated",
      "title": "Follow-up consultation",
      "template": { "templateId": "ct_ab12Cd34Ef56", "name": "Consultation note" },
      "createdAt": "2026-04-14T09:02:11.004Z",
      "generatedAt": "2026-04-14T09:18:22.517Z",
      "updatedAt": "2026-04-14T09:18:22.517Z",
      "recordingDurationSeconds": 1432,
      "sections": [
        { "sectionExternalId": "subjective", "title": "Subjective", "text": "Patient reports…" },
        { "sectionExternalId": "plan", "title": "Plan", "text": "Continue current…" }
      ]
    }
    json
    {
      "noteId": "n_ab12Cd34Ef56",
      "noteExternalId": "appointment-9",
      "patient": { "patientId": "p_ab12Cd34Ef56", "patientExternalId": "client-2048" },
      "status": "generated",
      "title": "Follow-up consultation",
      "template": { "templateId": "ct_ab12Cd34Ef56", "name": "Consultation note" },
      "createdAt": "2026-04-14T09:02:11.004Z",
      "generatedAt": "2026-04-14T09:18:22.517Z",
      "updatedAt": "2026-04-14T09:18:22.517Z",
      "recordingDurationSeconds": 1432,
      "sections": [
        { "sectionExternalId": "subjective", "title": "Subjective", "text": "Patient reports…" },
        { "sectionExternalId": "plan", "title": "Plan", "text": "Continue current…" }
      ]
    }

    Sections come back in template order, as plain text — no markup — and a section that was not filled is present with an empty text.

    ⚠️ Route sections by sectionExternalId, never by title. The id is the one you put on the section when you authored the base template; the title is what the provider sees, and they can rename and reorder sections in their own clone. A sectionExternalId is null for a section the provider added themselves, and for every section of a template you did not author — those have no place in your system to go, which is exactly what the null is telling you.

    Three fields go null for three different reasons, and an import that treats them as one will drop notes it should keep. noteExternalId is null when the recording did not come from your launch URL. patient is null when no patient was selected at all. patient.patientExternalId is null when a patient was selected but the provider created them in Twofold rather than receiving them from you — that is a note about a real patient who is simply not one of yours.

    Several notes can share one noteExternalId — a provider who records an appointment twice produces two notes.

    A note id that does not resolve answers 404: note_deleted if the provider deleted it, note_not_found otherwise. Both are terminal — do not retry either.

    note_not_found also covers one note that does exist: a note generated with one of Twofold's retired static templates, which these endpoints do not serve (see Concepts & identifiers). Webhooks fire for it all the same, so a noteId you were told about can answer 404 — treat that as "skip this one", not as an outage.

    Status, and the one case that surprises people

    statusMeans
    recordingThe session is still being recorded.
    processingThe session has ended; the note is being prepared.
    generatedThe note is ready and sections carry its content.
    failedTerminal. No note text will arrive for it.

    Those four are the whole set today. New values are added additively, so a status you do not recognize is a possibility rather than a bug — fall through instead of failing, and check Field values, which is where every closed set in the API is listed.

    A note being regenerated reads as processing with no sections, not as a generated note carrying the old text. Twofold will not serve you content the clinician is no longer looking at, so a note you already imported can go back to processing for a while and return with different sections.

    That is what makes a note.edited webhook worth re-fetching on — and it is also the one fetch that can land mid-regeneration and come back empty. An empty sections on a processing note is not the note having lost its content: keep what you have and re-fetch until status is generated.

    Listing and reconciling

    bash
    curl "https://partner-api.trytwofold.com/v2/users/provider-1042/notes?patientExternalId=client-2048&limit=25" \
      -H "Authorization: Bearer twofold_access_prod_xxxxxxxxxxxx"
    bash
    curl "https://partner-api.staging.trytwofold.com/v2/users/provider-1042/notes?patientExternalId=client-2048&limit=25" \
      -H "Authorization: Bearer twofold_access_staging_xxxxxxxxxxxx"
    json
    {
      "data": [{ "noteId": "n_ab12Cd34Ef56", "status": "generated", "…": "…" }],
      "nextCursor": "eyJjcmVhdGVkQXRNcyI6…"
    }
    json
    {
      "data": [{ "noteId": "n_ab12Cd34Ef56", "status": "generated", "…": "…" }],
      "nextCursor": "eyJjcmVhdGVkQXRNcyI6…"
    }

    Newest first, without sections — the list is metadata, and the section bodies come from the single-note fetch. limit is 1–100 (25 by default) and cursor takes the previous page's nextCursor until that comes back null.

    FilterUse
    patientExternalIdEverything recorded for one of your patients.
    noteExternalIdEvery note for one appointment, including repeat recordings.
    createdAfter / createdBeforeA time window, ISO 8601 UTC. Each bound works on its own.
    statusOne of the four above.

    createdAfter is the recovery path. If your endpoint was down, or an event was never delivered, ask for everything since the last note you have rather than waiting for a redelivery. Webhooks are fetch triggers; this list is the source of truth.

    ⚠️ These endpoints expose the provider's whole Twofold account, not the notes you launched. Notes recorded before they ever linked to you, and notes about patients that have nothing to do with your system, are all in this list. The consent screen tells the provider so before they approve, and Concepts & identifiers explains why there is no link-window filter. Deciding what to import is yours: for most integrations that means taking only the notes carrying a noteExternalId or a patientExternalId you recognize.

    Transcripts

    The transcript is fetched separately from the note, and it is plain text too.

    bash
    curl https://partner-api.trytwofold.com/v2/users/provider-1042/notes/n_ab12Cd34Ef56/transcript \
      -H "Authorization: Bearer twofold_access_prod_xxxxxxxxxxxx"
    bash
    curl https://partner-api.staging.trytwofold.com/v2/users/provider-1042/notes/n_ab12Cd34Ef56/transcript \
      -H "Authorization: Bearer twofold_access_staging_xxxxxxxxxxxx"
    json
    {
      "noteId": "n_ab12Cd34Ef56",
      "status": "available",
      "text": "So what brings you in today?\nMy knee has been bothering me since the weekend.\n…"
    }
    json
    {
      "noteId": "n_ab12Cd34Ef56",
      "status": "available",
      "text": "So what brings you in today?\nMy knee has been bothering me since the weekend.\n…"
    }

    All four statuses are 200 responses — a transcript you cannot have is not an error:

    statustextWhat to do
    availableThe textNothing.
    not_readynullThe only one worth retrying. Poll, or wait for note.generated_successfully.
    no_audionullTerminal. The provider typed or pasted the note rather than recording it, so there is no transcript and never will be. Stop polling.
    deletednullTerminal. The provider deleted the transcript; it is gone for good.

    A provider can delete a transcript and keep the note, so deleted on a note that reads generated is an ordinary state rather than a contradiction. A deleted note is different — that answers 404 / note_deleted on both endpoints.