> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent adds an item to a customer's cart

> Agent adds an item to a customer's cart

### Path parameters

<ParamField path="customer_id" type="string" required>
  Customer ID
</ParamField>

<ParamField path="cart_id" type="string" required>
  Cart ID
</ParamField>

### Request body

JSON body of type `AgentAddToCartRequest`.

### Responses

<ResponseField name="201" type="object">
  Item added to cart
</ResponseField>

<ResponseField name="400" type="ErrorResponse">
  Invalid request
</ResponseField>

<ResponseField name="401" type="ErrorResponse">
  Unauthorized
</ResponseField>

<ResponseField name="403" type="ErrorResponse">
  Forbidden
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/agents/customers/{customer_id}/carts/{cart_id}/items' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{}'
  ```
</RequestExample>
