Create CRM record relationship
POST
/v1/crm/object-types/{objectKind}/records/{objectID}/relationshipsAuthorization
bearerAuthbearerAuthrequiredor
apiKeyAuthapiKeyAuthrequiredPath parameters
objectKindstringrequiredobjectIDstringrequiredRequest body
requiredapplication/jsonis_primarybooleanrequiredmetadataanyrelationship_definition_idstringrequiredrolestringto_object_idstringrequiredto_object_kindstringrequiredResponses
200OK
created_atstringrequiredfrom_object_idstringrequiredfrom_object_kindstringrequiredidstringrequiredis_primarybooleanrequiredmetadataanyrequiredrelated_object_idstringrequiredrelated_object_kindstringrequiredrelationship_definition_idstringrequiredrelationship_keystringrequiredrolestringto_object_idstringrequiredto_object_kindstringrequiredupdated_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_idstring404Not Found
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/object-types/string/records/string/relationships" \
-H "Content-Type: application/json" \
-d '{
"is_primary": true,
"metadata": "string",
"relationship_definition_id": "string",
"role": "string",
"to_object_id": "string",
"to_object_kind": "string"
}'const response = await fetch("/v1/crm/object-types/string/records/string/relationships", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"is_primary": true,
"metadata": "string",
"relationship_definition_id": "string",
"role": "string",
"to_object_id": "string",
"to_object_kind": "string"
})
});import requests
response = requests.post(
"/v1/crm/object-types/string/records/string/relationships",
headers={
"Content-Type": "application/json"
},
json={
"is_primary": True,
"metadata": "string",
"relationship_definition_id": "string",
"role": "string",
"to_object_id": "string",
"to_object_kind": "string"
},
)Response
{
"created_at": "string",
"from_object_id": "string",
"from_object_kind": "string",
"id": "string",
"is_primary": true,
"metadata": "string",
"related_object_id": "string",
"related_object_kind": "string",
"relationship_definition_id": "string",
"relationship_key": "string",
"role": "string",
"to_object_id": "string",
"to_object_kind": "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"
}
}{
"error": {
"code": "string",
"details": [
{
"code": "string",
"field": "string",
"location": "string",
"message": "string"
}
],
"message": "string",
"request_id": "string"
}
}