Turn approving by text on or off

PUT
/v1/agents/{id}/improvement/text-approval

When on, a ready proposal for this agent is texted to your confirmed mobile with a one-use code; replying YES <code> publishes it and NO <code> rejects it. It is a grant owned by you. A change that widens what the agent can do gets no code and needs the dashboard. Needs a person with a confirmed mobile.

Requires an API key with the workspace:write scope.

Authorization

apiKey
headerAuthorizationBearer <token>

A secret API key from the dashboard (Developers → API keys): vl_live_…, or vl_test_… for test mode. Each operation says which scope the key needs.

Path Parameters

id*string

The agent id.

Request Body

application/json
  1. body
enabled*boolean

Turn it on or off.

Response Body

The settings after the change; needs a person with a confirmed mobile

application/json
  1. response
improvement*
Example Request
curl -X PUT "https://api.vlayers.ai/v1/agents/$AGENT_ID/improvement/text-approval" \  -H "Authorization: Bearer $VOICELAYER_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "enabled": true  }'
Example Response
{  "improvement": {    "agentId": "0192f5c2-6f7a-7b9c-8d1e-2f3a4b5c6d78",    "autoDraft": {      "enabled": true,      "monthlyCapUsd": 20,      "committedUsd": 1.4    },    "autoShip": {      "enabled": false,      "grantId": null,      "grantedBy": null,      "grantedByName": null,      "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"  }}