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

# Log in

> Authenticates a partner user and returns a JWT for protected endpoints.



## OpenAPI

````yaml /openapi-v1.en.yaml post /v1/auth/login
openapi: 3.0.0
info:
  title: YP API Partner
  description: Integration documentation for YP API partners.
  version: v1
  contact: {}
servers:
  - url: https://sandbox-rampa.mesadepagos.com/api
    description: Sandbox
security: []
tags:
  - name: Auth
    description: ''
  - name: Quotes
    description: ''
  - name: Payin
    description: ''
  - name: Payout
    description: ''
  - name: Wallet
    description: ''
  - name: Queries
    description: ''
  - name: Webhooks
    description: ''
  - name: Fees
    description: ''
  - name: Clients
    description: ''
paths:
  /v1/auth/login:
    post:
      tags:
        - Login
      summary: Log in
      description: Authenticates a partner user and returns a JWT for protected endpoints.
      operationId: loginV1
      parameters: []
      requestBody:
        required: true
        description: Partner user credentials.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginRequestDoc'
      responses:
        '200':
          description: Successful login.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoginResponseDoc'
        '400':
          description: Invalid request or incorrectly formatted credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponseDoc'
        '401':
          description: Invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponseDoc'
components:
  schemas:
    LoginRequestDoc:
      type: object
      properties:
        email:
          type: string
          example: partner@example.com
          description: Partner user email.
        password:
          type: string
          example: secret123
          description: User password.
          minLength: 1
      required:
        - email
        - password
    LoginResponseDoc:
      type: object
      properties:
        success:
          type: boolean
          example: true
          description: Indicates whether the login was successful.
        accessToken:
          type: string
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
          description: JWT to send as a Bearer token.
        user:
          description: Basic information about the authenticated user.
          allOf:
            - $ref: '#/components/schemas/LoginUserDoc'
        message:
          type: string
          example: Login successful
          description: Result message.
      required:
        - success
        - accessToken
        - user
        - message
    ValidationErrorResponseDoc:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          type: string
          example: Validation failed
        error:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
        - error
    UnauthorizedResponseDoc:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          type: string
          example: Unauthorized
      required:
        - statusCode
        - message
    LoginUserDoc:
      type: object
      properties:
        id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
          description: Unique user identifier.
        name:
          type: object
          example: Partner User
          nullable: true
          description: User name.
        email:
          type: string
          example: partner@example.com
          description: User email.
        role:
          type: object
          example: tenant
          nullable: true
          description: Role assigned to the user.
        status:
          type: string
          example: ACTIVE
          description: Current user status.
        completedOnboardingSteps:
          example:
            - business_info
            - bank_details
          description: List of onboarding steps already completed by the user.
          type: array
          items:
            type: string
      required:
        - id
        - email
        - status

````