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"
}
}{
"error": "Unauthorized"
}{
"error": "Not found"
}