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

# Customer Login

> Authenticate a customer (trader) and return a JWT with type='customer'.
The token includes the customer's primary trading account login.



## OpenAPI

````yaml /openapi.json post /customers/login
openapi: 3.1.0
info:
  title: Slate API
  version: 1.0.0
  description: Trading infrastructure API.
servers:
  - url: https://api.{your-broker}.slate-labs.com
    variables:
      your-broker:
        default: broker
security: []
tags:
  - name: Authentication
  - name: API Tokens
  - name: Customers
  - name: Accounts
  - name: Orders
  - name: Instruments & Groups
  - name: Transactions
  - name: Payments
  - name: Transfers
  - name: Risk
  - name: Workflow & CRM
  - name: Messaging
  - name: Integrations
  - name: Webhooks
  - name: Compliance
  - name: Promo codes
  - name: Reporting
  - name: Audit
  - name: Fraud & moderation
  - name: Broker settings
  - name: Users
  - name: Roles & Teams
  - name: Streams (SSE)
  - name: Simulator
  - name: Observability
  - name: Prop trading
paths:
  /customers/login:
    post:
      tags:
        - Customers
      summary: Customer Login
      description: |-
        Authenticate a customer (trader) and return a JWT with type='customer'.
        The token includes the customer's primary trading account login.
      operationId: customer_login_customers_login_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerLoginRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerTokenResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CustomerLoginRequest:
      properties:
        email:
          type: string
          format: email
          title: Email
        password:
          type: string
          maxLength: 72
          title: Password
      type: object
      required:
        - email
        - password
      title: CustomerLoginRequest
    CustomerTokenResponse:
      properties:
        access_token:
          type: string
          title: Access Token
        token_type:
          type: string
          title: Token Type
          default: bearer
        customer:
          $ref: '#/components/schemas/CustomerResponse'
      type: object
      required:
        - access_token
        - customer
      title: CustomerTokenResponse
      description: Login response — token plus embedded customer profile.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CustomerResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        email:
          type: string
          title: Email
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
        full_name:
          type: string
          title: Full Name
          default: ''
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
        phone_normalized:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone Normalized
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
        owner_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Owner Id
        ftd_sales_agent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Ftd Sales Agent Id
        owner:
          anyOf:
            - $ref: '#/components/schemas/UserInCustomerResponse'
            - type: 'null'
        sales_status_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Sales Status Id
        kyc_status_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Kyc Status Id
        affiliate_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Affiliate Id
        campaign_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Campaign Id
        funnel:
          anyOf:
            - type: string
            - type: 'null'
          title: Funnel
        affiliate_lead_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Affiliate Lead Id
        manager_counter:
          type: integer
          title: Manager Counter
        reg_time:
          type: string
          format: date-time
          title: Reg Time
        last_login_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Login At
        last_activity_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Activity At
        last_trade_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Trade At
        last_deposit_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Deposit At
        ftd_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ftd At
        is_deposited:
          type: boolean
          title: Is Deposited
        is_active:
          type: boolean
          title: Is Active
        retention_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Retention Status
        risk_classification:
          anyOf:
            - type: string
            - type: 'null'
          title: Risk Classification
          default: normal
        compliance_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Compliance Status
        phone_country:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone Country
        kyc_country:
          anyOf:
            - type: string
            - type: 'null'
          title: Kyc Country
        kyc_provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Kyc Provider
        kyc_completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Kyc Completed At
        reg_ip:
          anyOf:
            - type: string
            - type: 'null'
          title: Reg Ip
        registration_source:
          anyOf:
            - type: string
            - type: 'null'
          title: Registration Source
        force_password_change:
          type: boolean
          title: Force Password Change
          default: false
        trading_accounts:
          items:
            $ref: '#/components/schemas/TradingAccountResponse'
          type: array
          title: Trading Accounts
          default: []
      type: object
      required:
        - id
        - email
        - phone
        - phone_normalized
        - country
        - owner_id
        - sales_status_id
        - kyc_status_id
        - affiliate_id
        - campaign_id
        - funnel
        - affiliate_lead_id
        - manager_counter
        - reg_time
        - last_login_at
        - last_activity_at
        - last_trade_at
        - ftd_at
        - is_deposited
        - is_active
      title: CustomerResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    UserInCustomerResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        first_name:
          type: string
          title: First Name
        last_name:
          type: string
          title: Last Name
        full_name:
          type: string
          title: Full Name
        role_id:
          type: integer
          title: Role Id
        role_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Role Name
      type: object
      required:
        - id
        - first_name
        - last_name
        - full_name
        - role_id
        - role_name
      title: UserInCustomerResponse
      description: >-
        Slim user shape for embedding in CustomerResponse — avoids circular
        schemas.
    TradingAccountResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        login:
          type: string
          title: Login
        currency:
          type: string
          title: Currency
        account_type:
          type: string
          title: Account Type
        balance:
          type: number
          title: Balance
        credit:
          type: number
          title: Credit
        group_id:
          type: string
          format: uuid
          title: Group Id
        is_active:
          type: boolean
          title: Is Active
        created_at:
          type: string
          format: date-time
          title: Created At
        ftd_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ftd At
        last_trade_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Trade At
        margin_level:
          type: number
          title: Margin Level
          default: 0
        gross_exposure:
          type: number
          title: Gross Exposure
          default: 0
        net_exposure:
          type: number
          title: Net Exposure
          default: 0
      type: object
      required:
        - id
        - login
        - currency
        - account_type
        - balance
        - credit
        - group_id
        - is_active
        - created_at
        - ftd_at
        - last_trade_at
      title: TradingAccountResponse

````