# Run sandbox purchase

Runs a test purchase for one of the organization's agents from the console and returns the intent id at once. Console session only, for users who can create agents or developers; the agent needs an active credential.

`POST /v1/sandbox/purchases`

Runs a test purchase for one of the organization's agents from the console and returns the intent id at once. Console session only, for users who can create agents or developers; the agent needs an active credential.

## Request body

```json
{
  "agent_id": "agt_01jd2x3k4m5n6p7q8r9s0t1v2w"
}
```

## Responses

- **200**: Success.
- **400**: Invalid request: a field is missing or malformed (VALIDATION_ERROR).
- **401**: No valid session, API key or agent credential (UNAUTHENTICATED, AGENT_CREDENTIAL_INVALID).
- **404**: The resource does not exist or belongs to another organization.

Example 200 response:

```json
{
  "intent_id": "pi_01jd2x3k4m5n6p7q8r9s0t1v2w",
  "status": "active"
}
```
