Variables
Operations about variables
Retrieve variables from your instance.
The maximum number of items to return.
100Example: 100Paginate by setting the cursor parameter to the nextCursor attribute returned by the previous request's response. Default value fetches the first "page" of the collection. See pagination for more detail.
VmwOO9HeTEj20kxMOperation successful.
The request is invalid or provides malformed data.
Unauthorized
Forbidden
Too many requests.
GET /api/v1/variables HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
{
"data": [
{
"id": "text",
"key": "text",
"value": "test",
"type": "text",
"project": {
"id": "VmwOO9HeTEj20kxM",
"name": "Marketing",
"type": "team",
"icon": {
"type": "emoji",
"value": "text",
"color": "text"
},
"description": "Workflows the marketing team owns.",
"customTelemetryTags": [
{
"key": "text",
"value": "text"
}
],
"creatorId": "f9a2cbb8-0b1e-4b64-9c1c-0d5f5f1f2a3b",
"createdAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
}
],
"nextCursor": "text"
}Create a variable in your instance.
Safe retry key for this POST. Use 1 to 128 visible ASCII characters. The same key and the same request return the first successful response. A different request with this key returns 422. A retry while the first request is in progress returns 409.
^[\x21-\x7E]+$^[A-Za-z_][A-Za-z0-9_]*$testVmwOO9HeTEj20kxMOperation successful.
No content
The request is invalid or provides malformed data.
Unauthorized
Forbidden
Conflict
Unsupported media type.
Unprocessable Entity
Too many requests.
POST /api/v1/variables HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 60
{
"key": "text",
"value": "test",
"projectId": "VmwOO9HeTEj20kxM"
}No content
Update a variable from your instance.
The ID of the variable.
^[A-Za-z0-9_]+$testVmwOO9HeTEj20kxMOperation successful.
No content
The request is invalid or provides malformed data.
Unauthorized
Forbidden
The specified resource was not found.
Unsupported media type.
Too many requests.
PUT /api/v1/variables/{id} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 60
{
"key": "text",
"value": "test",
"projectId": "VmwOO9HeTEj20kxM"
}No content
Delete a variable from your instance.
The ID of the variable.
Operation successful.
No content
Unauthorized
Forbidden
The specified resource was not found.
Too many requests.
DELETE /api/v1/variables/{id} HTTP/1.1
X-N8N-API-KEY: YOUR_API_KEY
Accept: */*
No content
Last updated
Was this helpful?