# CAPM — ressources développeurs

API publique, spécification OpenAPI et points d'entrée pour agents de CAPM, l'association des commerçants et artisans du Pays Martignolais.

Use these resources when a task needs official CAPM data for Martigné-Ferchaud and the Pays Martignolais. The human site stays at https://capm35.fr. The public API stays at https://api.capm35.fr.

## When to call the API

- Look up member businesses, sectors, or official news.
- Send a contact or membership message.
- Subscribe an email to the public newsletter, with explicit consent.

Do not call admin, billing, interview, document, or authenticated RPC routes. Those are private.

## Discovery

- [OpenAPI](https://capm35.fr/openapi.json)
- [OpenAPI on the API host](https://api.capm35.fr/openapi.json)
- [llms.txt](https://capm35.fr/llms.txt)
- [Health](https://api.capm35.fr/health)

## Public endpoints

All of the following accept and return JSON. Errors use `{ error, message, hint }`.

- `GET https://api.capm35.fr/api/public/directory` — full directory and sectors
- `GET https://api.capm35.fr/api/public/companies` — paginated directory list
- `GET https://api.capm35.fr/api/public/companies/{slug}` — one company
- `GET https://api.capm35.fr/api/public/sectors` — activity sectors
- `GET https://api.capm35.fr/api/public/posts` — published articles
- `GET https://api.capm35.fr/api/public/posts/{slug}` — one article
- `POST https://api.capm35.fr/api/public/contact` — contact form
- `POST https://api.capm35.fr/api/public/newsletter/subscribe` — newsletter opt-in

Function-calling clients should import `/openapi.json` and use the `operationId` values as tool names.

## Markdown pages

HTML pages also negotiate `Accept: text/markdown`. You can request `/about/`, `/annuaire/`, or `/contact/` with that header, or use the `/index.md` alternate.

## Legal

- [Privacy](https://capm35.fr/privacy/)
- [Legal notice](https://capm35.fr/mentions-legales/)
- [Contact](https://capm35.fr/contact/)
