Expire Account Lockout

View as Markdown
### Expire an active account-level lockout. **Available to:** Organization administrators **Environments:** Demo **[Rate Limit](/overview/core-concepts/rate-limits):** No endpoint-specific limit This endpoint allows you to immediately expire an active trading lockout for a single account in your organization. Traders use manual lockouts to pause their trading activity for a specified amount of time. Since traders can't cancel their own lockouts, only an organization administrator can unlock the account before the lockout expires. When the lockout is expired: - Trading is re-enabled immediately on the specified account - Other locked accounts belonging to the same user are not affected Use the optional `notes` field to record a reason for the unlock (e.g., "Trader requested early unlock"). If the account doesn't have an active lockout, the request still succeeds without making any changes. To expire all active lockouts for a user at once, use [`expireAllAccountLockouts`](/api/rest-api-endpoints/users/expire-all-account-lockouts) instead. **Common Failure Scenarios** - The caller isn't an organization administrator - The account doesn't belong to the caller's organization - The account doesn't exist - 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 account belongs to a different organization | | `"Account not found."` | The `accountId` doesn't match an existing account | | `"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 [`expireAllAccountLockouts`](/api/rest-api-endpoints/users/expire-all-account-lockouts) to unlock all accounts for a user (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.
accountIdlongRequired
userIdlongRequired
notesstringOptional<=8192 characters

Response

AccountLockoutResponse
errorTextstringOptional<=8192 characters

Non-empty if the request failed

okbooleanOptional