# Turn shipping on its own on or off

Source: https://docs.vlayers.ai/reference/agents/set-agent-auto-ship

`PUT /v1/agents/{id}/improvement/auto-ship` · scope `workspace:write`

When on, a proposal whose replays passed is published without asking, under your permission: it is a grant owned by you, listed on the Access page, and it ends if you leave the workspace or lose the right to publish this agent. It never ships a change that widens what the agent can do, one with too few different contacts or person-made cases behind it, or a prompt that failed its checks; a change that costs more per successful conversation waits unless you set `costCeilingUsdPerSuccess`. Needs a person, not an API key.

Requires an API key with the `workspace:write` scope.

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | The agent id. Example: `"0192f5c2-6f7a-7b9c-8d1e-2f3a4b5c6d78"` |
| `enabled` | body | boolean | yes | Turn it on or off. |
| `costCeilingUsdPerSuccess` | body | number | no | The most a change may cost per successful conversation and still ship on its own. `null` for none. |

## Request

cURL:

```bash
curl -X PUT "https://api.vlayers.ai/v1/agents/$AGENT_ID/improvement/auto-ship" \
  -H "Authorization: Bearer $VOICELAYER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true
  }'
```

TypeScript:

```ts
import { VoiceLayer } from '@voicelayer/api';

const voicelayer = new VoiceLayer();

const { improvement } = await voicelayer.agents.setAutoShip('<agent-id>', { enabled: true });
console.log(improvement.autoShip.enabled);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.agents.set_auto_ship("<agent-id>", enabled=True)
print(result.improvement.auto_ship.enabled)
```

## Response `200`

```json
{
  "improvement": {
    "agentId": "0192f5c2-6f7a-7b9c-8d1e-2f3a4b5c6d78",
    "autoDraft": {
      "enabled": true,
      "monthlyCapUsd": 20,
      "committedUsd": 1.4
    },
    "autoShip": {
      "enabled": true,
      "grantId": "0192f5c1-5e6f-7a8b-9c0d-1e2f3a4b5c67",
      "grantedBy": "user_2abc",
      "grantedByName": "Priya Shah",
      "costCeilingUsdPerSuccess": null,
      "offReason": null,
      "offAt": null
    },
    "textApproval": {
      "enabled": true,
      "grantId": "0192f5c1-5e6f-7a8b-9c0d-1e2f3a4b5c67",
      "mobileConfirmed": true
    },
    "limits": {
      "autoShipMinContacts": 20,
      "autoShipMinOwnerCases": 5,
      "maxEvidenceCases": 20
    },
    "perProposalQuote": {
      "maxUsd": 1.4,
      "typicalUsd": 0.4,
      "draftMaxUsd": 0.2,
      "evidenceMaxUsd": 1.2
    },
    "updatedAt": "2026-10-20T15:04:05.000Z"
  }
}
```
