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

# Create an Application

> Use this endpoint to create the credentials that an external application will use to integrate with Lerian's application. Ideal for registering applications that need to interact with the plugin (M2M).



## OpenAPI

````yaml /en/openapi/v3-current/AM-identity.yaml post /v1/applications
openapi: 3.1.0
info:
  title: Identity Plugin
  description: ''
  version: 2.4.2
servers:
  - url: https://identity.sandbox.lerian.net
security: []
tags:
  - name: Groups API
  - name: Applications API
  - name: Users API
  - name: MFA API
  - name: Providers API
  - name: Application Providers API
paths:
  /v1/applications:
    post:
      tags:
        - Applications API
      summary: Create an Application
      description: >-
        Use this endpoint to create the credentials that an external application
        will use to integrate with Lerian's application. Ideal for registering
        applications that need to interact with the plugin (M2M).
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplicationInput'
            example:
              description: Midaz Used By Application X.
              name: midaz
      responses:
        '201':
          description: >-
            Indicates that the resource was successfully created and the
            operation was completed as expected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationResponse'
              example:
                clientId: 019c96a0-6a10-7abc-d1e2-8c9d0e1f2a3b
                clientSecret: 019c96a0-6a20-7bcd-e1f2-9d0e1f2a3b4c
                createdAt: '2025-04-08T08:01:30.000Z'
                description: Midaz Used By Application X
                id: 019c96a0-0c0c-7221-8cf3-13313fb60081
                name: Midaz
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              examples:
                Error0001:
                  $ref: '#/components/examples/Error0001'
                Error0002:
                  $ref: '#/components/examples/Error0002'
                Error0004:
                  $ref: '#/components/examples/Error0004'
                Error0007:
                  $ref: '#/components/examples/Error0007'
                Error0012:
                  $ref: '#/components/examples/Error0012'
          headers: {}
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              examples:
                Error0006:
                  $ref: '#/components/examples/Error0006'
          headers: {}
      security:
        - bearer: []
components:
  schemas:
    ApplicationInput:
      description: Information used to create a new application.
      type: object
      required:
        - description
        - name
      properties:
        description:
          description: >-
            A clear identifier that helps you quickly recognize who’s using the
            application.
          type: string
        name:
          type: string
          description: The name of Lerian's application you’re granting access to.
          enum:
            - midaz
            - plugin-fees
            - plugin-crm
    ApplicationResponse:
      description: Information about the Application.
      type: object
      properties:
        clientId:
          type: string
          description: Unique identifier of the client.
        clientSecret:
          type: string
          description: >-
            Secret key linked to the `clientId`, used for secure client
            authentication.
        createdAt:
          type: string
          format: date-time
          description: Timestamp marking when the application was created.
        description:
          description: >-
            A clear identifier that helps you quickly recognize who’s using the
            application.
          type: string
        id:
          type: string
          description: Unique identifier of the application.
        name:
          type: string
          description: The name of Lerian's application you’re granting access to.
          enum:
            - midaz
            - plugin-fees
            - plugin-crm
    ErrorMessage:
      description: The response message error.
      type: object
      properties:
        code:
          type: string
          description: A unique, stable identifier for the error.
        title:
          type: string
          description: A brief summary of the issue.
        message:
          type: string
          description: Detailed guidance for resolving the error.
  examples:
    Error0001:
      summary: Missing Fields in Request
      value:
        code: IDE-0001
        title: Missing Fields in Request
        message: Your request is missing one or more required fields.
    Error0002:
      summary: Invalid Field Type in Request
      value:
        code: IDE-0002
        title: Invalid Field Type in Request
        message: The provided field type in the request is invalid.
    Error0004:
      summary: Unexpected Fields in the Request
      value:
        code: IDE-0004
        title: Unexpected Fields in the Request
        message: >-
          The request body contains more fields than expected. Please send only
          the allowed fields.
    Error0007:
      summary: Bad Request
      value:
        code: IDE-0007
        title: Bad Request
        message: The server could not understand the request due to malformed syntax.
    Error0012:
      summary: Invalid Application Name
      value:
        code: IDE-0012
        title: Invalid Application Name
        message: The provided application name is invalid.
    Error0006:
      summary: Internal Server Error
      value:
        code: IDE-0006
        title: Internal Server Error
        message: The server encountered an unexpected error. Please try again later.
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: The authorization token in the 'Bearer <token>' format.

````