---
title: "Change the stage of an opportunity (drag & drop)."
method: PATCH
path: "/api/v1/opportunities/{opportunity_id}/move"
tags: ["CRM — Opportunités"]
---

# Change the stage of an opportunity (drag & drop).

`PATCH /api/v1/opportunities/{opportunity_id}/move`

## Request

- Base URL: `https://erp.eyeot.fr/api/v1`
- URL: `https://erp.eyeot.fr/api/v1/api/v1/opportunities/{opportunity_id}/move`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

**Permissions requises** : `crm:write`

## Request body

- OpportunityMove
  - `lost_detail` string, nullable
  - `lost_reason` string, nullable
  - `stage` string, required

## Response `200`

Succès — payload `{data, meta}` (cf. API-GUIDE §3.1)

- object
  - `data` OpportunityResponse
    - `amount` number
    - `client_id` string
    - `client_name` unknown
    - `commercial_id` string
    - `created_at` string, date-time
    - `created_by` string
    - `expected_close_date` string, date-time
    - `id` string
    - `lost_detail` string
    - `lost_reason` string
    - `notes` string
    - `probability` integer
    - `stage` string
    - `stage_changed_at` string, date-time
    - `title` string
  - `meta` PaginationMeta: Métadonnées de pagination cursor (cf. API-GUIDE §6).
    - `limit` integer
    - `next_cursor` string, nullable
    - `prev_cursor` string, nullable
    - `total_count` integer

## Other responses

- `400`: Validation Marshmallow échouée. `errors` détaille chaque champ invalide.
- `401`: JWT manquant, expiré ou révoqué.
- `402`: L'organisation n'a pas d'abonnement actif (paywall). Rediriger vers /activate.
- `403`: Permissions `module:action` insuffisantes pour cette route.
- `404`: Ressource introuvable (ou cross-tenant — équivalent à hidden).
- `409`: État incohérent (email dupliqué, ressource déjà dans cet état, etc.).
- `422`: Validation Marshmallow échouée. `errors` détaille chaque champ invalide.
- `429`: Trop de requêtes. Honorer le header `Retry-After` (secondes).

---

[API](https://skmtc.dev/eyeot/apis/eyeot-erp-api.md) · [All operations](https://skmtc.dev/eyeot/apis/eyeot-erp-api/llms.txt) · [OpenAPI document](https://skmtc.dev/eyeot/apis/eyeot-erp-api/revisions/42ab95222a89?raw)
