Expire All Account Lockouts

View as Markdown
### Expire all active account-level lockouts for a user. **Available to:** Organization administrators **Environments:** Demo **[Rate Limit](/overview/core-concepts/rate-limits):** No endpoint-specific limit This endpoint allows you to immediately expire all active trading lockouts for a user in your organization. Use this when a trader needs to resume trading across all their accounts at once, rather than unlocking accounts individually with [`expireAccountLockout`](/api/rest-api-endpoints/users/expire-account-lockout). When the lockouts are expired: - Trading is re-enabled immediately on all previously locked accounts - All locked accounts belonging to the user are unlocked Use the optional `notes` field to record a reason for the unlock (e.g., "Trader requested full unlock"). If the user doesn't have any active lockouts, the request still succeeds without making any changes. **Common Failure Scenarios** - The caller isn't an organization administrator - The user doesn't belong to the caller's organization - The user doesn't exist All responses return `HTTP 200`. Errors are indicated by `ok: false` and an `errorText` field in the response body. **Error Messages** | `errorText` | Trigger | |-------------|---------| | `"Unauthorized: only org admins may expire a trading lockout."` | The caller isn't an organization administrator, or the user belongs to a different organization | | `"User not found."` | The `userId` doesn't match an existing user | **Related Endpoints** - Use [`accountLockoutStatus`](/api/rest-api-endpoints/users/account-lockout-status) to check whether accounts are currently locked - Use [`createAccountLockout`](/api/rest-api-endpoints/users/create-account-lockout) to lock a specific account (traders, own account only) - Use [`expireAccountLockout`](/api/rest-api-endpoints/users/expire-account-lockout) to unlock a single account early (organization administrators only) ***Note***: The [`expireAccountLockout`](/api/rest-api-endpoints/users/expire-account-lockout) and [`expireAllAccountLockouts`](/api/rest-api-endpoints/users/expire-all-account-lockouts) endpoints replace [`expireUserLockout`](/api/rest-api-endpoints/users/expire-user-lockout).

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
userIdlongRequired
notesstringOptional<=8192 characters

Response

AccountLockoutResponse
errorTextstringOptional<=8192 characters

Non-empty if the request failed

okbooleanOptional