> ## Documentation Index
> Fetch the complete documentation index at: https://tickblaze.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update trading account statuses

> Updates the account status for every account in `account_ids` and stores the optional `custom_status_reason`. Returns a payload summarizing how many account statuses changed.



## OpenAPI

````yaml /openapi.json patch /api/accounts/status/
openapi: 3.0.3
info:
  title: TBBO API
  version: 1.0.0
  description: >
    Authentication uses short-lived session tokens (3 hours).


    Send the token with every request using the `Authorization` header:


    ```

    Authorization: Token <token>

    ```


    Example:


    ```

    Authorization: Token 123abc456def789

    ```


    To obtain a token, call `POST /auth/login/` with valid credentials. The
    response includes a `key` value. Use that value in the header above for
    subsequent API calls.


    How to find required IDs:


    - `challenge_id`: Prop Tech Configuration -> Challenges

    - `user_id`: Tickblaze Manager -> Users

    - `account_id`: Tickblaze Manager -> Accounts 
servers: []
security: []
tags:
  - name: withdrawals
    description: Withdrawal related endpoints
    x-displayName: Withdrawals
paths:
  /api/accounts/status/:
    patch:
      tags:
        - Accounts
      summary: Update trading account statuses
      description: >-
        Updates the account status for every account in `account_ids` and stores
        the optional `custom_status_reason`. Returns a payload summarizing how
        many account statuses changed.
      operationId: api_accounts_status_partial_update
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedAccountBulkStatusUpdateDocs'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedAccountBulkStatusUpdateDocs'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedAccountBulkStatusUpdateDocs'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationResponse'
              examples:
                StatusUpdateResponse:
                  value:
                    success: true
                    results:
                      - account_id: 1
                        previous_status: LIVE_VERIFICATION
                        new_status: BLOCKED
                        changed: true
                    summary:
                      updated: 1
                      unchanged: 0
                    duration_ms: 38.77
                    message: Updated 1 accounts.
                  summary: Accounts updated successfully
          description: ''
      security:
        - tokenAuth: []
components:
  schemas:
    PatchedAccountBulkStatusUpdateDocs:
      type: object
      properties:
        account_ids:
          type: array
          items:
            type: integer
            minimum: 1
        status:
          $ref: '#/components/schemas/Status293Enum'
        custom_status_reason:
          type: string
          nullable: true
          description: Optional note stored with the account status.
    OperationResponse:
      type: object
      description: >-
        Standard serializer for operation responses. A command or a task should
        return a response matching this format.

        Operation = a request to perform some action, e.g. sync, update, delete,
        create, etc.
      properties:
        success:
          type: boolean
          description: Indicates whether the operation completed successfully.
        results:
          type: array
          items: {}
          description: >-
            List containing the result items produced by the operation. The
            structure of each item depends on the executed operation.
        summary:
          type: object
          additionalProperties: {}
          description: >-
            Aggregated summary information about the operation results (e.g.
            counts of updated, created, failed or unchanged records).
        duration_ms:
          type: number
          format: double
          description: Execution time of the operation in milliseconds.
        message:
          type: string
          nullable: true
          description: Optional human-readable message describing the operation outcome.
      required:
        - duration_ms
        - results
        - success
        - summary
    Status293Enum:
      enum:
        - PENDING_ACTIVATION
        - ACTIVE
        - PASSED
        - FAILED
        - BLOCKED
        - DELETED
        - LIVE_VERIFICATION
        - KYC_VERIFICATION_REQD
        - PHASE_VERIFICATION_REQD
        - PAUSED
        - SUBSCRIPTION_EXPIRED
        - PAYMENT_REQUESTED
      type: string
      description: |-
        * `PENDING_ACTIVATION` - Pending Activation
        * `ACTIVE` - Active
        * `PASSED` - Passed
        * `FAILED` - Failed
        * `BLOCKED` - Blocked
        * `DELETED` - Deleted
        * `LIVE_VERIFICATION` - Live Account Verification Required
        * `KYC_VERIFICATION_REQD` - KYC Verification Required
        * `PHASE_VERIFICATION_REQD` - Phase Verification Required
        * `PAUSED` - PAUSED
        * `SUBSCRIPTION_EXPIRED` - Subscription Expired
        * `PAYMENT_REQUESTED` - Payment Requested
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.