Mynto Webhooks API

The Webhooks API from Mynto — 3 operation(s) for webhooks.

GitHub OpenAPI

Operations 4

GET /v1/companies/{companyID}/webhooks ListSubscriptions returns the company's webhook subscriptions #
POST /v1/companies/{companyID}/webhooks CreateSubscription registers an endpoint to receive events #
DELETE /v1/companies/{companyID}/webhooks/{subID} DeleteSubscription removes a subscription and its delivery history #
GET /v1/companies/{companyID}/webhooks/{subID}/deliveries ListDeliveries is the delivery log for a subscription #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/mynto-no:mynto-no-webhooks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

mynto-no-webhooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mynto Webhooks API
  version: '1'
  description: 'The Mynto API lets you read and write a Norwegian company''s accounting data:

    receipts, bank transactions, the ledger, invoices and customers. ## Authentication


    Every request carries a bearer token:


    Authorization: Bearer mynto_sk_…


    There are two kinds of credential:


    - **Personal API key** (`mynto_sk_…`) — for connecting your own system. Created

    in Mynto under Settings → API, locked to one company. This is the fastest way

    to get started, and you do not need to build an app. - **OAuth 2.1 access token** (`mynto_at_…`) — for an app used by *other*

    companies. The user approves your app in a consent screen and picks which

    company it may act on. See the OAuth guide. ## Scopes


    A credential may only do what it was granted. Scopes are `resource:action`, e.g. `faktura:les` (read invoices) or `regnskap:skriv` (post to the ledger). A request

    without the required scope is refused with `permission_denied`. Scopes never *widen* what the underlying user may do — they only narrow it. An app

    granted `faktura:skriv` on behalf of a read-only user still cannot write. Scopes that move money or file with the government (`betaling:skriv`,

    `lonn:kjor`, `mva:innsend`, …) are **sensitive**: they cannot be granted to a

    personal API key at all, and an app needs review to request them. The live catalogue is at `GET /platform/scopes`. ## Money


    All amounts are integers in **minor units** (øre). `12500` is 125,00 kr. There

    are no floats in this API — a rounding error in an accounting system is not a bug

    you find later, it is a bug an auditor finds later. ## VAT (MVA)


    **A company outside the Norwegian VAT register always gets 0 VAT, whatever

    `vatRate` you send.** This is not your bug and it is not us ignoring you: a

    company that is not VAT-registered may not charge VAT, and an invoice that did

    would be illegal. We refuse to produce one, so an integration cannot make a

    customer break the law by accident. If you send `vatRate: 25` and get `vatMinor: 0` back, check whether the company

    is VAT-registered. It becomes registered automatically once it passes the

    threshold, and invoices issued after that carry VAT normally. For a registered company, `vatRate` is the MVA percentage: 0, 12, 15 or 25. Omit

    it to default to 25. ## Pagination


    List endpoints take `?limit` (max 200) and `?offset`, and return a `total`. Check `total` before concluding something does not exist. ## Webhooks


    Subscribe an HTTPS endpoint and we POST events to it as they happen, so you do not

    have to poll. Requires the `webhook:abonner` scope. **Verify the signature.** Every delivery carries:


    Mynto-Event: invoice.sent

    Mynto-Event-Id: evt_9f2c…

    Mynto-Signature: t=1752490000,v1=6b3a…


    `v1` is HMAC-SHA256 of `"{t}.{raw_body}"`, keyed with the subscription secret we

    returned once at creation. Verify against the **raw body**, before any JSON

    parsing — re-serialising the JSON will change the bytes and the signature will

    not match. The timestamp is inside the signed material, so a captured delivery cannot be

    replayed later. Reject anything older than your tolerance (5 minutes is typical). ```python

    expected = hmac.new(secret, f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()

    if not hmac.compare_digest(expected, v1):

    return 401

    ```


    **Delivery is at-least-once.** You *will* eventually receive the same event twice —

    a retry after a timeout you actually processed, for example. Deduplicate on

    `Mynto-Event-Id`. An integration that assumes exactly-once will double-book

    something; this is not hypothetical. **Respond 2xx quickly.** Anything else is a failure. We retry with exponential

    backoff (~1m, 2m, 4m, 8m, 16m) and then dead-letter the event. An endpoint that

    fails persistently is auto-disabled — check `disabledReason` on the subscription. Do your real work asynchronously and acknowledge immediately. Inspect what we actually sent, and why it failed, at

    `GET /v1/companies/{companyID}/webhooks/{subID}/deliveries`.'
servers:
- url: https://production-mynto-ukmi.encr.app
  description: Production — real accounting data
