Skip to content
Mapyra, home Start free

Mapyra API and webhooks for developers

Last updated November 11, 2026. Versão em português.

Mapyra's public API and webhooks are part of the Business plan. With them, another system lists, reads, creates and edits boards, comments, looks up folders and gets notified when something changes. This page has what you need to get started. The full contract, with every field, is in the OpenAPI specification: mapyra.pro/api/v1/openapi.json. Field names and error codes are in Portuguese.

Create the key

  1. The company admin opens My keys (MCP) in the app and goes to the API keys section.
  2. Give it a name, choose the scopes and the validity (1 to 365 days) and, if you want, limit the key to some folders.
  3. The key starts with fma_ and shows only once. Keep it in a secrets vault. Mapyra stores only a hash of it and cannot show it again.
  4. To rotate a key, create a new one, update your system and revoke the old one on the same screen.

Scopes: quadros:ler (read boards), quadros:escrever (write boards), comentarios:ler, comentarios:escrever (read and write comments), pastas:ler (read folders) and webhooks:gerir (manage webhooks). The key acts on behalf of whoever created it: it only reaches the boards that person reaches, inside the company and the chosen folders. It never archives, deletes, moves or shares boards.

Authentication

Every call carries the key in the Authorization header. The base address is https://mapyra.pro/api/v1. Responses are JSON.

curl https://mapyra.pro/api/v1/quadros \
  -H "Authorization: Bearer $MAPYRA_KEY"

Never put the key in browser code or in a repository. Use an environment variable or a secrets vault on the server.

Examples

List boards

Optional filters: tipo (funil for funnel or mapa for mind map), pasta (folder id), limite (1 to 200, default 50) and cursor. The response has dados (data) and proximo_cursor (next cursor, null on the last page).

curl "https://mapyra.pro/api/v1/quadros?tipo=funil&limite=20" \
  -H "Authorization: Bearer $MAPYRA_KEY"

Read a board and export its content

curl https://mapyra.pro/api/v1/quadros/BOARD_ID \
  -H "Authorization: Bearer $MAPYRA_KEY"

curl "https://mapyra.pro/api/v1/quadros/BOARD_ID/conteudo?formato=markdown" \
  -H "Authorization: Bearer $MAPYRA_KEY"

formato accepts markdown (with the diagram in Mermaid) or json.

Create a board

curl -X POST https://mapyra.pro/api/v1/quadros \
  -H "Authorization: Bearer $MAPYRA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tipo": "funil",
    "nome": "Launch funnel",
    "pecas": [
      { "ref": "ad", "tipo": "meta-ads", "nome": "Ad" },
      { "ref": "page", "tipo": "pg-captura", "nome": "Opt-in page" }
    ],
    "setas": [ { "de": "ad", "para": "page" } ]
  }'

For a mind map, use "tipo": "mapa" with raiz (root) and topicos (topics). The accepted piece types are in the OpenAPI. If the key is limited to folders, send pasta_id.

Edit pieces in a batch

A batch of up to 200 operations is applied at once: either everything goes in, or nothing changes.

curl -X POST https://mapyra.pro/api/v1/quadros/BOARD_ID/operacoes \
  -H "Authorization: Bearer $MAPYRA_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "operacoes": [ { "op": "editar_peca", "id": "PIECE_ID", "status": "no-ar" } ] }'

Board operations: adicionar_peca, editar_peca, remover_peca, adicionar_seta, editar_seta, remover_seta, adicionar_tabela, editar_tabela and adicionar_moldura (add, edit and remove pieces and arrows, add and edit tables, add a frame). Mind map operations: adicionar, editar and remover.

Rename and comment

curl -X PATCH https://mapyra.pro/api/v1/quadros/BOARD_ID \
  -H "Authorization: Bearer $MAPYRA_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "nome": "Launch funnel (v2)" }'

curl -X POST https://mapyra.pro/api/v1/quadros/BOARD_ID/comentarios \
  -H "Authorization: Bearer $MAPYRA_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "no_id": "PIECE_ID", "texto": "Review the offer" }'

