Skip to content

Update a Viber bot

PUT
/v1/Accounts/{auth_id}/Integrations/Viber/bots/{bot_id}
curl --request PUT \
--url https://api.siprtc.io/v1/Accounts/example/Integrations/Viber/bots/example \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "account_id": "", "auth_token": "", "bot_avatar": "https://example.com/avatar.png", "bot_id": "", "bot_name": "Acme Support", "metadata": { "aiAgentId": "", "aiEnabled": false, "applicationId": 1234, "queueSid": "", "workflowSid": "", "workspaceSid": "" }, "webhook_sid": "" }'

Changes a Viber bot’s stored settings. Every field is optional and an empty one keeps the stored value; metadata, when sent, replaces the routing metadata as a whole and must carry applicationId > 0 (and aiAgentId when aiEnabled). bot_id cannot be changed. account_id moves the bot to one of the caller’s direct sub-accounts. webhook_sid moves it to another platform webhook not used by another bot. Viber is not called: a new auth_token is stored as given, without being checked or encrypted, and the bot’s Viber webhook is not set again. To rotate a bot’s token, use PUT …/Integrations/Channels/{connection_id}/Credentials, which checks it with Viber and re-registers the webhook. A rename here does not change the channel connection’s display_name. Authentication: HTTP Basic with the account’s Auth ID and Auth Secret. Access is by the authenticated account, not the path: a bot is visible to the account that handles it (account_id) and to that account’s parent (parent_auth_id); for anyone else it is 404. {auth_id} should be the authenticated account’s Auth ID.

auth_id
required
string

Auth ID of the authenticated account

bot_id
required
string

Viber bot id (bot_id; for a bot connected through the Channels API, the connection’s provider_sender)

Fields to change

Media type application/json
object
account_id

AccountID lets a parent account connect a bot for one of its sub-accounts; empty means the account in the path.

string

Example

auth_token

AuthToken replaces the stored Viber token as given; empty keeps the current one.

string

Example

bot_avatar

BotAvatar is the new avatar URL; empty keeps the current one.

string

Example

https://example.com/avatar.png
bot_id

BotID on update must be empty or equal to the bot id in the path: it cannot be changed.

string

Example

bot_name

BotName is the new sender name (up to 28 characters); empty keeps the current one.

string

Example

Acme Support
metadata

Metadata, when sent, replaces the bot’s routing metadata as a whole.

object
aiAgentId

AIAgentID is the AI agent to answer first; required when aiEnabled is true.

string

Example

aiEnabled

AIEnabled hands conversations to aiAgentId first.

boolean

Example

false
applicationId

ApplicationID is the SIPRTC application that handles the bot’s messages; must be greater than 0 whenever metadata is sent.

integer

Example

1234
queueSid

QueueSID is the contact-centre queue (optional).

string

Example

workflowSid

WorkflowSID is the contact-centre workflow (optional).

string

Example

workspaceSid

WorkspaceSID is the contact-centre workspace to route conversations to (optional).

string

Example

webhook_sid

WebhookSid moves the bot to another platform webhook (not used by another bot); empty keeps the current one.

string

Example

OK

Media type application/json
object
data

Data is the bot.

object
account_id

AccountID is the Auth ID of the account that handles the bot’s conversations.

string
auth_token

AuthToken is the bot’s Viber token, masked in every response (first 6 and last 4 characters of the stored value, or [REDACTED] when short).

string
bot_avatar

BotAvatar is the URL of the bot’s avatar image, if set.

string
bot_id

BotID is the bot’s id: Viber’s own id for a bot connected through the Channels API (the connection’s provider_sender).

string
bot_name

BotName is the sender name shown in Viber (up to 28 characters).

string
created_at

CreatedAt is when the bot was stored (RFC 3339, UTC).

string
metadata

Metadata routes the bot’s conversations.

object
aiAgentId

AIAgentID is the AI agent that answers when aiEnabled is true.

string
aiEnabled

AIEnabled hands conversations to the AI agent aiAgentId first.

boolean
applicationId

ApplicationID is the SIPRTC application that handles the bot’s messages.

integer
queueSid

QueueSID is the contact-centre queue, if any.

string
workflowSid

WorkflowSID is the contact-centre workflow, if any.

string
workspaceSid

WorkspaceSID is the contact-centre workspace conversations are routed to, if any.

string
parent_auth_id

ParentAuthID is the Auth ID of that account’s parent, which owns the webhook; empty for a top-level account.

string
updated_at

UpdatedAt is when the bot last changed (RFC 3339, UTC).

string
webhook_sid

WebhookSid is the platform webhook Viber calls back for this bot (a UUID).

string
message

Message is “Viber bot updated successfully” on an update; absent on a read.

string
status

Status is “success”.

string

Example

{
"data": {
"account_id": "AC000000000000000000",
"auth_token": "enc:v1...AbCd",
"bot_avatar": "https://example.com/avatar.png",
"bot_id": "pa:5000000000000000001",
"bot_name": "Acme Support",
"created_at": "2026-11-20T10:15:00Z",
"metadata": {
"aiAgentId": "",
"aiEnabled": false,
"applicationId": 1234,
"queueSid": "WQ00000000000000000000000000000000",
"workflowSid": "WW00000000000000000000000000000000",
"workspaceSid": "WS00000000000000000000000000000000"
},
"parent_auth_id": "AC000000000000000099",
"updated_at": "2026-11-20T10:15:00Z",
"webhook_sid": "9f1c2d3e-0000-4000-8000-000000000002"
},
"message": "Viber bot updated successfully",
"status": "success"
}

Invalid body, bot_name over 28 characters, metadata without applicationId or aiAgentId, a bot_id change, or an account_id that is not a direct sub-account of the caller

Media type application/json
object
message

Message says what went wrong.

string
status

Status is always “failed” on an error (some validation errors omit it).

string

Example

{
"message": "error message",
"status": "failed"
}

Missing or invalid credentials; the body is the JSON string Authentication failed

Media type application/json
string

Example generated

example

No such bot visible to this account (message: viber bot not found)

Media type application/json
object
message

Message says what went wrong.

string
status

Status is always “failed” on an error (some validation errors omit it).

string

Example

{
"message": "error message",
"status": "failed"
}

Webhook_sid is used by another bot

Media type application/json
object
message

Message says what went wrong.

string
status

Status is always “failed” on an error (some validation errors omit it).

string

Example

{
"message": "error message",
"status": "failed"
}

Storage error or a failed account lookup

Media type application/json
object
message

Message says what went wrong.

string
status

Status is always “failed” on an error (some validation errors omit it).

string

Example

{
"message": "error message",
"status": "failed"
}