API reference
Seat subscriptions
Seat subscriptions only — giving a linked user access and buying seats when your organization is billed on a seat subscription. See the Billing modes guide.
Set a user's access level
put/v2/partner/users/{externalUserId}/access-level
Authenticate with your partner API key and the Twofold-Client-Id header.
Seat subscriptions only. On usage billing, access is granted and ended per provider with seat/start and seat/end instead.
Path parameters
externalUserIdstringrequiredThe partner's id for the linked user, bound at link time.
Request bodyJSON
levelenumrequiredThe access level to set. FULL_ACCESS consumes a partner seat; READ_ONLY frees the seat and the user is prompted to activate via the partner when they try to record.
FULL_ACCESSREAD_ONLY
Response200
The user with the access level applied. Idempotent: setting the level the user already has succeeds without a change.
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 PUT https://partner-api.trytwofold.com/v2/partner/users/provider-1042/access-level \
-H "Authorization: Bearer twofold_key_prod_…" \
-H "Twofold-Client-Id: prtn_ab12Cd34Ef56" \
-H "Content-Type: application/json" \
-d '{
"level": "FULL_ACCESS"
}'curl -X PUT https://partner-api.staging.trytwofold.com/v2/partner/users/provider-1042/access-level \
-H "Authorization: Bearer twofold_key_staging_…" \
-H "Twofold-Client-Id: prtn_ab12Cd34Ef56" \
-H "Content-Type: application/json" \
-d '{
"level": "FULL_ACCESS"
}'Example response
{
"externalUserId": "provider-1042",
"twofoldUserId": "user_ab12Cd34Ef56",
"linkStatus": "active",
"accessLevel": "FULL_ACCESS",
"linkedAt": "2026-08-15T14:02:11.000Z",
"groupExternalId": null,
"seat": null
}{
"externalUserId": "provider-1042",
"twofoldUserId": "user_ab12Cd34Ef56",
"linkStatus": "active",
"accessLevel": "FULL_ACCESS",
"linkedAt": "2026-08-15T14:02:11.000Z",
"groupExternalId": null,
"seat": null
}Errors
400The request is invalid. param names the offending parameter when there is one. Possible error.code values: invalid_parameters, insufficient_seats, 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.
Set the seat total
post/v2/partner/seats/set-seats
Authenticate with your partner API key and the Twofold-Client-Id header.
Seat subscriptions only. On usage billing there is no seat total: seats are started and ended per provider with seat/start and seat/end.
Request bodyJSON
totalSeatsintegerrequiredThe TOTAL number of seats you want — not how many to add. Increase-only: sending your current total is a no-op (safe to retry, never a second purchase); a lower total fails, decreasing goes through Twofold support.
Response200
Your seat count is now totalSeats, billed on your organization's subscription (a no-op when it already was); the body reflects the current counts.
billingModeenumWhich billing mode your organization is on, and so which endpoints apply to you: partner_level_seat_subscriptions (a seat subscription: access-level and set-seats) or provider_seat_usage (usage billing: seat/start and seat/end). Twofold sets it; it does not change on its own.
partner_level_seat_subscriptionsprovider_seat_usage
seatsAllowedinteger | nullSeat subscriptions: how many FULL_ACCESS seats your contract covers — null when no seat count has been configured yet, and no user can be set to FULL_ACCESS until one is. Usage billing: always null, there is no cap in that mode.
seatsUsedintegerSeat subscriptions: how many currently-linked users are on FULL_ACCESS. Usage billing: how many seats are open right now, the total of seatsByPlan.
seatsByPlanobjectUsage billing only: the open seats by plan. Absent on a seat subscription.
monthlyintegerannualintegerExample request
curl -X POST https://partner-api.trytwofold.com/v2/partner/seats/set-seats \
-H "Authorization: Bearer twofold_key_prod_…" \
-H "Twofold-Client-Id: prtn_ab12Cd34Ef56" \
-H "Content-Type: application/json" \
-d '{
"totalSeats": 25
}'curl -X POST https://partner-api.staging.trytwofold.com/v2/partner/seats/set-seats \
-H "Authorization: Bearer twofold_key_staging_…" \
-H "Twofold-Client-Id: prtn_ab12Cd34Ef56" \
-H "Content-Type: application/json" \
-d '{
"totalSeats": 25
}'Example response
{
"billingMode": "partner_level_seat_subscriptions",
"seatsAllowed": 50,
"seatsUsed": 42
}{
"billingMode": "partner_level_seat_subscriptions",
"seatsAllowed": 50,
"seatsUsed": 42
}Errors
400The request is invalid. param names the offending parameter when there is one. Possible error.code values: invalid_parameters, seats_not_configured, cannot_decrease_seats, seat_limit_reached, 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.
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.