# API Komi > Les opérations de Komi (événements, billetterie, pages, groupes, formulaires, chiffres, Komi Orientation) pour un > logiciel ou un assistant, avec les droits d'un compte Komi. ## Connexion - OAuth 2.1 avec PKCE : https://api.komi-app.fr/.well-known/oauth-authorization-server. Le logiciel est enregistré par Komi (identifiant de client) ; un humain l'autorise une fois, puis le logiciel renouvelle son jeton (30 jours, rotation : un seul processus doit renouveler). - Chaque appel : `Authorization: Bearer `. ## Appeler une opération - `POST https://api.komi-app.fr/v1/operations/{nom}` avec les arguments en JSON ; réponse `{ "result": … }`. - Erreur : `{ "error": { "code", "message" } }` ; 400 arguments, 401 jeton, 403 droits, 404 introuvable, 409 version périmée (relire puis réessayer), 429 trop d'écritures (attendre `Retry-After`). - Écriture : `request_id` (UUID) obligatoire, réutilisé à l'identique en cas de nouvel essai. - Contrat complet : https://api.komi-app.fr/v1/openapi.json. Assistants IA : serveur MCP https://api.komi-app.fr/mcp. ## Opérations - `get_context` : Get the caller's campuses, managed pages, timezone and current reference time. - `search` : Search real Komi campuses, pages, events, products, groups, venues or publications with their media visuals (banners, logos). - `read_entity` : Read actual content, ordered blocks, and media visual assets (banner and logo CDN URLs with dimensions). - `list_relations` : Explore children, pages, ordered showcase, events, tickets, posts, groups, group_sections (folders of groups), event_venues or event_types with media for a campus/page/event. - `get_my_activity` : Read your own tickets, memberships and shotgun participations with their current status. - `list_writes` : Read the log of writes made through the Komi API by assistants and connected software (not the Komi app itself), newest first, kept 90 days: operation, HTTP status, request_id, time. - `show_event_media` : Read the official media of an event (banner, logo with their CDN URLs) and its details. - `discover_campus` : Smart discovery of upcoming campus events and activities tailored to student criteria (budget, date range, themes). - `get_financial_report` : Copilot Trésorier: detailed financial breakdown and accounting reconciliation for an association page or event (gross revenue, sold tickets, distinct buyers, tickets breakdown, groups breakdown, and scan attendance). - `get_raffle_sales` : Raffle (tombola) sales of an event: tickets sold, distinct buyers, amount in cents, paper tickets, breakdown by price (tarif), by channel (app, web, stand, manual, paper) and by payment method, and the last sale. - `find_event_buyers` : Find the buyers of an event before a refund: by name, e-mail or ticket code (query), or all of them. - `refund_tickets` (écriture) : Refund whole tickets of one buyer on an event, or the buyer's whole order on that event (no purchased_ticket_ids), onto the buyer's Komi wallet (cagnotte of the association), never onto a card. - `show_live_door_dashboard` : Live door figures of an event: entry scans, gate flow (scans per hour), tickets validated and remaining, fill rate. - `audit_campus` : Audit a campus calendar and associations for health and data quality. - `set_page_media` (écriture) : Upload and attach a banner or logo image to an event or page. - `check_campus_availability` : Check if a school or campus already exists on Komi before onboarding. - `propose_campus_blueprint` : Generate a recommended campus structure blueprint with core association pages, page types and event types, group sections (promotions, statuses, memberships) and permissions, ready for user review. - `apply_campus_blueprint` (écriture) : Apply a validated campus blueprint in a single atomic and idempotent transaction. - `get_school_page` : Read the public Komi Orientation page (fiche) of a school: identity, page_status, facts with year, status (published, declared, estimated, to_confirm, not_published) and source, curriculum steps and items with their codes, housing. - `claim_school_page` (écriture) : Ask to act for a school on Komi Orientation (Studio), needed once before any import. - `propose_school_import` : Check an import into a school's page and return the French recap to show the user before anything is written; writes nothing. - `apply_school_import` (écriture) : Write the import the user approved (« oui » to the propose_school_import recap), with its request_id and exactly the same slug, source and data. - `set_contact_recruitment` (écriture) : Turn on or off, for one school, the in-app banner that invites its verified students to become élèves contacts (students who answer future applicants on Komi Orientation). - `get_orientation_progress` : Komi's team only. - `set_school_details` (écriture) : Write facts read on a source onto a Komi Orientation page: phone, email, address, presentation (short text from the school's own site, never written by you), tuition (fees as stated, with the year, e.g. - `set_school_open_days` (écriture) : Add upcoming open days to a Komi Orientation page (on site or online, as the source states them), or remove some by id (read them with get_school_page). - `set_school_photo` (écriture) : Put a photo of the school itself (campus, building, students at the school; never a stock picture, a logo, a poster or a close-up of a person) on a Komi Orientation page: image_url (https PNG, JPEG or WebP, 15 MB max) is copied to Komi's CDN as is. - `set_school_logo` (écriture) : Put the official logo of a school on its Komi Orientation page: image_url (https PNG, JPEG or WebP from the school's own site or Wikimedia Commons) is copied to Komi's CDN byte for byte, never recolored or cropped. - `list_school_edits` : Read the log of what was written on Komi Orientation pages through Komi (most recent first): each row with its slug, request_id, before, after, source, author (by_me, by_komi) and whether it was undone. - `revert_school_edit` (écriture) : Undo one write on a Komi Orientation page entirely (every row written with that request_id, as list_school_edits shows), if nothing changed those rows since; otherwise CONFLICT and nothing is undone. - `set_formation_fee` (écriture) : Write the yearly tuition fee of one formation (what the budget and the comparison of « Choisir sa voie » read), as the source states it: amount in € per year, scholarship_amount (fee for a boursier) if stated, year = start of the school year (2026 for 2026-2027), status published (stated by the school) or estimated (computed by you: say how in note). - `set_schools_details` (écriture) : Write set_school_details on up to 50 pages in one call (same fields and rules), e.g. - `get_orientation_quality` : Komi's team only. - `search_orientation` : Search Komi Orientation formations (all of France: BTS, BUT, licence, prépa, écoles…) by words, diploma, department, apprenticeship or métier (ROME code). - `list_schools` : List detailed Komi Orientation schools of one kind (engineering_school, business_school…) by name, entrance exam, network or field, with city, photo, students and completeness; 30 per call, offset up to 300. - `list_school_formations` : All formations of one school or establishment (key, name, diploma, city, apprenticeship), the keys set_formation_fee and get_formation take. - `get_formation` : Read one formation as komi-app.fr shows it (school, diploma, admission, insertion, fees, sources) and the métiers it leads to. - `search_metiers` : Find métiers (jobs, ROME codes) by words. - `get_metier` : Read one métier (ROME code): what it is, pay, and the formations that lead to it, 1 page at a time (page 1 to 10), optionally of one diploma type. - `find_city` : Find a French commune by name (slug for get_city). - `get_city` : Read a city page of Komi Orientation: living costs, housing, transport, places, its schools. - `list_city_formations` : Formations of one city, optionally of one domain, diploma or apprenticeship. - `compare_schools` : Compare 2 to 6 schools criterion by criterion (value, year, status, source), as the comparator of komi-app.fr. - `compare_formations` : Compare 2 to 6 formations (admission, fees, insertion, living). - `list_criteria` : The comparison criteria of one kind of school (code, label, definition, unit, whether higher is better), for rank_schools. - `rank_schools` : Rank schools of one kind on chosen criteria (codes from list_criteria), optionally in one field: average place and place per criterion. - `get_school_budget` : Monthly budget of a student at one school, line by line with status and source, for a housing (ch = Crous room, studio, coloc…), outings per week, transport and scholarship level. - `get_school_living` : « Où tu vis » of one school: its city, rents, Crous, trips, weekend places. - `get_track_ranking` : « Choisir sa voie »: the five post-bac tracks (BTS, BUT, licence, prépa, ingé post-bac) ranked for a place (lat, lng), chosen domains and a bac. - `get_orientation_admin_guide` : Tutorial « MCP admin Orientation » / « tuto Orientation »: how Komi's team fills and fixes Komi Orientation pages with Komi's tools, in order (measure, pick pages, read the source, dry run, write, check the page, undo), with the rules (a source for every value, never invent, the school's own voice stays the school's). - `set_school_identity` (écriture) : Fix the identity of a school as its official source states it: official_name, short_name (only if the source uses it), website, legal_status (public, private_eespig, private_contract, private, consular, private_for_profit), founded_year. - `set_formation_details` (écriture) : Fix one formation: official_url (its official page), duration_years, active (false hides it from lists and searches when the source shows it is closed; true shows it again). - `set_school_fact` (écriture) : Write one figure of a school (slug) or of one of its formations (formation), as the source states it: students, alumni, employment_rate, first_salary, scholarship_share, associations, sports, double_degrees, partner_universities, housing_beds_per_100, apprenticeship (text), values (text)… (codes of orientation.indicators; % from 0 to 100, salaries in k€). - `set_diploma_text` (écriture) : Komi's team only. - `list_school_claims` : Komi's team only. - `review_school_claim` (écriture) : Komi's team only. - `list_orientation_moderation` : Komi's team only. - `moderate_orientation` (écriture) : Komi's team only. - `get_orientation_audience` : Komi's team only. - `find_school` : Find a school or establishment of Komi Orientation by its name, acronym or slug, whatever its kind (engineering or business school, university, lycée, IUT…): up to 20, detailed pages first, then the most requested. - `set_school_facts` (écriture) : Write set_school_fact for up to 50 figures in one call (same fields and rules), e.g. - `list_operations` : Every operation of Komi's API in one call: name, whether it writes, and its first sentence. - `update_page` (écriture) : Update page details: name, description and brand colors. - `set_event_access` (écriture) : Set who can see a page or event (its « Qui peut la voir » screen): 'external' = Public, anyone with its link, outside the campus too; 'campus' = the whole campus; 'groups' = members of group_ids; 'subscription' = its subscribers. - `manage_group` (écriture) : Create, update or delete a group (e.g. - `assign_user_group` (écriture) : Add a student to a group (e.g. - `remove_user_group` (écriture) : Remove a student from a group by user_id or email address. - `get_page_team` : Read a page team: roles, their permissions and members. - `update_campus_settings` (écriture) : Update campus settings: who can join (join_by_email, join_by_code, join_by_request), auto-approved email domains, page creation permissions, approval requirement. - `get_campus_join_settings` : Read who can join a campus: the three ways (school email, codes, requests), the school domain and its proof, the named codes with their mode, link and usage, the « today » sentence, and pending_requests (each with its id: pass it as pending_request_id to review_request, type campus_access). - `create_campus` (écriture) : Create a campus in one idempotent call, the same 3 steps as the app: name and school, who can join, then the optional school email proof (done beforehand in the Komi app). - `get_campus_setup` : Read a campus « Mise en route »: which of the 5 steps (join, types, pages, groups, team) are really done, and Komi's proposals (page and event types, BDE/BDS/BDA offices, group folders such as Promo 1A/2A/3A). - `apply_campus_setup_step` (écriture) : Apply one « Mise en route » step after the user chose: types (page_types and event_types objects from the proposals), pages (names) or groups (sections with their groups). - `manage_venue` (écriture) : Create, update or archive an official campus venue / room. - `review_request` (écriture) : Approve or reject a pending request (e.g. - `describe_metrics` : Get authoritative metric definitions before interpreting sales, attendance or demographics. - `analyze_activity` : Calculate event/shop/page results in SQL. - `find_partnership_opportunities` : Komi Partenariats, read-only: the measured offer of active campuses for company partnerships, to reason on yourself — campuses, clubs (last 12 months) and opportunities in [from, to), announced events first, then by measured attendance. - `propose_partnerships` (écriture) : Komi Partenariats: from a company brief, Komi's engine proposes at most 3 partnerships grounded in the measured offer (find_partnership_opportunities). - `resolve_event_time` : Resolve a named weekday using the campus clock (never model calendar arithmetic). - `create_event` (écriture) : Create an event page, structured venue, tickets and ordered blocks in one atomic transaction. - `update_event` (écriture) : Edit event title, description, time or venue. - `list_events` : List events directly, ordered by start time: filter by campus_id, organizer_page_id (the page that organizes them), a time window (starts_at / ends_at: events that overlap it) and status (draft, published, cancelled, archived). - `delete_event` (écriture) : Delete an event for good (its page, unsold tickets, blocks and posts; participants get a notification). - `create_ticket` (écriture) : Create a ticket/product on an existing page with exact price_cents and quantity. - `update_ticket` (écriture) : Edit a ticket/product while retaining other fields, groups and dependencies. - `edit_blocks` (écriture) : Atomically create, edit, move or delete specific blocks on a page (all operations or none). - `publish_content` (écriture) : Set page/event discovery (is_referenced: true/false). - `create_post` (écriture) : Create a native publication on a managed page. - `update_post` (écriture) : Edit or publish an existing post while preserving attachments, polls, author and page. - `describe_blocks` : Get native block data examples before creating/editing content. - `get_page_presentation` : Read the editable presentation document of a page (sections, blocks, style) with the revision, draft_revision and source_hash required to save it. - `save_page_presentation_draft` (écriture) : Save the page presentation document as the caller's draft. - `publish_page_presentation` (écriture) : Publish the caller's saved presentation draft to the live page. - `list_forms` : List the forms of a page (club, event or user page), drafts included, newest update first, at most 200: page_id, name, status, phase, opens_at, closes_at, has_tickets, answers_visibility, responses (submitted count), places_published_at, banner_url. - `create_form` (écriture) : Create a form as a DRAFT under a page (club, event or user page). - `update_form` (écriture) : Edit a form: only the fields you pass change (questions replace the whole list; ids and kinds of questions that already have answers are frozen, hide a choice instead of deleting it). - `set_form_status` (écriture) : Change a form's status. - `publish_form_places` (écriture) : For a form that hands out ticket places (arrival order): call with preview true first (writes nothing; shows who would get an offer, wait, or is not eligible), show it to the user, and only after their explicit yes call with preview false, which publishes the places and notifies students. - `get_form_results` : Read a form's follow-up: admin (status, phase, counts of submitted and withdrawn answers, places, warnings) and aggregated results per question. - `save_editorial_article` (écriture) : Create or update an editorial article draft (guides, comparisons, documentation, FAQ). - `publish_editorial_article` (écriture) : Publish an approved or drafted article to live Komi web resources (https://komi-app.fr/ressources/...). - `save_and_publish_editorial_article` (écriture) : Atomically create or update and immediately publish an editorial article in one step. - `list_editorial_articles` : List existing Komi editorial articles, drafts and publications with their status, slug, and quality scores. - `get_editorial_article` : Read the full structured draft or published revision of an editorial article by UUID. - `list_editorial_categories` : List all editorial categories (both public and upcoming). - `save_editorial_category` (écriture) : Create or update an editorial category (slug, name, description, SEO tags, position, is_public).