Custom FieldsCreate Custom Field

Create Custom Field

Create a new custom field

curl -X POST "https://app.nashra.ai/api/v1/fields" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "field_name": "Company Size",
  "data_name": "company_size",
  "type": "number",
  "is_required": false
}'
{
  "data": {
    "uuid": "9a3c2b6e-8f3a-4f7c-b1a4-1f1d5d9e4c22",
    "field_name": "Company",
    "data_name": "company",
    "type": "text",
    "is_required": false
  },
  "meta": {}
}
POST
/fields
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

API key created in Settings → API keys

API key created in Settings → API keys
Content-Typestring
Required

The media type of the request body

Options: application/json
data_namestring
Required

Lowercase letters, digits, and underscores only. The keys email, first_name, last_name, phone, phone_country, and visitor_id are reserved and can't be used.

Pattern: ^[a-z0-9_]+$
typestring
Required
Options: text, number, date, boolean
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. API key created in Settings → API keys

Body

application/json
field_namestring
Required
Example:
Company Size
data_namestring
Required

Lowercase letters, digits, and underscores only. The keys email, first_name, last_name, phone, phone_country, and visitor_id are reserved and can't be used.

Example:
company_size
typestring
Required
Allowed values:textnumberdateboolean
is_requiredboolean
Example:
false

Responses