openapi: 3.0.1 info: title: Pomelo Authentication Users API description: REST API for Pomelo (pomelo.la), the Latin American card-issuing and embedded-finance platform. Covers user onboarding and identity verification (KYC/KYB), card issuing and lifecycle management, card accounts and balances, transaction processing and history, transfers and settlements, and the real-time authorizer plus event webhooks. Authentication uses the OAuth 2.0 client-credentials grant; the issued JWT is sent as a Bearer token on every request. termsOfService: https://www.pomelo.la contact: name: Pomelo Developers url: https://developers.pomelo.la version: '1.0' servers: - url: https://api.pomelo.la description: Pomelo production API - url: https://auth.pomelo.la description: Pomelo OAuth 2.0 token issuer security: - bearerAuth: [] tags: - name: Users description: Cardholder records and KYC/KYB identity verification. paths: /users/v1: post: operationId: createUser tags: - Users summary: Create a user. description: Register a new cardholder. An email uniquely identifies the user on the platform. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UserRequest' responses: '201': description: User created. content: application/json: schema: $ref: '#/components/schemas/UserEnvelope' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' get: operationId: searchUsers tags: - Users summary: Search users. description: Query the user database by parameters such as identification, email, or status. parameters: - name: identification_value in: query schema: type: string - name: email in: query schema: type: string format: email - name: status in: query schema: $ref: '#/components/schemas/UserStatus' - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageNumber' responses: '200': description: Matching users. content: application/json: schema: $ref: '#/components/schemas/UserList' '401': $ref: '#/components/responses/Unauthorized' /users/v1/{id}: parameters: - $ref: '#/components/parameters/UserId' get: operationId: getUser tags: - Users summary: Get a user. responses: '200': description: The requested user. content: application/json: schema: $ref: '#/components/schemas/UserEnvelope' '404': $ref: '#/components/responses/NotFound' patch: operationId: modifyUser tags: - Users summary: Modify a user. description: Update existing personal information for a user. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UserPatch' responses: '200': description: Updated user. content: application/json: schema: $ref: '#/components/schemas/UserEnvelope' '404': $ref: '#/components/responses/NotFound' components: schemas: User: allOf: - $ref: '#/components/schemas/UserRequest' - type: object properties: id: type: string status: $ref: '#/components/schemas/UserStatus' created_at: type: string format: date-time UserPatch: type: object properties: email: type: string format: email phone: type: string legal_address: $ref: '#/components/schemas/Address' status: $ref: '#/components/schemas/UserStatus' PageMeta: type: object properties: pagination: type: object properties: page_size: type: integer page_number: type: integer total_pages: type: integer total_elements: type: integer UserStatus: type: string enum: - ACTIVE - BLOCKED - DISABLED UserEnvelope: type: object properties: data: $ref: '#/components/schemas/User' Error: type: object properties: error: type: object properties: details: type: array items: type: object properties: code: type: string detail: type: string Address: type: object properties: street_name: type: string street_number: type: string zip_code: type: string city: type: string region: type: string country: type: string description: ISO 3166-1 alpha-3 country code. UserRequest: type: object required: - name - surname - email - operation_country properties: name: type: string surname: type: string identification_type: type: string example: DNI identification_value: type: string birthdate: type: string format: date gender: type: string enum: - MALE - FEMALE - OTHER email: type: string format: email phone: type: string legal_address: $ref: '#/components/schemas/Address' operation_country: type: string description: ISO 3166-1 alpha-3 operating country (e.g. ARG, BRA, MEX). UserList: type: object properties: data: type: array items: $ref: '#/components/schemas/User' meta: $ref: '#/components/schemas/PageMeta' responses: NotFound: description: Resource not found. content: application/json: schema: $ref: '#/components/schemas/Error' BadRequest: description: Invalid request. content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Missing or invalid Bearer token. content: application/json: schema: $ref: '#/components/schemas/Error' parameters: PageNumber: name: page[number] in: query schema: type: integer default: 0 UserId: name: id in: path required: true schema: type: string PageSize: name: page[size] in: query schema: type: integer default: 25 securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: OAuth 2.0 client-credentials access token issued by /oauth/token. oauth2: type: oauth2 flows: clientCredentials: tokenUrl: https://auth.pomelo.la/oauth/token scopes: {}