GET /contacts/v1/attributeSetDefinitions

Retrieves all attribute set definition from your contact data model.

Code Example 

To retrieve all of the attribute set definitions for your account, issue a GET request to the /contacts/v1/attributeSetDefinitions endpoint.

Sample Request
1Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
2GET /contacts/v1/attributeSetDefinitions
3Content-Type: application/json
4Authorization: Bearer YOUR_ACCESS_TOKEN

The response contains information about the attribute sets in your contact data model.

The output of this request contains several thousand lines. For a result that’s easier to interpret, retrieve the definitions for a specific attribute set by passing its ID. This sample has been shortened.

Note

Sample Response
1{
2  "page": 1,
3  "pageSize": 50,
4  "count": 14,
5  "items": [
6    {
7      "id": "10f35cd5-f1c1-e311-a1e0-e83935a85380",
8      "key": "PushDemographics",
9      "name": {
10        "value": "MobilePush Demographics"
11      },
12      "fullyQualifiedName": "MobilePush Demographics",
13      "storageLogicalType": "PushAttributes",
14      "isRoot": false,
15      "isSendable": true,
16      "categoryID": 685512,
17      "isShared": false,
18      "dataRetentionProperties": {
19        "setDefinitionID": "10f35cd5-f1c1-e311-a1e0-e83935a85380",
20        "isRowBasedRetention": false,
21        "isResetRetentionPeriodOnImport": false,
22        "isDeleteAtEndOfRetentionPeriod": false
23      },
24      "sendAttributeStorageName": "_ContactID",
25      "sendContactKeyStorageName": "_SubscriberID",
26      "isEvent": false,
27      "relationships": [
28        {
29          "id": "33f35cd5-f1c1-e311-a1e0-e83935a85380",
30          "leftItem": {
31            "relationshipType": "AttributeGroup",
32            "identifier": "30f35cd5-f1c1-e311-a1e0-e83935a85380",
33            "cardinality": "One",
34            "connectingID": {
35              "identifierType": "FullyQualifiedName"
36            },
37            "objectState": "Created"
38          },
39          "rightItem": {
40            "relationshipType": "AttributeSet",
41            "identifier": "10f35cd5-f1c1-e311-a1e0-e83935a85380",
42            "cardinality": "Many",
43            "connectingID": {
44              "identifierType": "FullyQualifiedName"
45            },
46            "objectState": "Created"
47          },
48          "relationshipAttributes": [
49            {
50              "leftAttributeID": "487b6afa-7e4c-e311-8052-e83935a85380",
51              "rightAttributeID": "16f35cd5-f1c1-e311-a1e0-e83935a85380",
52              "leftConnectingID": {
53                "identifierType": "FullyQualifiedName"
54              },
55              "rightConnectingID": {
56                "identifierType": "FullyQualifiedName"
57              },
58              "objectState": "Created"
59            }
60          ],
61          "isSystemDefined": false,
62          "leftRelationshipReferenceType": "CustomerData",
63          "leftRelationshipIDs": [
64            {
65              "type": "int16",
66              "value": "2"
67            }
68          ],
69          "canModify": false,
70          "canRemove": false,
71          "links": {},
72          "objectState": "Created"
73        },
74        {
75          "id": "c0453e25-1167-e411-92ad-e83935a85380",
76          "leftItem": {
77            "relationshipType": "AttributeSet",
78            "identifier": "10f35cd5-f1c1-e311-a1e0-e83935a85380",
79            "cardinality": "One",
80            "connectingID": {
81              "identifierType": "FullyQualifiedName"
82            },
83            "objectState": "Created"
84          },
85          "rightItem": {
86            "relationshipType": "AttributeSet",
87            "identifier": "b7453e25-1167-e411-92ad-e83935a85380",
88            "cardinality": "Many",
89            "connectingID": {
90              "identifierType": "FullyQualifiedName"
91            },
92            "objectState": "Created"
93          },
94          "relationshipAttributes": [
95            {
96              "leftAttributeID": "12f35cd5-f1c1-e311-a1e0-e83935a85380",
97              "rightAttributeID": "b8453e25-1167-e411-92ad-e83935a85380",
98              "leftConnectingID": {
99                "identifierType": "FullyQualifiedName"
100              },
101              "rightConnectingID": {
102                "identifierType": "FullyQualifiedName"
103              },
104              "objectState": "Created"
105            },
106            {
107              "leftAttributeID": "19f35cd5-f1c1-e311-a1e0-e83935a85380",
108              "rightAttributeID": "b9453e25-1167-e411-92ad-e83935a85380",
109              "leftConnectingID": {
110                "identifierType": "FullyQualifiedName"
111              },
112              "rightConnectingID": {
113                "identifierType": "FullyQualifiedName"
114              },
115              "objectState": "Created"
116            }
117          ],
118          "isSystemDefined": false,
119          "leftRelationshipIDs": [],
120          "canModify": false,
121          "canRemove": false,
122          "links": {},
123          "objectState": "Created"
124        },
125        {
126          "id": "d4453e25-1167-e411-92ad-e83935a85380",
127          "leftItem": {
128            "relationshipType": "AttributeSet",
129            "identifier": "10f35cd5-f1c1-e311-a1e0-e83935a85380",
130            "cardinality": "One",
131            "connectingID": {
132              "identifierType": "FullyQualifiedName"
133            },
134            "objectState": "Created"
135          },
136          "rightItem": {
137            "relationshipType": "AttributeSet",
138            "identifier": "ca453e25-1167-e411-92ad-e83935a85380",
139            "cardinality": "Many",
140            "connectingID": {
141              "identifierType": "FullyQualifiedName"
142            },
143            "objectState": "Created"
144          },
145          "relationshipAttributes": [
146            {
147              "leftAttributeID": "12f35cd5-f1c1-e311-a1e0-e83935a85380",
148              "rightAttributeID": "cb453e25-1167-e411-92ad-e83935a85380",
149              "leftConnectingID": {
150                "identifierType": "FullyQualifiedName"
151              },
152              "rightConnectingID": {
153                "identifierType": "FullyQualifiedName"
154              },
155              "objectState": "Created"
156            },
157            {
158              "leftAttributeID": "19f35cd5-f1c1-e311-a1e0-e83935a85380",
159              "rightAttributeID": "ce453e25-1167-e411-92ad-e83935a85380",
160              "leftConnectingID": {
161                "identifierType": "FullyQualifiedName"
162              },
163              "rightConnectingID": {
164                "identifierType": "FullyQualifiedName"
165              },
166              "objectState": "Created"
167            }
168          ],
169          "isSystemDefined": false,
170          "leftRelationshipIDs": [],
171          "canModify": false,
172          "canRemove": false,
173          "links": {},
174          "objectState": "Created"
175        }
176      ],
177      "attributes": [
178        {
179          "id": "12f35cd5-f1c1-e311-a1e0-e83935a85380",
180          "key": "PushAppID",
181          "name": {
182            "value": "Application"
183          },
184          "storageName": "_APID",
185          "dataType": "Text",
186          "isPrimaryKey": true,
187          "isNullable": false,
188          "isReadOnly": true,
189          "displayOrder": 2,
190          "ranges": [],
191          "description": "",
192          "length": 38,
193          "dataSourceID": 3,
194          "restrictedValues": [],
195          "restrictionLookupListID": 4,
196          "customerDataID": 7,
197          "fullyQualifiedName": "MobilePush Demographics.Application",
198          "parentId": "10f35cd5-f1c1-e311-a1e0-e83935a85380",
199          "isSystemDefined": true,
200          "isIdentityValue": false,
201          "isHidden": false,
202          "isUpdateable": false,
203          "parentType": "Set",
204          "dataSourceName": {},
205          "links": {},
206          "objectState": "Created"
207        },
208        {
209          "id": "13f35cd5-f1c1-e311-a1e0-e83935a85380",
210          "key": "Badge",
211          "name": {
212            "value": "Badge"
213          },
214          "storageName": "_Badge",
215          "dataType": "Number",
216          "isPrimaryKey": false,
217          "isNullable": true,
218          "isReadOnly": true,
219          "displayOrder": 3,
220          "ranges": [],
221          "description": "",
222          "dataSourceID": 3,
223          "restrictedValues": [],
224          "fullyQualifiedName": "MobilePush Demographics.Badge",
225          "parentId": "10f35cd5-f1c1-e311-a1e0-e83935a85380",
226          "isSystemDefined": true,
227          "isIdentityValue": false,
228          "isHidden": false,
229          "isUpdateable": false,
230          "parentType": "Set",
231          "dataSourceName": {},
232          "links": {},
233          "objectState": "Created"
234        },
235        {
236          "id": "14f35cd5-f1c1-e311-a1e0-e83935a85380",
237          "key": "Channel",
238          "name": {
239            "value": "Channel"
240          },
241          "storageName": "_Channel",
242          "dataType": "Text",
243          "isPrimaryKey": false,
244          "isNullable": true,
245          "isReadOnly": true,
246          "displayOrder": 4,
247          "ranges": [],
248          "description": "",
249          "length": 20,
250          "dataSourceID": 3,
251          "restrictedValues": [],
252          "fullyQualifiedName": "MobilePush Demographics.Channel",
253          "parentId": "10f35cd5-f1c1-e311-a1e0-e83935a85380",
254          "isSystemDefined": true,
255          "isIdentityValue": false,
256          "isHidden": false,
257          "isUpdateable": false,
258          "parentType": "Set",
259          "dataSourceName": {},
260          "links": {},
261          "objectState": "Created"
262        },
263        {
264          "id": "15f35cd5-f1c1-e311-a1e0-e83935a85380",
265          "key": "City",
266          "name": {
267            "value": "City"
268          },
269          "storageName": "_City",
270          "dataType": "Text",
271          "isPrimaryKey": false,
272          "isNullable": true,
273          "isReadOnly": false,
274          "displayOrder": 5,
275          "ranges": [],
276          "description": "",
277          "length": 200,
278          "dataSourceID": 3,
279          "restrictedValues": [],
280          "fullyQualifiedName": "MobilePush Demographics.City",
281          "parentId": "10f35cd5-f1c1-e311-a1e0-e83935a85380",
282          "isSystemDefined": false,
283          "isIdentityValue": false,
284          "isHidden": false,
285          "isUpdateable": false,
286          "parentType": "Set",
287          "dataSourceName": {},
288          "links": {},
289          "objectState": "Created"
290        },
291        ...
292      ],
293      "canAddValues": true,
294      "isSystemDefined": true,
295      "canRemove": false,
296      "canModify": false,
297      "isReadOnly": false,
298      "applicationID": "2051892d-5de2-4ecf-98af-8ca9a40d2c9c",
299      "applicationKey": "com.exacttarget.mobilepush",
300      "links": {},
301      "objectState": "Created"
302    },
303    ...
304  ],
305  "links": {
306    "self": {
307      "href": "/v1/attributeSetDefinitions"
308    },
309    "schema": {
310      "href": "/v1/schema"
311    }
312  },
313  "requestServiceMessageID": "57d67e08-6e4c-4e06-98e6-f0993725c1ae",
314  "responseDateTime": "2024-09-05T14:09:16.7400199-06:00",
315  "resultMessages": [],
316  "serviceMessageID": "eacba18f-c31c-4619-bc05-522d72e99ee0"
317}

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!