Create an attribute definition
curl --request POST \
--url https://app.nex.ai/api/developers/v1/objects/{slug}/attributes \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Status",
"slug": "status",
"type": "select",
"description": "Current status",
"options": {
"is_required": true,
"select_options": [
{
"name": "Open"
},
{
"name": "In Progress"
},
{
"name": "Done"
}
]
}
}
'import requests
url = "https://app.nex.ai/api/developers/v1/objects/{slug}/attributes"
payload = {
"name": "Status",
"slug": "status",
"type": "select",
"description": "Current status",
"options": {
"is_required": True,
"select_options": [{ "name": "Open" }, { "name": "In Progress" }, { "name": "Done" }]
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Status',
slug: 'status',
type: 'select',
description: 'Current status',
options: {
is_required: true,
select_options: [{name: 'Open'}, {name: 'In Progress'}, {name: 'Done'}]
}
})
};
fetch('https://app.nex.ai/api/developers/v1/objects/{slug}/attributes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.nex.ai/api/developers/v1/objects/{slug}/attributes"
payload := strings.NewReader("{\n \"name\": \"Status\",\n \"slug\": \"status\",\n \"type\": \"select\",\n \"description\": \"Current status\",\n \"options\": {\n \"is_required\": true,\n \"select_options\": [\n {\n \"name\": \"Open\"\n },\n {\n \"name\": \"In Progress\"\n },\n {\n \"name\": \"Done\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"description": "<string>",
"id": "<string>",
"name": "<string>",
"options": {
"is_multi_value": true,
"is_required": true,
"is_unique": true,
"is_whole_number": true,
"select_options": [
{
"id": "<string>",
"name": "<string>"
}
],
"use_raw_format": true
},
"slug": "<string>",
"type": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}Schema
Create an attribute definition
Creates a new attribute definition on an object type
POST
/
v1
/
objects
/
{slug}
/
attributes
Create an attribute definition
curl --request POST \
--url https://app.nex.ai/api/developers/v1/objects/{slug}/attributes \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Status",
"slug": "status",
"type": "select",
"description": "Current status",
"options": {
"is_required": true,
"select_options": [
{
"name": "Open"
},
{
"name": "In Progress"
},
{
"name": "Done"
}
]
}
}
'import requests
url = "https://app.nex.ai/api/developers/v1/objects/{slug}/attributes"
payload = {
"name": "Status",
"slug": "status",
"type": "select",
"description": "Current status",
"options": {
"is_required": True,
"select_options": [{ "name": "Open" }, { "name": "In Progress" }, { "name": "Done" }]
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Status',
slug: 'status',
type: 'select',
description: 'Current status',
options: {
is_required: true,
select_options: [{name: 'Open'}, {name: 'In Progress'}, {name: 'Done'}]
}
})
};
fetch('https://app.nex.ai/api/developers/v1/objects/{slug}/attributes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.nex.ai/api/developers/v1/objects/{slug}/attributes"
payload := strings.NewReader("{\n \"name\": \"Status\",\n \"slug\": \"status\",\n \"type\": \"select\",\n \"description\": \"Current status\",\n \"options\": {\n \"is_required\": true,\n \"select_options\": [\n {\n \"name\": \"Open\"\n },\n {\n \"name\": \"In Progress\"\n },\n {\n \"name\": \"Done\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"description": "<string>",
"id": "<string>",
"name": "<string>",
"options": {
"is_multi_value": true,
"is_required": true,
"is_unique": true,
"is_whole_number": true,
"select_options": [
{
"id": "<string>",
"name": "<string>"
}
],
"use_raw_format": true
},
"slug": "<string>",
"type": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}Authorizations
API key for authentication (format: "Bearer YOUR_API_KEY")
Path Parameters
Object slug
Body
application/json
Attribute definition to create
Display name
URL-safe identifier
Attribute value type
Available options:
text, number, email, phone, url, date, boolean, currency, location, select, social_profile, domain, full_name Description
Hide child attributes
Hide child attributes
Field is required
Value must be unique
Allow multiple values
Store raw format (numbers)
Number must be integer
Response
Created attribute definition
Last modified on March 26, 2026
⌘I