Create custom field
curl --request POST \
--url https://api.connectadesk.com/api/v1/custom-fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Plano",
"key": "plano",
"description": "<string>",
"groupName": "Comercial",
"isPublic": true,
"alwaysVisible": false,
"options": [
{
"name": "Plano",
"color": "#6941C6"
}
]
}
'import requests
url = "https://api.connectadesk.com/api/v1/custom-fields"
payload = {
"name": "Plano",
"key": "plano",
"description": "<string>",
"groupName": "Comercial",
"isPublic": True,
"alwaysVisible": False,
"options": [
{
"name": "Plano",
"color": "#6941C6"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Plano',
key: 'plano',
description: '<string>',
groupName: 'Comercial',
isPublic: true,
alwaysVisible: false,
options: [{name: 'Plano', color: '#6941C6'}]
})
};
fetch('https://api.connectadesk.com/api/v1/custom-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://api.connectadesk.com/api/v1/custom-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([
'name' => 'Plano',
'key' => 'plano',
'description' => '<string>',
'groupName' => 'Comercial',
'isPublic' => true,
'alwaysVisible' => false,
'options' => [
[
'name' => 'Plano',
'color' => '#6941C6'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.connectadesk.com/api/v1/custom-fields"
payload := strings.NewReader("{\n \"name\": \"Plano\",\n \"key\": \"plano\",\n \"description\": \"<string>\",\n \"groupName\": \"Comercial\",\n \"isPublic\": true,\n \"alwaysVisible\": false,\n \"options\": [\n {\n \"name\": \"Plano\",\n \"color\": \"#6941C6\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.connectadesk.com/api/v1/custom-fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Plano\",\n \"key\": \"plano\",\n \"description\": \"<string>\",\n \"groupName\": \"Comercial\",\n \"isPublic\": true,\n \"alwaysVisible\": false,\n \"options\": [\n {\n \"name\": \"Plano\",\n \"color\": \"#6941C6\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectadesk.com/api/v1/custom-fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Plano\",\n \"key\": \"plano\",\n \"description\": \"<string>\",\n \"groupName\": \"Comercial\",\n \"isPublic\": true,\n \"alwaysVisible\": false,\n \"options\": [\n {\n \"name\": \"Plano\",\n \"color\": \"#6941C6\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 44,
"key": "tipo_de_cliente",
"name": "Tipo de cliente",
"description": "Commercial classification used in the service playbook.",
"application": "contact",
"type": "select",
"groupName": "Comercial",
"isPublic": true,
"alwaysVisible": true,
"isSystem": false,
"order": 2,
"options": [
{
"id": 91,
"name": "Varejo",
"color": "#0E7490",
"order": 0
},
{
"id": 92,
"name": "Atacado",
"color": "#6941C6",
"order": 1
}
],
"createdAt": "2026-06-09T09:30:00.000Z",
"updatedAt": "2026-08-14T16:05:00.000Z"
}
}{
"error": {
"code": "ERR_API_VALIDATION",
"message": "O campo `number` é obrigatório."
}
}{
"error": {
"code": "ERR_API_UNAUTHORIZED",
"message": "Token de API ausente ou inválido."
}
}{
"error": {
"code": "ERR_API_FORBIDDEN_SCOPE",
"message": "O token não tem permissão para este método neste módulo. A mensagem real nomeia os dois."
}
}{
"error": {
"code": "ERR_API_IDEMPOTENCY_KEY_REUSED",
"message": "Idempotency-Key já usada com um corpo diferente."
}
}{
"error": {
"code": "ERR_API_VALIDATION",
"message": "O parâmetro `application` é obrigatório e aceita \"contact\" ou \"card\"."
}
}Authorizations
API token in the sk_live_… format.
Headers
Unique key for the operation. If you repeat the call with the same key and the same body, you get the stored response.
200Body
Display name.
60"Plano"
Where the field applies: contact for contacts, card for CRM cards.
contact, card Type of value accepted. It defines the validation applied on each save:
| value | accepts |
|---|---|
text | Short text, one line. |
number | Number. |
currency | Monetary amount. |
date | Date. |
select | One of the options registered on the field itself. |
boolean | Yes or no. |
email | Email, with its format validated. |
phone | Phone number. |
link | URL. |
textarea | Long text, several lines. |
text, number, currency, date, select, boolean, email, phone, link, textarea If you leave it out, the key is generated from the name, in minusculas_com_underline format (lowercase with underscores).
40"plano"
Description of the custom field.
120Group the field belongs to in the form. Fields in the same group appear together.
"Comercial"
Makes the field visible to all agents. When false, only users with permission can see it.
Shows the field on the record even when no value is filled in.
List of options. Required when type is select.
Show child attributes
Show child attributes
Response
Created
Show child attributes
Show child attributes
{
"id": 44,
"key": "tipo_de_cliente",
"name": "Tipo de cliente",
"description": "Commercial classification used in the service playbook.",
"application": "contact",
"type": "select",
"groupName": "Comercial",
"isPublic": true,
"alwaysVisible": true,
"isSystem": false,
"order": 2,
"options": [
{
"id": 91,
"name": "Varejo",
"color": "#0E7490",
"order": 0
},
{
"id": 92,
"name": "Atacado",
"color": "#6941C6",
"order": 1
}
],
"createdAt": "2026-06-09T09:30:00.000Z",
"updatedAt": "2026-08-14T16:05:00.000Z"
}
curl --request POST \
--url https://api.connectadesk.com/api/v1/custom-fields \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Plano",
"key": "plano",
"description": "<string>",
"groupName": "Comercial",
"isPublic": true,
"alwaysVisible": false,
"options": [
{
"name": "Plano",
"color": "#6941C6"
}
]
}
'import requests
url = "https://api.connectadesk.com/api/v1/custom-fields"
payload = {
"name": "Plano",
"key": "plano",
"description": "<string>",
"groupName": "Comercial",
"isPublic": True,
"alwaysVisible": False,
"options": [
{
"name": "Plano",
"color": "#6941C6"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Plano',
key: 'plano',
description: '<string>',
groupName: 'Comercial',
isPublic: true,
alwaysVisible: false,
options: [{name: 'Plano', color: '#6941C6'}]
})
};
fetch('https://api.connectadesk.com/api/v1/custom-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://api.connectadesk.com/api/v1/custom-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([
'name' => 'Plano',
'key' => 'plano',
'description' => '<string>',
'groupName' => 'Comercial',
'isPublic' => true,
'alwaysVisible' => false,
'options' => [
[
'name' => 'Plano',
'color' => '#6941C6'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.connectadesk.com/api/v1/custom-fields"
payload := strings.NewReader("{\n \"name\": \"Plano\",\n \"key\": \"plano\",\n \"description\": \"<string>\",\n \"groupName\": \"Comercial\",\n \"isPublic\": true,\n \"alwaysVisible\": false,\n \"options\": [\n {\n \"name\": \"Plano\",\n \"color\": \"#6941C6\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.connectadesk.com/api/v1/custom-fields")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Plano\",\n \"key\": \"plano\",\n \"description\": \"<string>\",\n \"groupName\": \"Comercial\",\n \"isPublic\": true,\n \"alwaysVisible\": false,\n \"options\": [\n {\n \"name\": \"Plano\",\n \"color\": \"#6941C6\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectadesk.com/api/v1/custom-fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Plano\",\n \"key\": \"plano\",\n \"description\": \"<string>\",\n \"groupName\": \"Comercial\",\n \"isPublic\": true,\n \"alwaysVisible\": false,\n \"options\": [\n {\n \"name\": \"Plano\",\n \"color\": \"#6941C6\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 44,
"key": "tipo_de_cliente",
"name": "Tipo de cliente",
"description": "Commercial classification used in the service playbook.",
"application": "contact",
"type": "select",
"groupName": "Comercial",
"isPublic": true,
"alwaysVisible": true,
"isSystem": false,
"order": 2,
"options": [
{
"id": 91,
"name": "Varejo",
"color": "#0E7490",
"order": 0
},
{
"id": 92,
"name": "Atacado",
"color": "#6941C6",
"order": 1
}
],
"createdAt": "2026-06-09T09:30:00.000Z",
"updatedAt": "2026-08-14T16:05:00.000Z"
}
}{
"error": {
"code": "ERR_API_VALIDATION",
"message": "O campo `number` é obrigatório."
}
}{
"error": {
"code": "ERR_API_UNAUTHORIZED",
"message": "Token de API ausente ou inválido."
}
}{
"error": {
"code": "ERR_API_FORBIDDEN_SCOPE",
"message": "O token não tem permissão para este método neste módulo. A mensagem real nomeia os dois."
}
}{
"error": {
"code": "ERR_API_IDEMPOTENCY_KEY_REUSED",
"message": "Idempotency-Key já usada com um corpo diferente."
}
}{
"error": {
"code": "ERR_API_VALIDATION",
"message": "O parâmetro `application` é obrigatório e aceita \"contact\" ou \"card\"."
}
}
