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

# Create journal entry attachment

## Field support per integration

<AccordionGroup>
  <Accordion title="Business Central" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/businesscentral.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=9cdc50aa9f467133e9e9372eab83f38b" width="24" height="24" data-path="logo/businesscentral.svg">
    <Note>
      If you're not using the [Interactive Authentication Flow](/authentication#interactive-authentication-flow), make sure the query parameters `environmentName` and `companyId` are correctly populated.
      You can obtain these values by using the `GET Environments` and `GET Companies` endpoints available under the Authentication section.
    </Note>

    <ResponseField name="file" type="File" required />
  </Accordion>

  <Accordion title="Sage Active" icon="https://mintcdn.com/maesn/gCd41Ws3USFubam4/logo/sageactive.svg?fit=max&auto=format&n=gCd41Ws3USFubam4&q=85&s=db4ef71b40820611bd17295476ff28f9" width="24" height="24" data-path="logo/sageactive.svg">
    <Note>
      If you're not using the [Interactive Authentication Flow](/authentication#interactive-authentication-flow), make sure the query parameter `companyId` is correctly populated.
      You can obtain this value by using the `GET Companies` endpoint available under the Authentication section. Please use the id field as the companyId.
    </Note>

    Supported Request Parameters:

    <ResponseField name="file" type="File" required />
  </Accordion>

  <Accordion title="Xero" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/xero.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=4496b21aab750469b3d5e96a1588d9f0" width="45" height="46" data-path="logo/xero.svg">
    Supported Request Parameters:

    <ResponseField name="file" type="File" required />
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml POST /accounting/journalEntries/{journalEntryId}/Attachments
openapi: 3.0.0
info:
  title: Maesn unified API
  description: The Maesn unified API description
  version: '1.0'
  contact: {}
servers:
  - url: https://api.maesn.dev
security: []
tags:
  - name: maesn
    description: ''
paths:
  /accounting/journalEntries/{journalEntryId}/Attachments:
    post:
      tags:
        - accounting
      operationId: create JournalEntry Attachment
      parameters:
        - name: companyId
          required: false
          in: query
          schema:
            type: string
        - name: environmentName
          in: query
          schema:
            type: string
          required: false
        - name: journalEntryId
          required: true
          in: path
          schema:
            type: string
        - name: X-API-KEY
          description: API key
          in: header
          schema:
            type: string
            example: example value
          required: true
        - name: X-ACCOUNT-KEY
          description: Account key
          in: header
          schema:
            type: string
            example: example value
          required: true
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateAttachmentRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponseDto'
                  - properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/DocumentResponseDto'
components:
  schemas:
    CreateAttachmentRequestDto:
      type: object
      properties:
        file:
          type: string
          format: binary
      required:
        - file
    BaseResponseDto:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/MetaResponse'
        data:
          oneOf:
            - type: object
            - type: array
    DocumentResponseDto:
      type: object
      properties:
        id:
          type: string
          example: document id
        base64Encoded:
          type: boolean
          example: true
        content:
          type: string
          example: content
        contentType:
          type: string
          example: application/pdf
        fileName:
          type: string
          example: invoice.pdf
    MetaResponse:
      type: object
      properties:
        warnings:
          type: array
          items:
            type: string
            example: Field not used by target system
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
    PaginationResponse:
      type: object
      properties:
        total:
          type: number
          example: 125
        perPage:
          type: number
          example: 50
        currentPage:
          type: number
          example: 1
        totalPages:
          type: number
          example: 3

````