---
title: "Create a shopping cart"
method: POST
path: "/agent/cart"
tags: ["Checkout"]
---

# Create a shopping cart

`POST /agent/cart`

## Request

- Base URL: `https://api.trusteed.xyz/api/v1`
- URL: `https://api.trusteed.xyz/api/v1/agent/cart`
- Auth: API key in header `X-Agent-Api-Key`

Initialize a new shopping cart with items. Requires the agent key's `cart` scope; not available to SANDBOX-tier keys.

## Request body

- CreateCartRequest
  - `items` object[], required
    - `product_id` string, uuid, required
    - `quantity` integer, required
    - `variant_id` string, uuid

## Response `201`

Cart created successfully

## Other responses

- `400`: Invalid request
- `403`: Missing `cart` scope, or a SANDBOX-tier key

---

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