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

# Reconnect Trading 212 with supplied credentials

> Operation ID: post__brokers_connectionId_trading212_reconnect.



## OpenAPI

````yaml /openapi/itoflow-public.openapi.json post /brokers/{connectionId}/trading212/reconnect
openapi: 3.1.0
info:
  description: >-
    All Itoflow APIs are experimental and may change without notice. Read-only
    operations marked interactive can be tried from the documentation; the
    others are reference-only.
  title: Itoflow Developer API
  version: 1.0.0
servers:
  - description: Itoflow API
    url: https://api.itoflow.ai
security: []
tags:
  - name: Account
  - name: Billing
  - name: Brokers
  - name: Chat
  - name: Connected MCP servers
  - name: GitHub
  - name: Market data
  - name: Monitors
  - name: Notifications
  - name: Portfolios
  - name: Risk runs
  - name: Sharing and data
  - name: Strategies
paths:
  /brokers/{connectionId}/trading212/reconnect:
    post:
      tags:
        - Brokers
      summary: Reconnect Trading 212 with supplied credentials
      description: 'Operation ID: post__brokers_connectionId_trading212_reconnect.'
      operationId: post__brokers_connectionId_trading212_reconnect
      parameters:
        - description: connectionId path parameter
          in: path
          name: connectionId
          required: true
          schema:
            description: connectionId path parameter
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Trading212ConnectRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrokerConnectionResponse'
          description: Reconnect Trading 212 with supplied credentials
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Authentication required
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Not found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Server error
      security:
        - bearerAuth: []
components:
  schemas:
    Trading212ConnectRequest:
      properties:
        api_key:
          minLength: 8
          type: string
        api_secret:
          minLength: 8
          type: string
        broker_type:
          enum:
            - trading212
          type: string
        broker_user_name:
          type: string
        permissions:
          $ref: '#/components/schemas/Trading212Permissions'
      required:
        - api_key
        - api_secret
        - permissions
      type: object
    BrokerConnectionResponse:
      additionalProperties: {}
      properties:
        authorization_url:
          format: uri
          type: string
        broker_type:
          type: string
        connection_id:
          type: string
        expires_at:
          type: string
        portfolio_id:
          type:
            - string
            - 'null'
        session_id:
          type: string
        success:
          type: boolean
        sync_status:
          type: string
      type: object
    Error:
      properties:
        available:
          description: Optional available amount or value
          type: string
        billing_action:
          $ref: '#/components/schemas/BillingAction'
        code:
          description: Machine-readable error code
          type: string
        currentVersion:
          description: Current server-side version, when relevant
          type: number
        details:
          description: Optional structured error details
        error:
          description: Error type or code
          type: string
        expectedVersion:
          description: Client-provided expected version, when relevant
          type: number
        message:
          description: Human-readable error message
          type: string
        requested:
          description: Optional requested amount or value
          type: string
        usage:
          description: Optional usage metadata for limit errors
      required:
        - error
      type: object
    Trading212Permissions:
      properties:
        account_data:
          type: boolean
        history_dividends:
          type: boolean
        history_orders:
          type: boolean
        history_transactions:
          type: boolean
        metadata:
          type: boolean
        orders_execute:
          type: boolean
        orders_read:
          type: boolean
        pies_read:
          type: boolean
        pies_write:
          type: boolean
        portfolio:
          type: boolean
      type: object
    BillingAction:
      description: Action that resolves a billing-related rejection
      properties:
        href:
          type: string
        kind:
          enum:
            - upgrade
            - payment_method
            - spending_cap
            - billing
          type: string
        label:
          type: string
      required:
        - href
        - label
        - kind
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: Itoflow access token issued for the Itoflow API.
      scheme: bearer
      type: http

````

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