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
}'
import requests
import json
url = "https://app.nashra.ai/api/v1/fields"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"field_name": "Company Size",
"data_name": "company_size",
"type": "number",
"is_required": false
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://app.nashra.ai/api/v1/fields", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"field_name": "Company Size",
"data_name": "company_size",
"type": "number",
"is_required": false
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"field_name": "Company Size",
"data_name": "company_size",
"type": "number",
"is_required": false
}`)
req, err := http.NewRequest("POST", "https://app.nashra.ai/api/v1/fields", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://app.nashra.ai/api/v1/fields')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"field_name": "Company Size",
"data_name": "company_size",
"type": "number",
"is_required": false
}'
response = http.request(request)
puts response.body
{
"data": {
"uuid": "9a3c2b6e-8f3a-4f7c-b1a4-1f1d5d9e4c22",
"field_name": "Company",
"data_name": "company",
"type": "text",
"is_required": false
},
"meta": {}
}
{
"error": "Unprocessable Entity",
"message": "The request was well-formed but contains semantic errors",
"code": 422,
"details": [
{
"field": "password",
"message": "Password must be at least 8 characters long"
}
]
}
POST
/fields
POST
Bearer Token
Bearer Tokenstring
RequiredAPI token generated in Settings > API Tokens
API token generated in Settings > API Tokens
Content-Typestring
RequiredThe media type of the request body
Options: application/json
data_namestring
RequiredLowercase alphanumeric with underscores only
typestring
RequiredOptions: text, number, date, boolean
Request Preview
Response
Response will appear here after sending the request
Authentication
header
Authorizationstring
RequiredBearer token. API token generated in Settings > API Tokens
Body
application/json
data_namestring
RequiredLowercase alphanumeric with underscores only
typestring
RequiredAllowed values:
textnumberdatebooleanResponses
Was this page helpful?
Last updated Mar 2, 2026
Built with Documentation.AI