---
title: "Create Abandoned Cart V1"
method: POST
path: "/api/v1/carts/abandoned"
tags: ["carts"]
---

# Create Abandoned Cart V1

`POST /api/v1/carts/abandoned`

## Request

- Base URL: `https://www.elocuenti.com`
- URL: `https://www.elocuenti.com/api/v1/carts/abandoned`
- Auth: HTTP bearer

Create/update an abandoned cart and trigger recovery (v1 response).

## Request body

- AbandonedCartRequest: Request body for POST /api/v1/carts/abandoned.
  - `phone` string, required
  - `items` CartItem[], required
    - `name` string, required
    - `price` number, required
    - `quantity` integer
    - `sku` string, nullable
    - `image_url` string, nullable
    - `variant_title` string, nullable
  - `total` number, required
  - `template_name` string, required
  - `template_params` object, nullable
  - `cart_id` string, nullable
  - `customer_name` string, nullable
  - `customer_email` string, nullable
  - `subtotal` number, nullable
  - `currency` string
  - `recovery_url` string, nullable
  - `checkout_url` string, nullable
  - `source` 'shopify' | 'vtex' | 'tiendanube' | 'woocommerce' | 'magento' | 'custom' | 'sdk'
  - `abandoned_at` string, nullable
  - `metadata` object, nullable
  - `from` string, nullable: Optional. The business WhatsApp number to send from, in E.164 (e.g. `+573001234567`). Omit it to send from the business default. A number that is not one of the business's active numbers is refused with 422 `from_number_not_available`.
  - `wait` boolean

## Response `200`

Successful Response

- AbandonedCartResponse
  - `data` AbandonedCart, required: `data` of the answer: 202 once saved (sent, queued or template failed), 200 on dedup.
    - `cart_id` string, nullable, required
    - `conversation_id` string, nullable, required
    - `status` 'cart_recovery_triggered' | 'cart_recovery_queued' | 'cart_saved_template_failed' | 'cart_saved_template_deduplicated', required
    - `cart_saved` boolean, required
    - `template_sent` boolean, required
    - `pipeline_instance_id` string, nullable
    - `queued` boolean, nullable: Present when `wait` was false.
    - `template_used` string, nullable
    - `template_error` string, nullable
    - `warning` string, nullable
    - `hint` string, nullable: What to fix when the template failed.
    - `last_sent_at` string, nullable: Dedup: when the last message went out.
    - `cooldown_hours` number, nullable
    - `next_allowed_at` string, nullable: Dedup: earliest next message.
    - `from` string, nullable: The business number the notice left from, in E.164. Present only when it already went out (not when it is queued, delegated to a workflow or saved without sending).
  - `request_id` string, nullable

## Other responses

- `202`: Aceptado: la petición es válida y el trabajo se completa de forma asíncrona. No implica que el efecto ya haya ocurrido.
- `400`: Petición malformada: una validación que el JSON Schema no puede expresar (reglas entre campos, headers de firma obligatorios ausentes) o un cuerpo que no es UTF-8. Un JSON roto en UTF-8 responde, en cambio, **422** `json_invalid`.
- `401`: No autenticado: falta la credencial, es inválida o expiró.
- `403`: Autenticado, pero sin permiso sobre este recurso o tenant.
- `422`: El cuerpo o los parámetros no pasan la validación del esquema.
- `429`: Se superó el límite de peticiones del API key o de la IP.
- `500`: Error interno no recuperable por el cliente.

---

[API](https://skmtc.dev/elocuenti/apis/elocuenti-api.md) · [All operations](https://skmtc.dev/elocuenti/apis/elocuenti-api/llms.txt) · [OpenAPI document](https://skmtc.dev/elocuenti/apis/elocuenti-api/revisions/633c2767ac8a?raw)
