# Webhooks

> Canonical URL: https://docs.mountaya.com/en/changelog/2026-11-18/
> Last updated: 2026-11-27
> Rules for agents: https://docs.mountaya.com/llms.txt#rules-for-agents

Contract v0.8.0: every change in an organization is a signed webhook event you subscribe to, replay and redeliver, members choose their notification emails, every ceiling answers `429`, and maps show restricted roads.

Released: 2026-11-18 · Version: 2026-11-18 · Products: Map Studio API, Map Studio, Map Publishing, Data API, MCP server, Documentation, SDK, Tile API

- **Breaking** (Map Studio API, Map Studio): Every ceiling is refused with a `429` coded `LIMIT_REACHED` and no `Retry-After`, since no wait lifts it: `postItineraryPublication` at `published-itineraries`, `postZonePublication` at `published-zones` and `postOrganizationInvitation` at `seats`, each a `402` before, and `postOrganizationInvitation` at `pending-invitations` and `postItinerary`, `postItineraryImport`, `postItineraryPreview` and `postItineraryDuplicate` at `personal-itineraries`, each a `403` before. `extensions.metadata` still names the ceiling with `limit`, `allowed` and `used`, and a `402` is only a product the organization does not hold or its billing. A ceiling's refusal is not kept for its `Idempotency-Key`, so the same request sent again with its key runs once a place is free. Tell a ceiling from a rate limit by its code, never by the missing `Retry-After`.
- **Breaking** (Map Studio API, Map Publishing): An organization lists as many allowed domains as its agreement allows, 1 unless it says otherwise, any number, none included, or no limit. `patchOrganizationSettings` refuses a list that would hold more, and more than it holds, with a `429` coded `LIMIT_REACHED` at the new `allowed-domains` limit, and a list over a lowered limit is kept and may be edited or emptied. The fixed bound of 30 entries is gone: one list holds 100 at most.
- **Breaking** (Map Studio API, Data API, MCP server, Map Studio): Only road cycling among the cycling activities. `gravel-bike` and `mountain-bike`, `GRAVEL_BIKE` and `MOUNTAIN_BIKE` in the Data API, are unavailable: `getActivities` does not list them, so the Map Studio offers neither, every Data API query refuses them with `VALIDATION_FAILED` at `["input", "activity"]`, `analyzeGeometry` included, and an itinerary can no longer be created or imported with either. The enum members stay. `road-cycling` routes on the paved network, with surface analysis.
- **Breaking** (Map Studio API, Map Studio): Names, labels, colors and the other text a field trims lose their control characters and the invisible characters at their ends, and are stored in Unicode NFC, so one name typed two ways is one name. A name holding nothing to read is a `400`, and a description holding a NUL is a `400` rather than a `500`. A name is a single line: an organization's, a collection's, a zone's, a key's, an itinerary's or one of its parts' holding a tab or a line break inside it is a `400`, and the import preview proposes on one line a name its file wraps over several.
- **Added** (Map Studio API): Every change Mountaya keeps in an organization is recorded as a webhook event. The contract's `webhooks` lists the 78 public types, each with its payload and an example, and `getWebhookEventTypes`, at `/v1/webhook-event-types`, lists them with their families. An event is the envelope `WebhookEvent`: `id`, `type`, `api_version`, `created_at`, `organization_id`, `task`, `related_object`, `data`, `request` and `actor`. Its `data.object` is a lean object of the resource: identifiers, bounded figures and a `version` where the resource has one, never geometry, a file or a credential. Every `id` is a time-ordered UUIDv7. A resource's `version` grows with every change, its delete included, so apply an event only when its `version` is newer.
- **Added** (Map Studio API): Every write names the task it runs in `x-task`. `tasks.yaml` defines the 88 tasks once: what triggers each, an operation, a change made in the app, a schedule or the payment provider's report, and the event types it records, with when. A change that changes nothing records nothing.
- **Added** (Map Studio API, Map Studio): `getOrganizationWebhookEndpoints`, `postOrganizationWebhookEndpoint`, `getOrganizationWebhookEndpoint`, `patchOrganizationWebhookEndpoint` and `deleteOrganizationWebhookEndpoint`, under `/v1/organizations/{organization_id}/webhook-endpoints`, manage where an organization's events are sent. They take the `management` scope and act for an owner or an admin. An organization holds 2 endpoints unless its agreement says otherwise, 6 at most: one more is a `429` coded `LIMIT_REACHED` at the new `webhook-endpoints` limit. The create answers the signing secret, `whsk_` and 64 hexadecimal digits, once. A create repeated with its `Idempotency-Key` whose answer cannot be given again names the endpoint it made at `extensions.metadata.location`. An owner or an admin reveals it again, and rotates it, on the endpoint's page in the app. The writes share a limit of 30 a minute per user and 300 per organization. `WebhookEndpoint` carries an `etag`, which its health never moves.
- **Added** (Map Studio API): An event is posted to every endpoint subscribed to its type, to its family (`itinerary.*`) or to `*`. The request is signed in `Mountaya-Signature`, `t=<unix>,v1=<hex HMAC-SHA256 of "t.body">`, with one `v1` per secret in force during a rotation, and carries `Mountaya-Event-Id`, `Mountaya-Event-Type` and `Mountaya-Delivery-Attempt`. An attempt waits 10 seconds for a `2xx` and follows no redirect. A failed delivery is retried for about 72 hours. An endpoint whose deliveries have all failed for 24 hours is reported failing, and is disabled after 72 hours. Delivery is at least once and in no guaranteed order: deduplicate on `id`.
- **Added** (Map Studio API): `getOrganizationWebhookEvents` and `getOrganizationWebhookEvent`, under `/v1/organizations/{organization_id}/webhook-events`, read every public event of the last 13 months, whether or not an endpoint received it. `getOrganizationWebhookDeliveries` and `getOrganizationWebhookDelivery`, under `webhook-deliveries`, read every delivery with its attempts, to an endpoint or as a notification email. `getOrganizationWebhookHealth`, at `webhook-health`, reports the reliability of the organization's webhooks or of one endpoint, Mountaya's own availability apart from each endpoint's success rate.
- **Added** (Map Studio API): `postOrganizationWebhookDelivery` resends one event to an endpoint, sends it a test event, or redelivers every event recorded since an instant, 30 days back at most. It answers `202` with a `WebhookDeliveryTrigger`. One redelivery runs at a time for an endpoint: another asked meanwhile is a `409` coded `REDELIVERY_IN_PROGRESS`. `REDELIVERY_IN_PROGRESS` and `SECRET_ROTATION_IN_OVERLAP` join the codes a `409` carries. The triggers are limited to 30 a minute per user and 300 per organization, a redelivery to 10 an hour per user and 30 per organization besides.
- **Added** (Map Studio API, Map Studio): Mountaya emails an organization's members about what happens in it: an invitation, a change of their role, their removal, a deleted collection, and a webhook endpoint failing or disabled. `getMyOrganizationNotificationPreferences` and `patchMyOrganizationNotificationPreferences`, at `/v1/me/organizations/{organization_id}/notification-preferences`, read and set which of them the acting user receives. The emails about a member's own access are always sent, and naming one in the update is a `400`.
- **Added** (Map Studio): An organization's owners and admins manage its endpoints on the Webhooks page of the app, where they read its health, every event recorded and every delivery made, notification emails included. Each member chooses their emails on the organization's Notifications page.
- **Added** (Documentation): The docs gain a Webhooks section: guides to endpoints, signatures, delivery, recovery and testing, and a reference page per event family that lists each type's payload, an example and the operations that trigger it.
- **Added** (SDK): `@mountaya/client` verifies a webhook delivery: `constructWebhookEvent` checks its `Mountaya-Signature` and its timestamp, then answers the event narrowed by its `type`. A delivery it cannot trust throws `MountayaWebhookSignatureError`, whose `reason` says why. Its retries never repeat a `429` coded `LIMIT_REACHED`.
- **Changed** (Map Studio API, Map Studio): Imports and co-pilot runs are limited by what they weigh. Previews and imports may send the routing engine 4,000 requests a minute per user and 24,000 per organization, each charged what it really sent: a preview of a real recording, a few dozen. Each spends at most 120 of them analysing in parts the lines the engine could not analyse whole, so past them an import can leave stretches with an unknown surface, way type and difficulty. The bodies sent to start or feed a co-pilot run allow 8 MiB a minute per user and 80 MiB per organization. Past either, the answer is a `429` with `Retry-After`.
- **Changed** (Tile API): A zone in a tile is one feature per polygon, clipped exactly to a window two tiles before the tile and one past it rather than cut at its edge, however intricate the polygon. Zones no longer show seams or repeat their labels at tile edges. A feature can extend past the tile and is not the zone's whole outline. A zone stored before outlines were checked is approximated where a tile cuts it into many pieces until Mountaya has checked it, shortly after the release, and for good when its outline breaks a rule a write now holds it to: a valid polygon of at most 10,000 positions that no meridian or parallel crosses more than 512 times (a zone computed from a source was not held to the positions or the crossings before). A tile whose zones take too long to draw answers `504`.
- **Changed** (Map Studio API, Map Studio): A zone's outline must be a valid polygon, in degrees and once projected to Web Mercator, that no meridian and no parallel crosses more than 512 times. `postZone` and `patchZone` refuse any other with a `400` at `geojson.geometry`: too intricate, or a ring that crosses or touches itself, or a hole outside its shell. A computed area is held to the same rules, and refused at `source`. When the check cannot finish in time under load, the write answers `503` with `Retry-After` and writes nothing.
- **Changed** (Map Studio API): Exports and copies have limits of their own. `getItineraryExport` allows 60 a minute per client IP address under a key alone or a share token, and 60 a minute per user under a session token naming one, checked before the read limits. `postItineraryDuplicate` allows 30 a minute per user and 300 per organization, and refuses a source of more than 500,000 positions with a `413`.
- **Changed** (Map Studio API, Map Studio): The four event streams, `getAgentRunEvents`, `getItineraryEvents`, `getZoneEvents` and `getOrganizationEvents`, answer `503` with `Retry-After: 1`, within seconds, when their events or the caller's access cannot be reached for a moment: open the stream again from the last event received, and nothing is missed. The `presence.join` a member's first collaboration stream broadcasts reaches that stream too.
- **Changed** (Map Studio API, Map Studio): A segment deleted is reported as `itinerary.changed`, as a merged or split segment is, and `segment.changed` no longer carries `deleted`. A write that was made is announced even when its request then fails, with `revision` `0`: refetch on it, and never skip a frame because its revision is not above your copy's.
- **Changed** (Map Studio API, Map Studio): Every edit of a published itinerary's draft sets `has_unpublished_changes` and moves `updated_at`, a segment group change, a deleted waypoint and a deleted last segment included.
- **Changed** (Map Studio API, MCP server): Removing a member ends their MCP connectors only when they joined the organization signed in to the Mountaya app. A membership accepted under a publishable key ends none of the connectors they authorized for their other organizations.
- **Changed** (Map Studio API, Tile API): No Map Studio API operation answers `502`. `patchMyPreferences` answers a change it could not store with `500`, after trying once more, and `BadGatewayResponse` is gone from the contract and from `@mountaya/client`. A run its AI provider's rate limit ended answers `409`. A share token whose organization's agreement cannot be read is a `500`, never a `401`.
- **Changed** (Map Studio API, Map Studio): A freehand segment whose surface analysis fails on Mountaya's side, and a zone whose computation from a source fails, answer `500` and store nothing. A zone origin no way of its activity lies near is a `400` at `locations`. A preview none of whose parts could be routed is a `500`.
- **Changed** (Map Studio API, Tile API): A `400` for a request that does not match its operation is bounded in size. Past the bound it lists the first problems, and a last entry with no `path` says how many more there are.
- **Changed** (Map Studio API, Map Studio): An agent run's `run-failed` error message is written in the language of the conversation, English or French, where it was always English.
- **Changed** (Map Studio API): `getAiProviders` offers `claude-opus-5-5`, `claude-sonnet-5-5`, the default, and `mistral-large-4`. A configuration naming an older model moves to its successor, with a new `version`.
- **Changed** (Map Studio API, Data API, Tile API): Creating an organization opens its billing account within seconds, whether it is self-serve or billed by an agreement. An organization billed by its agreement lists only issued invoices, none with `hosted_invoice_url`, and no history lists a void invoice. Monthly allowances count the organization's billing period, the calendar month only where it has none, and a spent one's `429` waits until the next period begins.
- **Changed** (Data API, Tile API, MCP server): Every organization has a monthly allowance by default: 300,000 root fields a billing period on the Data API, the MCP server's included, and 2,000,000 tiles on the Tile API. An agreement may set other figures or leave an allowance unlimited. The per-minute limits are unchanged. `RateLimit-Policy` and `RateLimit` list `"month"` unless the agreement leaves the allowance unlimited.
- **Changed** (Tile API): A tile column or row at or past 2^z is a `400` at `x` or `y`. Inside a source's declared range, a square the provider holds no tile on is an empty vector tile, or a `404` for a raster, so the map draws the parent tile. A base map document the provider does not hold is a `500`. Terrain source tiles and glyphs moved under `/v1/terrains/{terrain}/{variant}/`, and every style names the new addresses.
- **Added** (Tile API, Map Studio API): `Elevation.id` names the elevation raster in the layer catalog. A `terrain` usage figure is recorded under the `id` of the terrain or raster it was drawn from.
- **Changed** (Data API, MCP server): The Data API tells your mistakes from ours. A failure of the routing engine or the geocoder on Mountaya's side is `INTERNAL_ERROR`, where it was often `VALIDATION_FAILED`. `isochrones` takes one or two locations, `matrix` refuses locations more than 20 km apart, and a location no way of the activity lies near is `VALIDATION_FAILED` at its index. A vertex past 85.0511° of latitude reads elevation `0` rather than failing the request. `pois` answers categories with no `query`. A `search`, `suggestions`, `directions` or `analyzeGeometry` that keeps part of its answer after a failure on Mountaya's side carries an `INTERNAL_ERROR` entry and counts toward no allowance.
- **Changed** (Map Studio API, Data API, Tile API, MCP server): Usage counts what you were answered. A request whose caller left before the answer began is counted nowhere. A request the server could not finish checking, a Data API field that fails after its operation ran, and an MCP call the Data API refused or could not be reached for are counted as the failure they were answered with. Map Studio in the Mountaya app and share links are recorded under a key of the Mountaya app rather than none, so filtering by one of your keys leaves them out.
- **Removed** (Map Studio API): `UsageDataResourceType` and `UsageTileResourceType` lose `unknown`: every usage figure names what its request asked for, and a request that names nothing is not recorded.
- **Added** (Tile API, Map Studio API, Map Studio): `getItinerariesTile` and `getZonesTile` take an optional `organization_id`, the studio scope the tile is drawn in. Under a publishable key or a share token it may name only your own organization, and changes nothing; another organization is a `403`. In the Mountaya app it picks the space the map draws: your own itineraries and zones, or one organization's. Asked with `organization_id`, `getTileLayers` and `getLayers` return the itinerary and zone templates carrying it, as the overlays' do.
- **Added** (Map Studio API, Tile API, Map Studio): `ItinerarySegment.road_access_info` lists each stretch of a segment that follows a way restricting who may pass, with the access values tagged on it (`no`, `private`, `permit`, `destination` and the rest of `RoadAccessRestrictionType`), and is `null` while a segment is not yet analysed. The itinerary tiles carry those stretches from zoom 9, the zoom their waypoints appear at, in a new source layer, `itinerary_restrictions`: one line feature per stretch, with `segment_id`, `itinerary_id` and the `kind` it is shown as, from `forbidden` to `restricted`. No specification declares a layer for it. In Map Studio a route through a restricted way names the kind of way before you keep it, and the map draws each stretch with diagonal stripes and a warning icon, while you route and once the itinerary is saved.
- **Added** (Map Studio API, Map Publishing): An embed draws those restricted stretches too, and `with_access_restrictions` decides whether it does: `EmbeddedStudioDefaultProps.with_access_restrictions` is your organization's default, `true`, and the same-named iframe parameter overrides it per embed. No safety rule caps it.
