Record an agent's Git repository

PUT
/v1/agents/{id}/source/git

Records the repository's https address, the branch and, for a private repository, the connection that holds the credential (from your Connections). The address may not carry a user name or token; they go in the connection, never in this record. Nothing is cloned or pushed by this call.

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
repoUrl*string

The repository's https address, for example https://github.com/acme/agent.

Lengthlength <= 500
branch?string

The branch. Default main.

Length1 <= length <= 255
Default"main"
connectionId?|

The connection that holds the Git credential, or null for a public repository.

Formatuuid
Defaultnull

Response Body

The repository recorded

application/json
  1. response
git*|null
Example Request
curl -X PUT "https://api.vlayers.ai/v1/agents/$AGENT_ID/source/git" \  -H "Authorization: Bearer $VOICELAYER_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "repoUrl": "https://example.com/acme/agent",    "branch": "main",    "connectionId": null  }'
Example Response
{  "git": {    "repoUrl": "https://github.com/acme/agent",    "branch": "main",    "connectionId": null,    "connectionMissing": false,    "updatedAt": "2026-10-20T15:04:05.000Z",    "updatedBy": "user_2abc"  }}