Create an attribute stage
curl --request POST \
--url https://api.connect-crm.com/v1/objects/{identifier}/attributes/{attribute}/stages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"sort_order": 1,
"config": {
"is_closed": true,
"is_won": true,
"is_lost": true
}
}
'import requests
url = "https://api.connect-crm.com/v1/objects/{identifier}/attributes/{attribute}/stages"
payload = {
"title": "<string>",
"sort_order": 1,
"config": {
"is_closed": True,
"is_won": True,
"is_lost": True
}
}
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({
title: '<string>',
sort_order: 1,
config: {is_closed: true, is_won: true, is_lost: true}
})
};
fetch('https://api.connect-crm.com/v1/objects/{identifier}/attributes/{attribute}/stages', 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.connect-crm.com/v1/objects/{identifier}/attributes/{attribute}/stages",
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([
'title' => '<string>',
'sort_order' => 1,
'config' => [
'is_closed' => true,
'is_won' => true,
'is_lost' => true
]
]),
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.connect-crm.com/v1/objects/{identifier}/attributes/{attribute}/stages"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"sort_order\": 1,\n \"config\": {\n \"is_closed\": true,\n \"is_won\": true,\n \"is_lost\": true\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.connect-crm.com/v1/objects/{identifier}/attributes/{attribute}/stages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"sort_order\": 1,\n \"config\": {\n \"is_closed\": true,\n \"is_won\": true,\n \"is_lost\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connect-crm.com/v1/objects/{identifier}/attributes/{attribute}/stages")
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 \"title\": \"<string>\",\n \"sort_order\": 1,\n \"config\": {\n \"is_closed\": true,\n \"is_won\": true,\n \"is_lost\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"archived_at": "2024-09-04T20:45:09Z",
"id": {
"stage_id": "9293961c-df93-4d6d-a2cc-fc3e353b2d10",
"attribute_id": "9293961c-df93-4d6d-a2cc-fc3e353b2d10",
"object_id": "9293961c-df93-4d6d-a2cc-fc3e353b2d10",
"workspace_id": "9293961c-df93-4d6d-a2cc-fc3e353b2d10"
},
"sort_order": 1,
"title": "Stage 1",
"config": {
"is_closed": true,
"is_won": true,
"is_lost": true
}
}
}{
"statusCode": 404,
"type": "not_authorized_error",
"code": "not_authorized",
"requestId": "123e4567-e89b-12d3-a456-426655440000"
}{
"statusCode": 403,
"type": "forbidden_error",
"code": "forbidden",
"requestId": "123e4567-e89b-12d3-a456-426655440000"
}{
"statusCode": 404,
"type": "invalid_request_error",
"code": "not_found",
"requestId": "123e4567-e89b-12d3-a456-426655440000"
}{
"statusCode": 409,
"type": "invalid_request_error",
"code": "",
"requestId": "123e4567-e89b-12d3-a456-426655440000"
}{
"statusCode": 500,
"type": "invalid_error",
"code": "",
"requestId": "123e4567-e89b-12d3-a456-426655440000"
}Attributes
Create an attribute stage
Creates a new attribute stage on either an object.
POST
/
v1
/
objects
/
{identifier}
/
attributes
/
{attribute}
/
stages
Create an attribute stage
curl --request POST \
--url https://api.connect-crm.com/v1/objects/{identifier}/attributes/{attribute}/stages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"sort_order": 1,
"config": {
"is_closed": true,
"is_won": true,
"is_lost": true
}
}
'import requests
url = "https://api.connect-crm.com/v1/objects/{identifier}/attributes/{attribute}/stages"
payload = {
"title": "<string>",
"sort_order": 1,
"config": {
"is_closed": True,
"is_won": True,
"is_lost": True
}
}
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({
title: '<string>',
sort_order: 1,
config: {is_closed: true, is_won: true, is_lost: true}
})
};
fetch('https://api.connect-crm.com/v1/objects/{identifier}/attributes/{attribute}/stages', 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.connect-crm.com/v1/objects/{identifier}/attributes/{attribute}/stages",
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([
'title' => '<string>',
'sort_order' => 1,
'config' => [
'is_closed' => true,
'is_won' => true,
'is_lost' => true
]
]),
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.connect-crm.com/v1/objects/{identifier}/attributes/{attribute}/stages"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"sort_order\": 1,\n \"config\": {\n \"is_closed\": true,\n \"is_won\": true,\n \"is_lost\": true\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.connect-crm.com/v1/objects/{identifier}/attributes/{attribute}/stages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"sort_order\": 1,\n \"config\": {\n \"is_closed\": true,\n \"is_won\": true,\n \"is_lost\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connect-crm.com/v1/objects/{identifier}/attributes/{attribute}/stages")
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 \"title\": \"<string>\",\n \"sort_order\": 1,\n \"config\": {\n \"is_closed\": true,\n \"is_won\": true,\n \"is_lost\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"archived_at": "2024-09-04T20:45:09Z",
"id": {
"stage_id": "9293961c-df93-4d6d-a2cc-fc3e353b2d10",
"attribute_id": "9293961c-df93-4d6d-a2cc-fc3e353b2d10",
"object_id": "9293961c-df93-4d6d-a2cc-fc3e353b2d10",
"workspace_id": "9293961c-df93-4d6d-a2cc-fc3e353b2d10"
},
"sort_order": 1,
"title": "Stage 1",
"config": {
"is_closed": true,
"is_won": true,
"is_lost": true
}
}
}{
"statusCode": 404,
"type": "not_authorized_error",
"code": "not_authorized",
"requestId": "123e4567-e89b-12d3-a456-426655440000"
}{
"statusCode": 403,
"type": "forbidden_error",
"code": "forbidden",
"requestId": "123e4567-e89b-12d3-a456-426655440000"
}{
"statusCode": 404,
"type": "invalid_request_error",
"code": "not_found",
"requestId": "123e4567-e89b-12d3-a456-426655440000"
}{
"statusCode": 409,
"type": "invalid_request_error",
"code": "",
"requestId": "123e4567-e89b-12d3-a456-426655440000"
}{
"statusCode": 500,
"type": "invalid_error",
"code": "",
"requestId": "123e4567-e89b-12d3-a456-426655440000"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
A UUID or slug to identify the object.
A UUID or slug to identify the attribute.
Body
application/json
Response
Success
Show child attributes
Show child attributes
⌘I