custom fields
Create custom field
Create a new custom field definition. Supported types are text, number, date, boolean, and select.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
profileIdstring
namestring
slug?string
Auto-generated from name if not provided
typestring
Value in
"text" | "number" | "date" | "boolean" | "select"options?array<string>
Required for select type
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.customfields.createCustomField({ body: { profileId: 'profile_abc123', name: 'Example', type: 'text', },});console.log(data);{
"success": true,
"field": {
"id": "string",
"name": "string",
"slug": "string",
"type": "text",
"options": [
"string"
],
"createdAt": "2019-08-24T14:15:22Z"
}
}{
"error": "Unauthorized"
}Empty