API reference
Usage billing
Usage billing only — starting and ending a seat per provider when your organization is billed per seat in use. See the Billing modes guide.
Start a user's seat
post/v2/partner/users/{externalUserId}/seat/start
Authenticate with your partner API key and the Twofold-Client-Id header.
Usage billing only. On a seat subscription, access is set with access-level instead.
Path parameters
externalUserIdstringrequiredThe partner's id for the linked user, bound at link time.
Request bodyJSON
planenumrequiredmonthly bills a period starting on the seat's start day every month while the seat is open; annual bills twelve months up front and renews on the anniversary while the seat is open.
monthlyannual
groupExternalIdstringrequiredYour id for the group this user belongs to. Stored and shown back to you for reconciliation, never interpreted by Twofold. Sent on every start; a start on an already-open seat updates it without changing the seat.
Response200
The user has FULL_ACCESS and an open seat, billed from today. Idempotent: starting a user who already holds a seat on this plan succeeds without opening a second one. plan annual on a monthly seat switches the plan the same day; plan annual for a user inside a paid annual term resumes it at no charge.
externalUserIdstringThe partner's id for this user, bound at link time.
twofoldUserIdstringTwofold's stable id for the user.
linkStatusenumWhether the link is still in force. Listing and the administration endpoints only ever see currently-linked users, so this is "active" everywhere except the response to a revoke.
activerevoked
accessLevelenumFULL_ACCESS consumes a partner seat and unlocks the full app; READ_ONLY users are prompted to activate via the partner.
FULL_ACCESSREAD_ONLY
linkedAtstringWhen the current link was created, ISO 8601 UTC.
groupExternalIdstring | nullUsage billing only: the group id you sent on the last seat/start call for this user. Null for a user you have never started a seat for, and always null on a seat subscription.
seatobject | nullUsage billing only: the user's open seat, or null when none is open. Always null on a seat subscription.
planenummonthly bills a period starting on the seat's start day every month while the seat is open; annual bills twelve months up front and renews on the anniversary while the seat is open.
monthlyannual
startedAtstringWhen this seat term started, ISO 8601 UTC.
annualTermEndsAtstring | nullAnnual seats only: when the paid twelve-month term ends. The term renews for another year if the seat is still open at that instant; end the seat before it to stop the renewal. Null for monthly seats.
Example request
curl -X POST https://partner-api.trytwofold.com/v2/partner/users/provider-1042/seat/start \
-H "Authorization: Bearer twofold_key_prod_…" \
-H "Twofold-Client-Id: prtn_ab12Cd34Ef56" \
-H "Content-Type: application/json" \
-d '{
"plan": "monthly",
"groupExternalId": "grp_8f31"
}'curl -X POST https://partner-api.staging.trytwofold.com/v2/partner/users/provider-1042/seat/start \
-H "Authorization: Bearer twofold_key_staging_…" \
-H "Twofold-Client-Id: prtn_ab12Cd34Ef56" \
-H "Content-Type: application/json" \
-d '{
"plan": "monthly",
"groupExternalId": "grp_8f31"
}'Example response
{
"externalUserId": "provider-1042",
"twofoldUserId": "user_ab12Cd34Ef56",
"linkStatus": "active",
"accessLevel": "FULL_ACCESS",
"linkedAt": "2026-04-01T17:32:04.000Z",
"groupExternalId": "grp_8f31",
"seat": {
"plan": "monthly",
"startedAt": "2026-04-01T17:32:04.000Z",
"annualTermEndsAt": null
}
}{
"externalUserId": "provider-1042",
"twofoldUserId": "user_ab12Cd34Ef56",
"linkStatus": "active",
"accessLevel": "FULL_ACCESS",
"linkedAt": "2026-04-01T17:32:04.000Z",
"groupExternalId": "grp_8f31",
"seat": {
"plan": "monthly",
"startedAt": "2026-04-01T17:32:04.000Z",
"annualTermEndsAt": null
}
}Errors
400The request is invalid. param names the offending parameter when there is one. Possible error.code values: invalid_parameters, not_available_in_billing_mode, annual_term_active.
401Authentication failed — the API key or the Twofold-Client-Id header is missing, wrong or revoked. Possible error.code values: missing_client_id, missing_api_key, wrong_environment_api_key, invalid_api_key, api_key_revoked, client_id_mismatch.
403The credential is valid but this partner may not act yet. Possible error.code values: partner_not_activated.
404The addressed resource does not exist for this credential. Possible error.code values: user_not_found.
429Rate limit exceeded: 100 requests/second (burst 200) per API key. Wait Retry-After seconds and retry. Possible error.code values: rate_limit_exceeded.
500Something 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.
End a user's seat
post/v2/partner/users/{externalUserId}/seat/end
Authenticate with your partner API key and the Twofold-Client-Id header.
Usage billing only. On a seat subscription, access is set with access-level instead.
Path parameters
externalUserIdstringrequiredThe partner's id for the linked user, bound at link time.
Response200
The seat is ended and the user is READ_ONLY; seat is null. Idempotent and forgiving: a user whose seat already ended, or who never had one, also succeeds.
externalUserIdstringThe partner's id for this user, bound at link time.
twofoldUserIdstringTwofold's stable id for the user.
linkStatusenumWhether the link is still in force. Listing and the administration endpoints only ever see currently-linked users, so this is "active" everywhere except the response to a revoke.
activerevoked
accessLevelenumFULL_ACCESS consumes a partner seat and unlocks the full app; READ_ONLY users are prompted to activate via the partner.
FULL_ACCESSREAD_ONLY
linkedAtstringWhen the current link was created, ISO 8601 UTC.
groupExternalIdstring | nullUsage billing only: the group id you sent on the last seat/start call for this user. Null for a user you have never started a seat for, and always null on a seat subscription.
seatobject | nullUsage billing only: the user's open seat, or null when none is open. Always null on a seat subscription.
planenummonthly bills a period starting on the seat's start day every month while the seat is open; annual bills twelve months up front and renews on the anniversary while the seat is open.
monthlyannual
startedAtstringWhen this seat term started, ISO 8601 UTC.
annualTermEndsAtstring | nullAnnual seats only: when the paid twelve-month term ends. The term renews for another year if the seat is still open at that instant; end the seat before it to stop the renewal. Null for monthly seats.
Example request
curl -X POST https://partner-api.trytwofold.com/v2/partner/users/provider-1042/seat/end \
-H "Authorization: Bearer twofold_key_prod_…" \
-H "Twofold-Client-Id: prtn_ab12Cd34Ef56"curl -X POST https://partner-api.staging.trytwofold.com/v2/partner/users/provider-1042/seat/end \
-H "Authorization: Bearer twofold_key_staging_…" \
-H "Twofold-Client-Id: prtn_ab12Cd34Ef56"Example response
{
"externalUserId": "provider-1042",
"twofoldUserId": "user_ab12Cd34Ef56",
"linkStatus": "active",
"accessLevel": "READ_ONLY",
"linkedAt": "2026-08-15T14:02:11.000Z",
"groupExternalId": "grp_8f31",
"seat": null
}{
"externalUserId": "provider-1042",
"twofoldUserId": "user_ab12Cd34Ef56",
"linkStatus": "active",
"accessLevel": "READ_ONLY",
"linkedAt": "2026-08-15T14:02:11.000Z",
"groupExternalId": "grp_8f31",
"seat": null
}Errors
400The request is invalid. param names the offending parameter when there is one. Possible error.code values: invalid_parameters, not_available_in_billing_mode.
401Authentication failed — the API key or the Twofold-Client-Id header is missing, wrong or revoked. Possible error.code values: missing_client_id, missing_api_key, wrong_environment_api_key, invalid_api_key, api_key_revoked, client_id_mismatch.
403The credential is valid but this partner may not act yet. Possible error.code values: partner_not_activated.
404The addressed resource does not exist for this credential. Possible error.code values: user_not_found.
429Rate limit exceeded: 100 requests/second (burst 200) per API key. Wait Retry-After seconds and retry. Possible error.code values: rate_limit_exceeded.
500Something 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.