profiles
Update profile
Updates a profile's name, description, color, or default status.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
profileIdstring
name?string
description?string
color?string
isDefault?boolean
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.profiles.updateProfile({ path: { profileId: 'profile_abc123', }, body: { name: 'Example', description: 'Hello, world!', color: 'string', },});console.log(data);{
"message": "Profile updated successfully",
"profile": {
"_id": "64f0a1b2c3d4e5f6a7b8c9d0",
"userId": "6507a1b2c3d4e5f6a7b8c9d0",
"name": "Marketing Team (Updated)",
"description": "Profile for marketing campaigns",
"color": "#2196F3",
"isDefault": true,
"createdAt": "2024-11-01T10:00:00Z"
}
}Empty
{
"error": "Unauthorized"
}{
"error": "Not found"
}Empty
Get profile GET
Returns a single profile by ID, including its name, color, and default status.
Delete profile DELETE
Permanently deletes a profile. Active connected accounts block deletion (returns 400) - disconnect them first. Any remaining disconnected accounts and provisioned WhatsApp numbers are moved to another of your profiles (a new one is created only if needed), never deleted.