updateEmployeeConfig
Change an AI employee's configuration.
Change an AI employee's configuration. To change part of it (a sentence, its tone, an hour), send only the change: edits are exact { find, replace } pairs, each find copied from configDocument and found exactly once across its text (instructions, call scripts), applied in order, all or nothing; configPatch is a JSON merge patch for settings (objects merge, anything else replaces; a list to clear is [], e.g. { channels: { emailConfig: { sendWindow: {...} } } }), and a whole new prompt goes there too. Whatever you do not name is left as it is. Send config, the COMPLETE document, only to rewrite everything; a write that drops text or a channel nobody edited is refused. name, title and avatar are kept when omitted; an empty title clears it. The employee builder's checks run on every call and a refusal names each field and what to change: the voice must be one the workspace can use, the instructions must fit, and no line may tell the employee to claim to be a person or deny being an AI. A change that turns off do-not-call or known-litigator screening is refused with the exact sentence to put to the person; ask them, and send the same call again with acknowledgeScreeningWeakening: true only if they agree. Pass expectedUpdatedAt (the updatedAt you read) so a teammate's save in between is refused rather than overwritten. A text sendWindow outside 8 AM to 9 PM is saved as asked; the result's quietHoursNotice then names the hours in words, and the reply says it once. textHours is the window as saved, in words. Does not switch the employee on or off.
curl https://server.goliathdata.com/api/v1/call \
-H "Authorization: Bearer $GOLIATH_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"operationId": "updateEmployeeConfig",
"variables": {
"employeeId": "<employeeId>"
}
}'import { GoliathClient } from '@goliath-data/sdk'
const goliath = new GoliathClient({
apiKey: process.env.GOLIATH_API_KEY!,
baseUrl: 'https://server.goliathdata.com',
})
const result = await goliath.employees.updateEmployeeConfig(
{
employeeId: '<employeeId>'
},
{ idempotencyKey: crypto.randomUUID() },
)const res = await fetch('https://server.goliathdata.com/api/v1/call', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.GOLIATH_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': crypto.randomUUID(),
},
body: JSON.stringify({
operationId: 'updateEmployeeConfig',
variables: {
employeeId: '<employeeId>'
}
}),
})
const { data, errors } = await res.json()Variables
The example sends only what the schema requires. Some operations also need one of several optional variables (one filter or another, say); the description above says which.
Response
What comes back under data: a list shows as one entry, and a value as its type.
{
"data": {
"aiEmployeesMutation": {
"updateAiEmployeeConfig": {
"id": "<ID>",
"name": "…",
"title": "…",
"status": "ACTIVE",
"configDocument": "…",
"textHours": "…",
"quietHoursNotice": "…",
"updatedAt": "2026-01-01T00:00:00.000Z"
}
}
}
}Errors
unknown_variableA variable the operation does not declare. A typo is refused rather than silently dropped.
unauthorizedNo bearer header, or the key is invalid or revoked.
insufficient_scopeThe key lacks the scope the operation requires.
forbiddenA referenced record does not exist, was deleted, or is outside your organization. The gateway cannot tell those apart.
idempotency_conflictA request with this Idempotency-Key is still in flight.
Idempotency
Send an Idempotency-Key of 1 to 255 characters. A finished request retried with the same key replays its stored response, marked Idempotency-Replayed: true; one still in flight returns 409 idempotency_conflict. Keys expire after 24 hours. Write without fear →