Twofold v2.7

Search pages, sections and endpoints.

    Open the console

    Billing modes

    The two ways an organization pays for its providers, how to tell which one you are on, and which endpoints belong to each.

    Environment

    Your organization is on exactly one of two billing modes. Twofold sets it when you are onboarded, and it decides two things: how a provider gets access to Twofold, and how your organization pays for it. Most of this API is the same in both modes; the endpoints that give and take access are not, and this page tells them apart.

    The two modes

    Seat subscriptionUsage billing
    billingModepartner_level_seat_subscriptionsprovider_seat_usage
    How you payA subscription with a seat total, billed in advanceOne invoice a month for the seats that were in use, billed in arrears
    Seat capThe total you bought — seatsAllowedNone
    Giving a provider accessPUT /v2/partner/users/{externalUserId}/access-level with FULL_ACCESSPOST /v2/partner/users/{externalUserId}/seat/start with a plan and a group
    Taking it awayThe same endpoint with READ_ONLYPOST /v2/partner/users/{externalUserId}/seat/end
    Buying seatsPOST /v2/partner/seats/set-seats, or the Seats page of the consoleNot a step — a seat exists from the moment you start it
    The guideAccess & seatsSeat usage billing

    Which one you are on

    bash
    curl https://partner-api.trytwofold.com/v2/partner/seats \
      -H "Authorization: Bearer twofold_key_prod_xxxxxxxxxxxx" \
      -H "Twofold-Client-Id: prtn_ab12Cd34Ef56"
    bash
    curl https://partner-api.staging.trytwofold.com/v2/partner/seats \
      -H "Authorization: Bearer twofold_key_staging_xxxxxxxxxxxx" \
      -H "Twofold-Client-Id: prtn_ab12Cd34Ef56"
    json
    { "billingMode": "provider_seat_usage", "seatsAllowed": null, "seatsUsed": 79, "seatsByPlan": { "monthly": 24, "annual": 55 } }
    json
    { "billingMode": "provider_seat_usage", "seatsAllowed": null, "seatsUsed": 79, "seatsByPlan": { "monthly": 24, "annual": 55 } }

    billingMode is the answer. The rest of the response follows it: on a seat subscription seatsAllowed is your total and seatsUsed counts providers at FULL_ACCESS; on usage billing seatsAllowed is null, seatsUsed counts open seats, and seatsByPlan splits them.

    The mode never changes on its own. Twofold switches it with you, and only while no provider has access — so a switch is something you arrange, never something you discover from an error.

    Which endpoints belong to which

    The reference groups them the same way.

    • Seat subscriptions only — PUT …/access-level and POST /v2/partner/seats/set-seats.
    • Usage billing only — POST …/seat/start and POST …/seat/end.
    • Both modes — everything else. GET /v2/partner/users, POST …/revoke and GET /v2/partner/seats mean the same thing whichever way you are billed: a linked provider, an ended link, and where your seats stand. Templates, webhooks and every user-token endpoint have nothing to do with billing at all.

    Calling an endpoint of the other mode is refused with 400 / not_available_in_billing_mode, and the message names the endpoint to use instead. Nothing is changed or charged by the refused call. Revoking a link works in both modes and ends any open seat with it.

    The two fields on the linked-user row that describe a seat — groupExternalId and seat — are always present and are null on a seat subscription, so a client written for one mode reads the other's rows without surprises.