Update a Channel

Update a channel. The main use is assigning the agent that answers inbound (defaultAgentId) without touching the rest of the configuration. Only the fields included in the request are modified.

PATCH https://api.platica.mx/v1/channels/{channelId}

URL parameters

ParameterTypeDescriptionRequired
channelIdstringChannel document id or its prefixedChannelId

Query parameters

ParameterTypeDescriptionRequired
workspacestringWorkspace ID. Required if your API key is multi-workspace

Request body

All fields are optional, but you must send at least one.

FieldTypeDescription
defaultAgentIdstring | nullID of the agent that answers inbound on the channel. Use null to unassign
namestringNew display name for the channel
isConnectedbooleanConnect (true) or disconnect (false) the channel

Update behavior

  • When assigning defaultAgentId, the agent must exist and not be deleted.
  • The assignment is channel-level and does not affect the configuration of the agent's other channels.

Request example

{
  "defaultAgentId": "tVKljCHCNiebQdasHeit"
}

Response

{
  "status": "success",
  "message": "Channel updated successfully",
  "data": {
    "id": "759211583950552",
    "prefixedChannelId": "wb-759211583950552",
    "provider": "meta",
    "platform": "whatsapp",
    "isConnected": true,
    "defaultAgentId": "tVKljCHCNiebQdasHeit",
    "name": "JAFRA Cosméticos Aguascalientes",
    "displayPhoneNumber": "+52 1 449 189 2097",
    "phoneNumber": "5214491892097"
  }
}