cURL
curl --request POST \ --url https://eu-cloudflare.vg-stuff.com/agents/{agentId}/variables \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "variable": { "in": "<string>", "type": "string", "value": "<unknown>", "defaultValue": "<unknown>", "key": "<string>", "description": "<string>", "required": true, "reusable": true, "isEnv": true, "isSystem": true, "isGlobal": true } } '
{ "success": true, "message": "<string>", "data": { "id": "<string>", "in": "<string>", "type": "string", "value": "<unknown>", "defaultValue": "<unknown>", "key": "<string>", "description": "<string>", "required": true, "reusable": true, "isEnv": true, "isSystem": true, "isGlobal": true, "agentId": "<string>", "userId": "<string>" } }
Creates a new variable, this route must use the new V3 endpoints.
{ "variable": { "key": "user_name", "type": "string", "description": "Stores the user's name during conversation", "defaultValue": "", "isGlobal": true } }
key
isGlobal: true
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Show child attributes
Successful response