Marketing / Marketing Cloud Platform
Linking a data extension to an attribute group through the REST API returns an Internal Server Error
Summary
Attempts to link a data extension to an attribute group using POST /contacts/v1/relationships can fail with HTTP 500, error code 0, and the message “Internal Server Error.”
In the reported scenario, the customer could create the attribute group but could not obtain the corresponding setDefinitionID. The relationship request was submitted with that identifier blank in both the URL and request body. The customer also substituted the data extension’s Subscriber Key attribute ID for rightAttributeID.
Workaround
A manual alternative is to link the data extension through Contact Builder → Data Designer: open the attribute group, select Link Data Extensions, select the data extension, configure the matching fields and relationship cardinality, and save.
Steps to reproduce
- Authenticate to Marketing Cloud Engagement and obtain an access token for the affected business unit.
- Create an attribute group using:
POST {rest_instance_url}/contacts/v1/attributeGroups
{
"name": "MyAttributeGroup",
"attributeGroupIconKey": "People"
}
- The customer reports that this request succeeds. Retain the attribute group ID.
- Identify the target data extension’s storage object ID. Review the attribute set definitions using:
GET {rest_instance_url}/contacts/v1/attributeSetDefinitions?page=1&pageSize=1000
- In the reported scenario, the customer could not obtain the required
setDefinitionID. - Submit the following relationship request, leaving
setDefinitionIDblank:
POST {rest_instance_url}/contacts/v1/relationships?attributeGroupID={attributeGroupId}&setDefinitionID=&StorageObjectid={storageObjectId}
{
"leftItem": {
"identifier": "{attributeGroupId}",
"relationshipType": "AttributeGroup",
"cardinality": "One"
},
"rightItem": {
"identifier": "",
"relationshipType": "AttributeSet",
"cardinality": "One"
},
"leftRelationshipReferenceType": "CustomerData",
"leftRelationshipIDs": [
{
"type": "int16",
"value": "3"
}
],
"relationshipAttributes": [
{
"rightAttributeID": "{subscriberKeyAttributeId}"
}
]
}
- Replace the populated placeholders with the applicable IDs. For
subscriberKeyAttributeId, use the Subscriber Key field’s attribute ID retrieved from the attribute set definitions, matching the customer’s reported attempt. - Observe HTTP 500 with the response shown below.
Error details
HTTP status: 500 Internal Server Error Response error code: 0 Message: Internal Server Error
History
Description updated
Nov 30, 2026
First tracked here as In Review
Nov 30, 2026