security:
- bearerAuth: []
tags:
- name: Webhooks
paths:
  /v1/companies/{companyID}/webhooks:
    get:
      operationId: GET:webhooks.ListSubscriptions
      parameters:
      - allowEmptyValue: true
        explode: false
        in: path
        name: companyID
        required: true
        schema:
          format: int64
          type: integer
        style: simple
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  availableEventTypes:
                    description: 'subscribe to without a second call or a hardcoded list that goes stale.

                      '
                    items:
                      type: string
                    title: 'EventTypes is the full catalogue, so a client can discover what it may

                      '
                    type: array
                  subscriptions:
                    items:
                      $ref: '#/components/schemas/webhooks.Subscription'
                    type: array
                required:
                - subscriptions
                - availableEventTypes
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
      summary: ListSubscriptions returns the company's webhook subscriptions
      tags:
      - Webhooks
    post:
      operationId: POST:webhooks.CreateSubscription
      parameters:
      - allowEmptyValue: true
        explode: false
        in: path
        name: companyID
        required: true
        schema:
          format: int64
          type: integer
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              properties:
                eventTypes:
                  items:
                    type: string
                  type: array
                url:
                  type: string
              required:
              - url
              - eventTypes
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  active:
                    type: boolean
                  createdAt:
                    type: string
                  eventTypes:
                    items:
                      type: string
                    type: array
                  id:
                    format: int64
                    type: integer
                  secret:
                    title: 'Secret signs every delivery. Returned exactly once — store it now.

                      '
                    type: string
                  url:
                    type: string
                required:
                - id
                - url
                - eventTypes
                - active
                - createdAt
                - secret
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
      summary: CreateSubscription registers an endpoint to receive events
      tags:
      - Webhooks
  /v1/companies/{companyID}/webhooks/{subID}:
    delete:
      operationId: DELETE:webhooks.DeleteSubscription
      parameters:
      - allowEmptyValue: true
        explode: false
        in: path
        name: companyID
        required: true
        schema:
          format: int64
          type: integer
        style: simple
      - allowEmptyValue: true
        explode: false
        in: path
        name: subID
        required: true
        schema:
          format: int64
          type: integer
        style: simple
      responses:
        '200':
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
      summary: DeleteSubscription removes a subscription and its delivery history
      tags:
      - Webhooks
  /v1/companies/{companyID}/webhooks/{subID}/deliveries:
    get:
      description: 'This exists so a partner can debug their own integration without asking us. Every webhook system that lacks it generates the same support ticket forever: "are you sending events? I''m not getting them."'
      operationId: GET:webhooks.ListDeliveries
      parameters:
      - allowEmptyValue: true
        explode: false
        in: path
        name: companyID
        required: true
        schema:
          format: int64
          type: integer
        style: simple
      - allowEmptyValue: true
        explode: false
        in: path
        name: subID
        required: true
        schema:
          format: int64
          type: integer
        style: simple
      - allowEmptyValue: true
        explode: true
        in: query
        name: limit
        required: true
        schema:
          format: int64
          type: integer
        style: form
      - allowEmptyValue: true
        explode: true
        in: query
        name: offset
        required: true
        schema:
          format: int64
          type: integer
        style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  deliveries:
                    items:
                      $ref: '#/components/schemas/webhooks.Delivery'
                    type: array
                  total:
                    format: int64
                    type: integer
                required:
                - deliveries
                - total
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
      summary: ListDeliveries is the delivery log for a subscription
      tags:
      - Webhooks
components:
  schemas:
    webhooks.Subscription:
      properties:
        active:
          type: boolean
        createdAt:
          type: string
        disabledReason:
          description: 'hidden: "my webhooks stopped and I don''t know why" is the single most common integration support ticket in this category, and it is entirely avoidable.

            '
          title: 'DisabledReason explains an auto-disabled subscription. Surfaced rather than

            '
          type: string
        eventTypes:
          items:
            type: string
          type: array
        id:
          format: int64
          type: integer
        url:
          type: string
      required:
      - id
      - url
      - eventTypes
      - active
      - disabledReason
      - createdAt
      type: object
    webhooks.Delivery:
      properties:
        attempts:
          format: int64
          type: integer
        createdAt:
          type: string
        eventId:
          type: string
        eventType:
          type: string
        id:
          format: int64
          type: integer
        lastError:
          type: string
        lastStatus:
          format: int64
          type: integer
        status:
          title: 'Status: pending | sending | delivered | failed

            '
          type: string
      required:
      - id
      - eventType
      - eventId
      - status
      - attempts
      - lastStatus
      - lastError
      - createdAt
      title: 'Delivery is one attempt to deliver one event, as shown in the log.

        '
      type: object
  responses:
    APIError:
      content:
        application/json:
          schema:
            externalDocs:
              url: https://pkg.go.dev/encore.dev/beta/errs#Error
            properties:
              code:
                description: Error code
                example: not_found
                externalDocs:
                  url: https://pkg.go.dev/encore.dev/beta/errs#ErrCode
                type: string
              details:
                description: Error details
                type: object
              message:
                description: Error message
                type: string
            title: APIError
            type: object
      description: Error response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A personal API key (mynto_sk_…) or an OAuth 2.1 access token (mynto_at_…).