Create CRM segment
POST
/v1/crm/segmentsAuthorization
bearerAuthbearerAuthrequiredor
apiKeyAuthapiKeyAuthrequiredRequest body
requiredapplication/jsondescriptionstringfilter_logicstringAllowed:
andorfiltersanynamestringrequiredobject_kindstringrequiredsegment_typestringAllowed:
dynamicstaticResponses
200OK
contact_countinteger<int32>requiredcreated_atstringrequireddescriptionstring | nullrequiredfilter_logicstringrequiredfiltersanyrequiredidstringrequirednamestringrequiredobject_kindstringrequiredpredefinedbooleanrequiredsegment_typestringrequiredupdated_atstringrequired400Bad Request
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring401Unauthorized
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring403Forbidden
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring422Unprocessable Entity
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstring500Internal Server Error
errorErrorBodyrequiredShow propertiesHide properties
codestringrequireddetailsErrorDetail[] | nullShow propertiesHide properties
Array of
ErrorDetailcodestringfieldstringlocationstringmessagestringrequiredmessagestringrequiredrequest_idstringRequest
curl -X POST "/v1/crm/segments" \
-H "Content-Type: application/json" \
-d '{
"description": "string",
"filter_logic": "and",
"filters": "string",
"name": "string",
"object_kind": "string",
"segment_type": "dynamic"
}'const response = await fetch("/v1/crm/segments", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"description": "string",
"filter_logic": "and",
"filters": "string",
"name": "string",
"object_kind": "string",
"segment_type": "dynamic"
})
});import requests
response = requests.post(
"/v1/crm/segments",
headers={
"Content-Type": "application/json"
},
json={
"description": "string",
"filter_logic": "and",
"filters": "string",
"name": "string",
"object_kind": "string",
"segment_type": "dynamic"
},
)Response
{
"contact_count": 0,
"created_at": "string",
"description": "string",
"filter_logic": "string",
"filters": "string",
"id": "string",
"name": "string",
"object_kind": "string",
"predefined": true,
"segment_type": "string",
"updated_at": "string"
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}