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

> ## Agent Instructions
> Melso MCP: https://mcp.melso.ai/mcp (OAuth; one company per connection). Documentation-search MCP: https://docs.melso.ai/mcp; it does not act on customer accounts. Melso API: https://api.melso.ai/v1, with a company API key or a partner key (early access); invoicing is live and the other operations are marked beta.
>
> Use the live tool list and respect company membership. Ask the person to approve the exact invoice or tax return version in the signed-in app. Melso's professionals prepare and file included returns after approval; an AI assistant does not file. A prepared file or an approval is not evidence of filing: only the AEAT's reference and receipt are. Keep credentials out of chat and logs.

# Incorporate an S.L.

> Asks Melso's team to incorporate a new S.L., with the owner as its sole partner.

> [!NOTE]
>
> **Early access.** Your firm's owner or an admin creates partner keys in **Settings** › **Developers**. See [Partner API](https://docs.melso.ai/api/partner/overview.md).

Permission: `incorporations:write`. Send an `Idempotency-Key`. The answer is `202` with the incorporation, `requested`. Melso's team writes to `owner.email` for what needs the owner: the name certificate, the bank deposit of the share capital and signing the deed before a notary. Once the business has its NIF, the incorporation is `completed` and `company_id` names its new company: from then on, call the Melso API with it. Follow it with Get an incorporation.

A business that already has its NIF does not need this: use Create a company.


## OpenAPI

````yaml api/partner-openapi.yaml POST /partner/incorporations/sl
openapi: 3.1.0
info:
  title: Melso Partner API
  version: 0.3.0-early-access
  summary: Open Melso companies for your customers and follow every change.
  description: |
    Early access. Your platform is a firm in Melso, and each customer business
    you serve is a company of that firm. The Partner API has only what is
    partner-specific: open the Melso account of a business that has its NIF,
    ask Melso's team to incorporate an S.L. or register a self-employed
    person, and receive webhooks for every change. Everything else, from the
    fiscal profile to books, taxes and payroll, is the Melso API, called with
    your partner key and the company's `id`. The firm's owner or an admin
    creates partner keys in Settings › Developers.
  contact:
    name: Melso
    email: hello@melso.ai
    url: https://docs.melso.ai/api/partner/overview
servers:
  - url: https://api.melso.ai/v1
security:
  - partnerApiKey: []
tags:
  - name: Companies
    description: The Melso account of a business that already has its NIF.
  - name: Incorporations
    description: >-
      Melso's team incorporates a new S.L. or registers a new self-employed
      person.
  - name: Webhooks
    description: >-
      Endpoints of yours that receive an event when something changes in a
      company of your firm.
  - name: Events
    description: >-
      Everything that changed in your firm's companies in the last 30 days, to
      replay and reconcile.
