Agents
patch/v1/agents/{agentId}

Request

  • Base URL
    https://api.zavu.dev
  • URL
    https://api.zavu.dev/v1/agents/{agentId}
  • Auth
    HTTP bearer

Path parameters

agentIdstring required

Agent ID.

Request body

namestring
enabledboolean
provider'openai' | 'anthropic' | 'google' | 'mistral' | 'zavu'

LLM provider for the AI agent.

modelstring
systemPromptstring
apiKeystring

API key for the LLM provider, stored and attached to the agent. Send it with provider when the agent does not already hold a key for that provider: an update that would leave the agent on a key for a different provider is refused with 400 invalid_request, and one that leaves it with no key at all is refused too. Moving to zavu needs no key.

contextWindowMessagesinteger
includeContactMetadataboolean
maxTokensinteger nullable
temperaturenumber nullable
triggerOnChannelsstring[]
triggerOnMessageTypesstring[]

Example request

{
  "voice": {
    "greeting": "Hi, thanks for calling Acme. How can I help you today?",
    "greetings": {
      "es": "Hola, soy Atlas. Preguntame lo que quieras."
    },
    "language": "en",
    "model": "openai/gpt-4o",
    "ttsVoiceId": "aria",
    "transferPhoneNumber": "+14155551234"
  }
}

Response

Agent updated.

Example response

{
  "agent": {
    "id": "agent_abc123",
    "senderId": "sender_12345",
    "name": "Customer Support Agent",
    "model": "gpt-4o-mini",
    "triggerOnChannels": [
      "sms",
      "whatsapp"
    ],
    "triggerOnMessageTypes": [
      "text"
    ],
    "voice": {
      "greeting": "Hi, thanks for calling Acme. How can I help you today?",
      "greetings": {
        "es": "Hola, soy Atlas. Preguntame lo que quieras."
      },
      "language": "en",
      "model": "openai/gpt-4o",
      "ttsVoiceId": "aria",
      "transferPhoneNumber": "+14155551234"
    }
  }
}

Changes