Delete one source file

DELETE
/v1/agents/{id}/source/file

Deletes one file of the working copy. Snapshots keep their own copy of it. Deleting a file that is not there succeeds with deleted: false.

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.

Query Parameters

path*string

The file to delete.

Length1 <= length <= 512

Response Body

Whether a file was deleted

application/json
  1. response
deleted*boolean
totalBytes*integer
Range0 <= value
Example Request
curl -X DELETE "https://api.vlayers.ai/v1/agents/$AGENT_ID/source/file?path=src/old.ts" \  -H "Authorization: Bearer $VOICELAYER_API_KEY"
Example Response
{  "deleted": true,  "totalBytes": 1204}