Agent Versioning - Branches

Upsert the open draft on this branch. If no draft is open, one is created automatically. The request body is an agent config partial in the same camelCase shape as GET /agent/{id} (globalPrompt, firstMessage, synthesizer, language, voiceDetectionConfig, smartTurnConfig, ...) and must contain at least one recognized field; the server merges it into the existing draft and returns the resulting draft as a revision-shaped snapshot.

Send native JSON types, not stringified values. Arrays (language.supported: ["en"]), booleans (language.switching.isEnabled: false), and objects (timezone: {"label": "(GMT+5:30) Asia/Kolkata", "offset": 330}) must be sent as real JSON. Passing "[\"en\"]", "false", or "Asia/Kolkata" instead is refused with a Zod-style error naming the offending path and the received type (e.g. Invalid config: language.supported: Expected array, received string). This is the single most common integration bug on this endpoint.

Publish the draft with POST /agent/{id}/branches/{branchId}/draft/publish to make the changes live. The draft PUT alone does not affect running calls.

put/agent/{id}/branches/{branchId}/draft

Request

  • Base URL
    https://api.smallest.ai/atoms/v1
  • URL
    https://api.smallest.ai/atoms/v1/agent/{id}/branches/{branchId}/draft
  • Auth
    HTTP bearer

Path parameters

idstring required

The agent ID.

branchIdstring required

The branch ID.

Request body

expectedRevisioninteger

Optimistic-concurrency control. The draftRevision the client's edit was based on. When present, the server runs a field-level conflict check and rejects with 409 DraftConflictError if the same field was changed by another edit since. Omit for last-write-wins semantics (which is also how a client force-overwrites after a 409). Referencing a non-existent base revision returns 409 { errors: ["base_revision_unavailable"] }.

globalPromptstring

Top-level system prompt shown to the agent every turn.

firstMessagestring

The agent's opening line at call start.

slmModel'electron' | 'electron-kogta' | 'electron-kogta-v2' | 'gpt-4o' | 'gpt-4.1' | 'gpt-5.2' | 'gpt-5.2-azure' | 'gpt-realtime' | 'gpt-realtime-mini'

LLM model powering the agent. See CreateAgentRequest.slmModel for org-level access notes.

backgroundSound'' | 'office' | 'cafe' | 'call_center' | 'static'

Ambient background sound during calls.

globalKnowledgeBaseIdstring

Knowledge base attached to the agent for retrieval-augmented responses.

muteUserUntilFirstBotResponseboolean
allowInterruptionsboolean
waitForUserToSpeakFirstboolean
interruptionBackoffTimernumber
enableStyleGuideboolean
synthesizerobject

TTS (voice) configuration. Same shape as CreateAgentRequest.synthesizer.

languageobject

Language configuration. Same shape as CreateAgentRequest.language.

defaultVariablesobject

Default variables injected into prompts and tool calls.

preCallAPIobject

Pre-call API webhook config. Same shape as CreateAgentRequest.preCallAPI.

smartTurnConfigobject
voiceDetectionConfigobject
voiceMailDetectionConfigobject
denoisingConfigobject
redactionConfigobject
pronunciationDictsobject
llmIdleTimeoutConfigobject
sessionTimeoutConfigobject
callDispositionConfigobject
speechFormattingobject

Example request

{
  "timezone": {
    "label": "(GMT+5:30) Asia/Kolkata",
    "offset": 330
  }
}

Response

Draft updated.

statusboolean

Example response

{
  "status": true
}

Changes

    • info

      added the new gpt-5.2-azure enum value to the request property

    • breaking

      the request property type changed from string to object

    • info

      added the new optional request property /

    • info

      added the new optional request property /