GoliathDevelopersGet an API key
Reference/Employeesgenerated from the gateway manifest

updateEmployeeConfig

Change an AI employee's configuration.

POST/api/v1/callWRITEidempotent · 24 hruns as the key's owner
View as Markdown

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.

employeeIdID!required
nameString
titleString
avatarString
configJSON
edits[AiEmployeeConfigTextEditInput!]
findString!required
replaceString!required
configPatchJSON
acknowledgeScreeningWeakeningBoolean
expectedUpdatedAtDateTime

Response

What comes back under data: a list shows as one entry, and a value as its type.

response shape
{
  "data": {
    "aiEmployeesMutation": {
      "updateAiEmployeeConfig": {
        "id": "<ID>",
        "name": "…",
        "title": "…",
        "status": "ACTIVE",
        "configDocument": "…",
        "textHours": "…",
        "quietHoursNotice": "…",
        "updatedAt": "2026-01-01T00:00:00.000Z"
      }
    }
  }
}

Errors

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 →