Skip to content
PATCH /connection/{id}/variables

Merge patch over top-level keys, same `can_manage` bar as the read: `set` replaces the keys it names, `unset` deletes the keys it names, and everything else in the account context — the keys this API may not read, the OAuth token blob first among them — is left where it is, so a patch cannot destroy what it cannot see. Secret keys cannot be set or unset here. Answers `200` with the same list envelope the GET returns, reflecting the new state.

Path Parameters

idstring
required·

Connection id (conn_…).

Request Body

setRecord<string, any>

Top-level keys to replace, real JSON shapes as values.

unsetstring[]

Top-level keys to delete.

Response Body

next_cursorstring,null
prev_cursorstring,null
resultobject[]
has_secretsboolean

A leaf at or under this key was withheld — true for a secret key itself, and for a public object one of whose leaves was stripped.

is_secretboolean

Saffron's verdict, not a key-name guess; the value ships as null.

namestring

Top-level context key; rows sort and page over it.

value

The customer-set value in its real shape — object, array or scalar. null when is_secret is true; inside objects, withheld leaves are absent rather than nulled or masked, so absence is the only shape that cannot lie.

curl -X PATCH 'https://api.elaichi.ai/connection/<id>/variables' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"set":{},"unset":[]}'
const body = {
  "set": {},
  "unset": []
};

const response = await fetch('https://api.elaichi.ai/connection/<id>/variables', {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import os
import requests

url = "https://api.elaichi.ai/connection/<id>/variables"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "set": {},
    "unset": []
}

response = requests.patch(url, headers=headers, json=payload)
print(response.json())