WhatsApp · Business Agent

Update agent settings

Updates agent settings. Fields you leave out keep their current values.

PATCHhttps://api.pozy.ai/v1/accounts/{accountId}/business-agent/settings
updateBusinessAgentSettings

Guide: Business AI agent

Request

Send your API key as Authorization: Bearer pz_live_.... Read-only keys cannot call it. Keys with the messages resource group disabled get 403 resource_group_disabled. Authentication

Path parameters

NameTypeNotes
accountIdrequiredstring

Query parameters

NameTypeNotes
agentIdstring

Request body

application/json, required

  • rolloutobject
    • enabledbooleanrequired
  • handoffobject
    • enabledbooleanrequired
    • messagestring

      Up to 1024 characters.

    • message_selectionstring

      One of DEFAULT, AGENT, CUSTOM.

  • followupobject
    • enabledbooleanrequired
    • followup_interval_in_secondsinteger

      One of 0, 300, 900, 1800, 3600, 7200, 28800, 86400.

    • messagestring

      Up to 1024 characters.

  • ai_audiencestring

    One of EVERYONE, ALLOWLISTED_ONLY.

  • never_say_phrasesarray of string

Example

curl -X PATCH "https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/business-agent/settings" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "rollout": {
    "enabled": true
  },
  "handoff": {
    "enabled": true
  },
  "followup": {
    "enabled": true
  },
  "ai_audience": "EVERYONE"
}'

Response

200 on success

  • agent_idstringrequired
  • channelstringrequired
  • rolloutobjectrequired
    • enabledbooleanrequired
  • handoffobject

    Can be null.

    • enabledboolean
    • messagestring
    • message_selectionstring

      One of DEFAULT, AGENT, CUSTOM.

  • followupobject

    Can be null.

    • enabledboolean
    • followup_interval_in_secondsinteger

      One of 0, 300, 900, 1800, 3600, 7200, 28800, 86400.

    • messagestring
  • ai_audiencestring

    One of EVERYONE, ALLOWLISTED_ONLY. Can be null.

  • never_say_phrasesarray of string
200 response
{
  "agent_id": "61107e42d7605e217d408f43",
  "channel": "string",
  "rollout": {
    "enabled": true
  },
  "handoff": {
    "enabled": true,
    "message": "Hello from Pozy",
    "message_selection": "DEFAULT"
  },
  "followup": {
    "enabled": true,
    "followup_interval_in_seconds": 0,
    "message": "Hello from Pozy"
  },
  "ai_audience": "EVERYONE",
  "never_say_phrases": [
    "string"
  ]
}

Errors

Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:

400invalid_request_errorA parameter or body field is missing or invalid. param names it.
401authentication_errorThe API key is missing, revoked or expired.
403permission_errorThe key is read-only, scoped to other profiles, or has this resource group disabled.
404not_foundNothing with that id exists in your workspace.
429rate_limit_errorToo many requests this minute. Wait for Retry-After seconds.

Every code is listed in Errors.

More in Business Agent