profiles
Get profile
Returns a single profile by ID, including its name, color, and default status.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
profileIdstring
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.getProfile({ path: { profileId: 'profile_abc123', },});console.log(data);{
"profile": {
"_id": "64f0a1b2c3d4e5f6a7b8c9d0",
"userId": "6507a1b2c3d4e5f6a7b8c9d0",
"name": "Marketing Team",
"description": "Profile for marketing campaigns",
"color": "#4CAF50",
"isDefault": false,
"createdAt": "2024-11-01T10:00:00Z"
}
}{
"error": "Unauthorized"
}{
"error": "Not found"
}Create profile POST
Creates a new profile with a name, optional description, and color. Names are unique per workspace: a duplicate returns a 409 whose details.existingProfileId carries the id of the existing profile. Send an Idempotency-Key header to make retries safe: a retried create with the same key and body replays the original 201 (same _id) instead of conflicting.
Update profile PUT
Updates a profile's name, description, color, or default status.