Create a field definition
Creates a custom field definition scoped to the current workspace.
Required: key, name, type. Requires ADMIN or OWNER workspace role.
The key must be unique within the workspace, start with a lowercase letter,
and contain only lowercase letters, digits, and underscores (max 64 characters).
Valid type values: text, number, boolean, date, datetime,
select, multiSelect, markdown, fractionalIndex, resourceId.
curl --request POST \
--url https://slog.ai/fields \
--header 'Content-Type: application/json' \
--header 'slog-api-key: <api-key>' \
--data '
{
"key": "sprint_points",
"name": "Sprint Points",
"type": "number",
"description": "Story-point estimate for sprint planning.",
"recordTypes": [
"task"
]
}
'import requests
url = "https://slog.ai/fields"
payload = {
"key": "sprint_points",
"name": "Sprint Points",
"type": "number",
"description": "Story-point estimate for sprint planning.",
"recordTypes": ["task"]
}
headers = {
"slog-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'slog-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
key: 'sprint_points',
name: 'Sprint Points',
type: 'number',
description: 'Story-point estimate for sprint planning.',
recordTypes: ['task']
})
};
fetch('https://slog.ai/fields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://slog.ai/fields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'key' => 'sprint_points',
'name' => 'Sprint Points',
'type' => 'number',
'description' => 'Story-point estimate for sprint planning.',
'recordTypes' => [
'task'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"slog-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://slog.ai/fields"
payload := strings.NewReader("{\n \"key\": \"sprint_points\",\n \"name\": \"Sprint Points\",\n \"type\": \"number\",\n \"description\": \"Story-point estimate for sprint planning.\",\n \"recordTypes\": [\n \"task\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("slog-api-key", "<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))
}HttpResponse<String> response = Unirest.post("https://slog.ai/fields")
.header("slog-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"sprint_points\",\n \"name\": \"Sprint Points\",\n \"type\": \"number\",\n \"description\": \"Story-point estimate for sprint planning.\",\n \"recordTypes\": [\n \"task\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slog.ai/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["slog-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"sprint_points\",\n \"name\": \"Sprint Points\",\n \"type\": \"number\",\n \"description\": \"Story-point estimate for sprint planning.\",\n \"recordTypes\": [\n \"task\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"field": {
"id": "fdef_01jqfield0001",
"key": "sprint_points",
"name": "Sprint Points",
"description": "Story-point estimate for sprint planning.",
"type": "number",
"presentation": null,
"metadata": {},
"recordTypes": [
"task"
],
"isBuiltIn": false,
"createdAt": "2026-05-01T10:00:00.000Z",
"updatedAt": "2026-05-01T10:00:00.000Z"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "teamId is required"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Requires ADMIN or OWNER role"
}
}{
"error": {
"code": "CONFLICT",
"message": "A team with prefix ENG already exists"
}
}Authorizations
API key obtained from the Slog dashboard or returned by the signup/invite-redeem
flows. Pass as the slog-api-key header.
Body
Unique identifier within the workspace. Must start with a lowercase letter and contain only lowercase letters, digits, and underscores.
64^[a-z][a-z0-9_]*$"sprint_points"
1"Sprint Points"
text, number, boolean, date, datetime, select, multiSelect, markdown, fractionalIndex, resourceId "number"
"Story-point estimate for sprint planning."
Optional rendering hint for UI clients.
null
Type-specific metadata. For select/multiSelect fields, provide a choices array of allowed string values.
{}
Resource types this field applies to.
["task"]
Response
Field definition created.
Show child attributes
Show child attributes
curl --request POST \
--url https://slog.ai/fields \
--header 'Content-Type: application/json' \
--header 'slog-api-key: <api-key>' \
--data '
{
"key": "sprint_points",
"name": "Sprint Points",
"type": "number",
"description": "Story-point estimate for sprint planning.",
"recordTypes": [
"task"
]
}
'import requests
url = "https://slog.ai/fields"
payload = {
"key": "sprint_points",
"name": "Sprint Points",
"type": "number",
"description": "Story-point estimate for sprint planning.",
"recordTypes": ["task"]
}
headers = {
"slog-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'slog-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
key: 'sprint_points',
name: 'Sprint Points',
type: 'number',
description: 'Story-point estimate for sprint planning.',
recordTypes: ['task']
})
};
fetch('https://slog.ai/fields', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://slog.ai/fields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'key' => 'sprint_points',
'name' => 'Sprint Points',
'type' => 'number',
'description' => 'Story-point estimate for sprint planning.',
'recordTypes' => [
'task'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"slog-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://slog.ai/fields"
payload := strings.NewReader("{\n \"key\": \"sprint_points\",\n \"name\": \"Sprint Points\",\n \"type\": \"number\",\n \"description\": \"Story-point estimate for sprint planning.\",\n \"recordTypes\": [\n \"task\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("slog-api-key", "<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))
}HttpResponse<String> response = Unirest.post("https://slog.ai/fields")
.header("slog-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"sprint_points\",\n \"name\": \"Sprint Points\",\n \"type\": \"number\",\n \"description\": \"Story-point estimate for sprint planning.\",\n \"recordTypes\": [\n \"task\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slog.ai/fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["slog-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"sprint_points\",\n \"name\": \"Sprint Points\",\n \"type\": \"number\",\n \"description\": \"Story-point estimate for sprint planning.\",\n \"recordTypes\": [\n \"task\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"field": {
"id": "fdef_01jqfield0001",
"key": "sprint_points",
"name": "Sprint Points",
"description": "Story-point estimate for sprint planning.",
"type": "number",
"presentation": null,
"metadata": {},
"recordTypes": [
"task"
],
"isBuiltIn": false,
"createdAt": "2026-05-01T10:00:00.000Z",
"updatedAt": "2026-05-01T10:00:00.000Z"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "teamId is required"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Requires ADMIN or OWNER role"
}
}{
"error": {
"code": "CONFLICT",
"message": "A team with prefix ENG already exists"
}
}