profiles
Create profile
Creates a new profile with a name, optional description, and color.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
namestring
description?string
color?string
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.createProfile({ body: { name: 'Example', },});console.log(data);{
"message": "Profile created successfully",
"profile": {
"_id": "64f0a1b2c3d4e5f6a7b8c9d0",
"userId": "6507a1b2c3d4e5f6a7b8c9d0",
"name": "Marketing Team",
"description": "Profile for marketing campaigns",
"color": "#4CAF50",
"isDefault": false,
"createdAt": "2024-11-01T10:00:00Z"
}
}Empty
{
"error": "Unauthorized"
}{
"error": "X (Twitter) requires a payment method due to API pass-through costs. Add a payment method to connect an X account.",
"code": "PAYMENT_REQUIRED",
"reason": "free_tier_exceeded",
"documentation_url": "https://docs.zernio.com/billing/payment-method-required",
"dashboard_url": "https://zernio.com/dashboard?tab=billing",
"details": {
"free_tier_account_limit": 2,
"current_account_count": 5,
"has_payment_method": true,
"public_account_limit": 2000,
"effective_account_limit": 2000
}
}Empty