All routes

  • GET /quadros, GET /quadros/{id}, GET /quadros/{id}/conteudo (scope quadros:ler)
  • POST /quadros, PATCH /quadros/{id}, POST /quadros/{id}/operacoes (scope quadros:escrever)
  • GET /quadros/{id}/comentarios (comentarios:ler) and POST /quadros/{id}/comentarios (comentarios:escrever)
  • GET /pastas (pastas:ler)
  • GET /webhooks, POST /webhooks, DELETE /webhooks/{id}, POST /webhooks/{id}/testar, GET /webhooks/{id}/entregas and POST /entregas/{id}/reenviar (webhooks:gerir)
  • GET /openapi.json (public, no key)

Limits

  • 120 calls per minute per key. Every response has RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. Above the limit, the response is 429 with Retry-After.
  • 100 thousand calls per month per company, adding up all keys. Calls refused for a missing key, scope or access do not count.
  • 20 active keys and 20 webhooks per company.
  • Need more? Write to contato@mapyra.pro.

Errors

Errors come as JSON with erro (message, in Portuguese) and, when there is one, codigo (code).

  • 400: invalid body or parameter (the message says which field).
  • 401 NAO_AUTENTICADO: key missing, invalid, expired or revoked. Many invalid attempts in a row from the same address lead to 429 for one minute.
  • 402 RECURSO_DO_PLANO: the company is not on the Business plan. LIMITE_API: the monthly quota is used up.
  • 403 ESCOPO_INSUFICIENTE: the key lacks the scope. PASTA_OBRIGATORIA: the key is limited to folders and the request did not send one. It also shows when whoever created the key lacks the access level the request needs on the board.
  • 404: the board, folder or route does not exist or is out of the key's reach. For safety, Mapyra does not tell the two cases apart.
  • 422: the mind map tree went over the size or depth limits.
  • 429 LIMITE_TAXA: wait for the Retry-After time and try again.

Webhooks

A webhook tells your system when a board is created, changed (at most one notice per minute per board), archived or deleted, or when a comment arrives. Set it up on the My keys (MCP) screen, Webhooks section, or through the API with the webhooks:gerir scope. The address must be https.

curl -X POST https://mapyra.pro/api/v1/webhooks \
  -H "Authorization: Bearer $MAPYRA_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://your-system.example/mapyra", "eventos": ["quadro.criado", "comentario.criado"] }'

The response carries the signing secret (segredo) only once. Events: quadro.criado (board created), quadro.alterado (board changed), quadro.apagado (board archived or deleted) and comentario.criado (comment created).

Each delivery is a JSON POST with the headers Mapyra-Evento (event), Mapyra-Entrega (delivery id, useful to ignore repeats) and Mapyra-Assinatura (signature). The body carries only metadata (event, date, company and board, with a link); fetch the board content through the API. Answer with a 2xx status within 10 seconds. If it fails, Mapyra tries up to 8 times, with growing intervals.

Verify the signature

The header looks like t=1762800000,v1=<hex>. v1 is the HMAC SHA-256, in hex, of t + "." + body, using the webhook secret. To verify: compute the HMAC over the body exactly as it arrived (before parsing the JSON), compare in constant time and reject it if t is more than 5 minutes away from the current clock.

Node.js:

import { createHmac, timingSafeEqual } from 'node:crypto';

export function validSignature(secret, header, rawBody) {
  const m = /^t=(\d+),v1=([0-9a-f]{64})$/.exec(header ?? '');
  if (!m) return false;
  const t = Number(m[1]);
  if (Math.abs(Date.now() / 1000 - t) > 300) return false;
  const expected = createHmac('sha256', secret).update(m[1] + '.' + rawBody).digest();
  const received = Buffer.from(m[2], 'hex');
  return received.length === expected.length && timingSafeEqual(received, expected);
}

Python:

import hashlib, hmac, re, time

def valid_signature(secret: str, header: str, raw_body: bytes) -> bool:
    m = re.fullmatch(r"t=(\d+),v1=([0-9a-f]{64})", header or "")
    if not m:
        return False
    if abs(time.time() - int(m.group(1))) > 300:
        return False
    expected = hmac.new(secret.encode(), m.group(1).encode() + b"." + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, m.group(2))

Use Enviar teste (send test) on the webhooks screen (or POST /webhooks/{id}/testar) to get a sample event and check your verification.

Need another integration?

If what you need does not fit the API, we build the integration on demand. Questions about the API: contato@mapyra.pro.

Create free account