Find objects
Use a set of filter conditions to find objects in your workspace. Returns a list of object IDs that you can use to look up object attributes, or to create or modify objects.
The list is paged if you have a large number of objects. You can set the limit for the number of objects returned, and use the start to page through the results. It's possible that you'll see duplicate entries across pages. If you want to export objects or relationships, you may want to use the export feature in our UI to return complete results.
- Type: stringstart
The token for the page of results you want to return. Responses contain a
nextproperty. Use this property as thestartvalue to return the next page of results. - Type: integerlimit
The maximum number of results you want to retrieve per page.
The object_type_id you want to search in, and the filter you want to apply to find objects. Both are required. The object called object_attribute requires type_id, as well, which should match the object_type_id.
- filterrequired
Use
and,or, andnotto combine object attribute conditions. The top-level object accepts one property; nest groups for complex filters.Use
and,or, andnotto combine object attribute conditions. The top-level object accepts one property; nest groups for complex filters.- andType: array object[]
Match all conditions to return results.
- Type: stringobject
_type _id requiredThe type of object you want to search in. Object type IDs are integers passed as strings.
- application/json
- 401
Unauthorized request. Make sure that you provided the right credentials.
- application/json
curl 'https://api.customer.io/v1/objects?start=&limit=1' \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"object_type_id": "1",
"filter": {
"and": [
{
"object_attribute": {
"field": "name",
"operator": "exists",
"type_id": "1"
}
},
{
"not": {
"object_attribute": {
"field": "name",
"operator": "eq",
"value": "acme corp",
"type_id": "1"
}
}
}
]
}
}'
{
"identifiers": [
{
"cio_object_id": "ob020101",
"object_id": "ae3000"
}
],
"ids": [
"ae3000"
],
"next": "string"
}Returns arrays of identifiers and ids.