# inwink API Reference

This document explains how to consume inwink APIs. It is intended as a reference for building API calls programmatically.

> **Découverte dynamique d'abord.** Cette doc décrit les *patterns* d'appel (verbes, forme des payloads, langage de requête). Les **endpoints exacts, champs et entités** se découvrent via les outils MCP (`inwink_mcp_find_api_endpoint`, `inwink_mcp_get_entity_description`) — ne devine jamais une route ou un schéma.

## Sommaire

| Tâche | Fichier |
|---|---|
| Lire / lister des entités (query, count, pagination, projection, joins) | [query.md](./query.md) |
| Construire un filtre / tri / projection (langage de requête JSON) | [query-language.md](./query-language.md) |
| Créer une entité | [create.md](./create.md) |
| Modifier une entité (patch / massupdate) | [update.md](./update.md) |
| Supprimer une entité (delete / massdelete) | [delete.md](./delete.md) |
| Import en masse (bulk create/update) | [import.md](./import.md) |
| Contrats & schémas d'entités, endpoints divers | [entities.md](./entities.md) |
| Champs de type `file` (upload / download) | [files.md](./files.md) |
| Manipuler les `assets` (galerie media) | [assets.md](./assets.md) |

---

## General Rules

- Property names are **case-insensitive**.
- Enum values are **case-insensitive**.
- All IDs are UUIDs.
- Dates are ISO 8601 / UTC.
- All write operations (create, edit, delete, import) use **POST** method.

---

## HTTP Status Codes

| Code | Meaning |
|---|---|
| 200 | Success — parse body as JSON |
| 204 | Success — no content |
| 400 | Bad request — body contains error details |
| 401 | Unauthorized — token expired or invalid |
| 403 | Forbidden — missing rights, contact CSM |
| 500 | Server error — may be transient, contact support if persistent |
| 503 | Transient infrastructure error — retry later |