paths:
  /partner/incorporations/sl:
    post:
      tags:
        - Incorporations
      summary: Incorporate an S.L.
      description: >
        Asks Melso's team to incorporate a new S.L., with the owner as its sole
        partner.


        Permission: `incorporations:write`. Send an `Idempotency-Key`. The
        answer is `202` with the incorporation, `requested`. Melso's team writes
        to `owner.email` for what needs the owner: the name certificate, the
        bank deposit of the share capital and signing the deed before a notary.
        Once the business has its NIF, the incorporation is `completed` and
        `company_id` names its new company: from then on, call the Melso API
        with it. Follow it with Get an incorporation.


        A business that already has its NIF does not need this: use Create a
        company.
      operationId: createPartnerSlIncorporation
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SlIncorporationInput'
            example:
              external_id: ws_48215
              owner:
                name: Lucía Martín Pérez
                email: lucia@example.com
                tax_id: 00000000T
              activity: Restaurante de cocina mediterránea
              proposed_names:
                - Brasa Sur
                - Brasa Sur Mediterránea
              share_capital: '3000.00'
              postal_code: '08018'
      responses:
        '202':
          description: The incorporation, `requested`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Incorporation'
              example:
                id: 7c6b5a4d-3e2f-4a1b-9c8d-7e6f5a4b3c2d
                external_id: ws_48215
                type: sl
                status: requested
                owner:
                  name: Lucía Martín Pérez
                  email: lucia@example.com
                  tax_id: 00000000T
                activity: Restaurante de cocina mediterránea
                proposed_names:
                  - Brasa Sur
                  - Brasa Sur Mediterránea
                company_id: null
                created_at: '2026-12-01T09:30:00Z'
                updated_at: '2026-12-01T09:30:00Z'
                completed_at: null
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/IdempotencyKeyReused'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      description: >-
        A unique key of yours, up to 255 characters. A retry with the same key
        and body gets the first answer again for 24 hours.
      schema:
        type: string
        maxLength: 255
  schemas:
    SlIncorporationInput:
      type: object
      required:
        - owner
        - activity
      additionalProperties: false
      properties:
        external_id:
          type: string
          maxLength: 200
          description: Your own ID for this customer
          unique in your firm.: null
        owner:
          $ref: '#/components/schemas/Owner'
        activity:
          type: string
          description: >-
            What the company will do, in a sentence. Melso picks the IAE heading
            from it.
        proposed_names:
          type: array
          minItems: 1
          maxItems: 5
          items:
            type: string
          description: >-
            Up to five names, in order of preference, for the name certificate
            of the Registro Mercantil Central.
        share_capital:
          type: string
          description: The share capital in euros, such as `"3000.00"`. At least `"1.00"`.
        postal_code:
          type: string
          description: The postal code of the registered office. Sets its tax territory.
    Incorporation:
      type: object
      required:
        - id
        - type
        - status
        - owner
        - company_id
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        external_id:
          type:
            - string
            - 'null'
        type:
          type: string
          enum:
            - sl
            - autonomo
          description: >-
            `sl` for an S.L. incorporation, `autonomo` for a self-employed
            registration.
        status:
          type: string
          enum:
            - requested
            - in_progress
            - completed
            - cancelled
          description: >-
            `requested` until Melso's team takes it, `in_progress` while it
            works with the owner, `completed` once the business has its NIF,
            `cancelled` if it stopped.
        owner:
          $ref: '#/components/schemas/Owner'
        activity:
          type: string
        proposed_names:
          type: array
          items:
            type: string
          description: S.L. only.
        company_id:
          type:
            - string
            - 'null'
          format: uuid
          description: The company Melso created, once `completed`. Null before.
        action_required:
          type:
            - string
            - 'null'
          enum:
            - identity_verification
            - documents
            - bank_deposit
            - notary_signature
            - null
          description: What Melso's team waits for from the owner, if anything. Beta.
        identity_verifications:
          type: array
          items:
            $ref: '#/components/schemas/IdentityVerification'
          description: >-
            Each person who must verify their identity, and how far they got.
            Beta.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
    Owner:
      type: object
      required:
        - name
        - email
        - tax_id
      additionalProperties: false
      properties:
        name:
          type: string
          description: Full name, as on the DNI or NIE.
        email:
          type: string
          format: email
          description: Melso's team writes here for what needs the owner.
        tax_id:
          type: string
          description: The owner's DNI or NIE.
        phone:
          type: string
    IdentityVerification:
      type: object
      required:
        - tax_id
        - name
        - status
      properties:
        id:
          type:
            - string
            - 'null'
          description: Null until a verification is created.
        tax_id:
          type: string
        name:
          type: string
        status:
          type: string
          enum:
            - not_started
            - in_progress
            - in_review
            - approved
            - declined
            - abandoned
            - expired
        url:
          type:
            - string
            - 'null'
          description: Only in the answer that creates it.
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
    Error:
      type: object
      required:
        - error
        - code
        - request_id
      properties:
        error:
          type: string
          description: What went wrong
          for a person to read.: null
        code:
          type: string
          description: A stable code to branch on.
        field:
          type: string
          description: The field at fault
          when there is one.: null
        permission:
          type: string
          description: With `missing_permission`, the permission the key needs.
        request_id:
          type: string
  responses:
    BadRequest:
      description: The request is malformed or a field is invalid; `field` names it.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: The key is missing, revoked or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The key lacks the permission named in `permission`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: >-
        A conflict, such as a NIF already in your firm or a changed `version`.
        Read again and retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    IdempotencyKeyReused:
      description: This `Idempotency-Key` was sent with another request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Over 600 requests a minute for this key. Wait `Retry-After` seconds.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    partnerApiKey:
      type: http
      scheme: bearer
      description: >
        A partner key of your firm, `mk_live_…`, which reaches every company of

        the firm. Each key carries the permissions chosen when it was created.

        Keep it on your servers. See
        [Authentication](/api/partner/authentication).

````

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