> ## 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 webhook

## Field support per integration

<AccordionGroup>
  <Note>
    The `callbackUrl` should be unique per end user to ensure that each received event can be clearly mapped back to the correct end user.
  </Note>

  <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>

    Supported Request Parameters:

    <ResponseField name="callbackUrl" type="string" required />

    <ResponseField name="resource" type="enum" required>
      Available options:
      `ACCOUNT`, `CREDIT_NOTE`, `CUSTOMER`, `DIMENSION`, `EXPENSE`, `INVOICE`, `ITEM`, `JOURNAL_ENTRY`, `OFFER`, `SALES_ORDER`, `SUPPLIER`
    </ResponseField>
  </Accordion>

  <Accordion title="Exact Online" icon="https://mintcdn.com/maesn/gCd41Ws3USFubam4/logo/exact.svg?fit=max&auto=format&n=gCd41Ws3USFubam4&q=85&s=afa1af7a261b22f843ac73ee60896ede" width="24" height="24" data-path="logo/exact.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.
    </Note>

    Supported Request Parameters:

    <ResponseField name="callbackUrl" type="string" required />

    <ResponseField name="resource" type="enum" required>
      Available options:
      `ACCOUNT`, `BANK_ACCOUNT`, `BILL`, `CONTACT`, `EXPENSE`, `INVOICE`, `JOURNAL_ENTRY`, `PAYMENT`
    </ResponseField>
  </Accordion>

  <Accordion title="FreshBooks" icon="https://mintcdn.com/maesn/gCd41Ws3USFubam4/logo/freshbooks.svg?fit=max&auto=format&n=gCd41Ws3USFubam4&q=85&s=5c854fbdda6618ad510ed264f6be68e6" width="24" height="24" data-path="logo/freshbooks.svg">
    <Note>
      Ensure that the query parameter `_companyId_` is correctly filled with the account ID associated with the contact.
      This value can be retrieved by using the `GET Companies` endpoint in the Authentication section. Use the returned `id` as the value for `_companyId_`.
    </Note>

    Supported Request Parameters:

    <ResponseField name="callbackUrl" type="string" required />

    <ResponseField name="eventType" type="enum" required>
      Available options:
      `CREATED`, `DELETED`, `UPDATED`
    </ResponseField>

    <ResponseField name="resource" type="enum" required>
      Available options:
      `ACCOUNT`, `CREDIT_NOTE`, `CUSTOMER`, `INVOICE`, `ITEM`, `PAYMENT`, `SUPPLIER`, `TAX_RATE`
    </ResponseField>
  </Accordion>

  <Accordion title="Lexware Office" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/lexoffice.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=efe4da1d7b59a552d1938ec981ccbc1e" width="24" height="24" data-path="logo/lexoffice.svg">
    Supported Request Parameters:

    <ResponseField name="callbackUrl" type="string" required />

    <ResponseField name="eventType" type="enum" required>
      Available options:
      `CREATED`, `DELETED`, `REVOKED`, `UPDATED`
    </ResponseField>

    <ResponseField name="resource" type="enum" required>
      Available options:
      `CUSTOMER`, `INVOICE`, `ITEM`, `PAYMENT`, `SUPPLIER`, `TOKEN`
    </ResponseField>
  </Accordion>

  <Accordion title="Moneybird" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/moneybird.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=4cf7d956fec579e320389df5b2a6c828" width="24" height="24" data-path="logo/moneybird.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.
    </Note>

    Supported Request Parameters:

    <ResponseField name="callbackUrl" type="string" required />

    <ResponseField name="eventType" type="enum" required>
      Available options:
      `CREATED`, `DELETED`, `UPDATED`
    </ResponseField>

    <ResponseField name="resource" type="enum" required>
      Available options:
      `CONTACT`, `INVOICE`, `PAYMENT`, `TAX_RATE`
    </ResponseField>
  </Accordion>

  <Accordion title="Qonto" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/qonto.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=61e31bd242bd814d5da2b64b610d6f64" href="/integrations/qonto" width="1100" height="1100" data-path="logo/qonto.svg">
    Supported Request Parameters:

    <ResponseField name="callbackUrl" type="string" required />

    <ResponseField name="resource" type="enum" required>
      Available options:
      `INVOICE`
    </ResponseField>
  </Accordion>

  <Accordion title="QuickBooks" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/quickbooks.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=7733377805a0f59c4cdada5817544447" width="24" height="24" data-path="logo/quickbooks.svg">
    Supported Request Parameters:

    <ResponseField name="callbackUrl" type="string" required />
  </Accordion>

  <Accordion title="weclapp" icon="https://mintcdn.com/maesn/gCd41Ws3USFubam4/logo/weclapp.svg?fit=max&auto=format&n=gCd41Ws3USFubam4&q=85&s=6a1eb194f06b8ed5c6ebec41766aff4a" width="24" height="24" data-path="logo/weclapp.svg">
    Supported Request Parameters:

    <ResponseField name="callbackUrl" type="string" required />

    <ResponseField name="eventType" type="enum">
      Available options:
      `CREATED`, `DELETED`, `UPDATED`
    </ResponseField>

    <ResponseField name="resource" type="enum">
      Available options:
      `CUSTOMER`, `CREDIT_NOTE`, `INVOICE`, `SALES_ORDER`, `SUPPLIER`
    </ResponseField>
  </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="callbackUrl" type="string" required />
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml post /webhooks
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:
  /webhooks:
    post:
      tags:
        - webhook
      operationId: createWebhook
      parameters:
        - name: X-API-KEY
          description: API key
          in: header
          schema:
            type: string
          required: true
        - name: X-ACCOUNT-KEY
          description: Account key
          in: header
          schema:
            type: string
          required: true
        - name: companyId
          required: false
          in: query
          schema:
            type: string
        - name: environmentName
          in: query
          schema:
            type: string
          required: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/WebhookResponseDtoWithSecret'
components:
  schemas:
    CreateWebhookRequestDto:
      type: object
      properties:
        callbackUrl:
          type: string
          example: https://example.com/webhook-endpoint/12345
        eventType:
          type: string
          enum:
            - ACCOUNT
            - BANK_ACCOUNT
            - BILL
            - CONTACT
            - CREDIT_NOTE
            - CUSTOMER
            - DIMENSION
            - EXPENSE
            - INVOICE
            - ITEM
            - JOURNAL_ENTRY
            - OFFER
            - PAYMENT
            - SALES_ORDER
            - SUPPLIER
            - TAX_RATE
            - TOKEN
        resource:
          type: string
          enum:
            - CREATED
            - DELETED
            - REVOKED
            - UPDATED
    BaseResponseDto:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/MetaResponse'
        data:
          oneOf:
            - type: object
            - type: array
    WebhookResponseDtoWithSecret:
      type: object
      properties:
        id:
          type: string
          example: 94fdb7fd-13ae-47a6-8a2a-000e6ddc60d9
        callbackUrl:
          type: string
          example: https://example.com/webhook-endpoint/12345
        createdDate:
          type: string
          example: '2025-06-01T00:00:00Z'
        expiresDate:
          type: string
          example: '2026-06-01T00:00:00Z'
        secret:
          type: string
          example: 0f9cfb7fe655d00547fa0720ed4fa1777d6ad1a8e3f94c3b16991e7ceaa5a59c
        updatedDate:
          type: string
          example: '2025-06-01T00:00:00Z'
    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

````