Skip to content

Requests and responses

Relationships and includes

Follow links between resources, or load related resources in one request.

Relationships

Resources link to each other through a relationships object. Each relationship has a self link (the ids of the related resources) and a related link (the resources themselves).

json
"relationships": {
  "lists": {
    "links": {
      "self": "https://email.growthdept.ai/api/profiles/01JC7Z3K9V8Q2M5N4R6T1W0Y8X/relationships/lists",
      "related": "https://email.growthdept.ai/api/profiles/01JC7Z3K9V8Q2M5N4R6T1W0Y8X/lists"
    }
  }
}

Including related resources

Add include to get related resources in the same response. They come back once each in a top-level included array, and the relationship gets a data list of {type, id} pairs that point into it.

http
GET /api/events?include=metric,profile
EndpointCan include
GET /api/brand-email-defaultsbrand-buttonbrand-logobrand-social-group
GET /api/brand-logosimage
GET /api/brand-email-defaults/{id}brand-buttonbrand-logobrand-social-group
GET /api/brand-logos/{id}image
GET /api/campaign-messagescampaigncampaign-variations
GET /api/campaignscampaign-audiencescampaign-messagestags
GET /api/campaign-audiences/{id}campaigncampaign-messages
GET /api/campaign-messages/{id}campaigncampaign-variations
GET /api/campaign-variations/{id}campaign-message
GET /api/campaigns/{id}campaign-audiencescampaign-messagestags
GET /api/campaigns/{id}/campaign-messagescampaign
GET /api/catalog-itemsvariants
GET /api/catalog-category-bulk-create-jobs/{job_id}categories
GET /api/catalog-category-bulk-update-jobs/{job_id}categories
GET /api/catalog-item-bulk-create-jobs/{job_id}items
GET /api/catalog-item-bulk-update-jobs/{job_id}items
GET /api/catalog-items/{id}variants
GET /api/catalog-variant-bulk-create-jobs/{job_id}variants
GET /api/catalog-variant-bulk-update-jobs/{job_id}variants
GET /api/catalog-categories/{id}/itemsvariants
GET /api/coupon-codescoupon
GET /api/coupon-code-bulk-create-jobs/{job_id}coupon-codes
GET /api/coupon-codes/{id}coupon
GET /api/object-typescurrent-schemadraft-schema
GET /api/object-schemas/{id}object-schemasprofile-object-schemassource-mapping
GET /api/object-types/{id}current-schemadraft-schemaobject-typesprofile-object-typesschema-versions
GET /api/object-types/{id}/object-ingestion-logsobject-recordobject-type
GET /api/eventsmetricprofile
GET /api/events/{id}metricprofile
GET /api/flowsflow-actionstags
GET /api/flow-actions/{id}flowflow-messages
GET /api/flow-messages/{id}flow-actiontemplate
GET /api/flows/{id}flow-actionstags
GET /api/form-versions/{id}form
GET /api/listsflow-triggerstags
GET /api/lists/{id}flow-triggerstags
GET /api/custom-metricsmetrics
GET /api/mapped-metricscustom-metricmetric
GET /api/custom-metrics/{id}metrics
GET /api/mapped-metrics/{id}custom-metricmetric
GET /api/metric-properties/{id}metric
GET /api/profilespush-tokensconversations
GET /api/push-tokensprofile
GET /api/profile-bulk-import-jobs/{job_id}lists
GET /api/profiles/{id}listssegmentspush-tokensconversations
GET /api/push-tokens/{id}profile
GET /api/reviewsevents
GET /api/reviews/{id}events
GET /api/segmentsflow-triggerstags
GET /api/segments/{id}flow-triggerstags
GET /api/tagstag-group
GET /api/tags/{id}tag-group
POST /api/text-messaging-sender-registrationstext-messaging-sender
GET /api/text-messaging-senderstext-messaging-sender-registration
POST /api/text-messaging-senderstext-messaging-sender-registration
GET /api/text-messaging-sender-registrations/{id}text-messaging-sender
GET /api/text-messaging-senders/{id}text-messaging-sender-registration
GET /api/webhookswebhook-topics
GET /api/webhooks/{id}webhook-topics

Changing relationships

Endpoints ending in /relationships/<name> read and change links without touching the resources: list member ids, add profiles to a list, remove them. Writes take a data array of {type, id} pairs and answer 204 with no body.

EndpointWhat it does
GET /api/campaign-audiences/{id}/relationships/campaignGet an audience's campaign id
GET /api/campaign-audiences/{id}/relationships/campaign-messagesGet an audience's message ids
GET /api/campaign-messages/{id}/relationships/campaignGet a message's campaign id
GET /api/campaign-messages/{id}/relationships/campaign-audienceGet a message's audience id
GET /api/campaign-messages/{id}/relationships/campaign-variationsGet a message's variation ids
GET /api/campaign-messages/{id}/relationships/imageGet a message's image id
PATCH /api/campaign-messages/{id}/relationships/imageSet a message's image
GET /api/campaign-messages/{id}/relationships/tagsGet a message's tag ids (its campaign's)
GET /api/campaign-messages/{id}/relationships/templateGet a message's template id
GET /api/campaign-variations/{id}/relationships/campaign-messageGet a variation's message id
GET /api/campaign-variations/{id}/relationships/imageGet a variation's image id
GET /api/campaign-variations/{id}/relationships/translationGet a variation's translation id
GET /api/campaigns/{id}/relationships/campaign-audiencesGet a campaign's audience ids
GET /api/campaigns/{id}/relationships/campaign-messagesGet a campaign's message ids
GET /api/campaigns/{id}/relationships/tagsGet a campaign's tag ids
GET /api/catalog-categories/{id}/relationships/itemsList the ids of a category's items
POST /api/catalog-categories/{id}/relationships/itemsAdd items to a category
PATCH /api/catalog-categories/{id}/relationships/itemsReplace a category's items
DELETE /api/catalog-categories/{id}/relationships/itemsRemove items from a category
GET /api/catalog-items/{id}/relationships/categoriesList the ids of an item's categories
POST /api/catalog-items/{id}/relationships/categoriesAdd categories to an item
PATCH /api/catalog-items/{id}/relationships/categoriesReplace an item's categories
DELETE /api/catalog-items/{id}/relationships/categoriesRemove categories from an item
GET /api/catalog-items/{id}/relationships/variantsList the ids of an item's variants
GET /api/coupon-codes/{id}/relationships/couponGet the id of a code's coupon
GET /api/coupons/{id}/relationships/coupon-codesList the ids of a coupon's codes
GET /api/object-schemas/{id}/relationships/object-schemasList an object schema's relationships to other object schemas
POST /api/object-schemas/{id}/relationships/object-schemasAdd relationships from an object schema to other object schemas
PATCH /api/object-schemas/{id}/relationships/object-schemasRename or describe a relationship from an object schema to other object schemas
DELETE /api/object-schemas/{id}/relationships/object-schemasRemove relationships from an object schema to other object schemas
GET /api/object-schemas/{id}/relationships/profile-object-schemasList an object schema's relationships to profiles
POST /api/object-schemas/{id}/relationships/profile-object-schemasAdd relationships from an object schema to profiles
PATCH /api/object-schemas/{id}/relationships/profile-object-schemasRename or describe a relationship from an object schema to profiles
DELETE /api/object-schemas/{id}/relationships/profile-object-schemasRemove relationships from an object schema to profiles
GET /api/object-schemas/{id}/relationships/source-mappingGet the id of an object schema's source mapping
GET /api/object-types/{id}/relationships/current-schemaGet the id of an object type's current schema
GET /api/object-types/{id}/relationships/draft-schemaGet the id of an object type's draft schema
GET /api/object-types/{id}/relationships/object-ingestion-logsList the ids of an object type's ingestion failures
GET /api/object-types/{id}/relationships/object-recordsList the ids of an object type's records
GET /api/object-types/{id}/relationships/object-typesList the object types an object type relates to
GET /api/object-types/{id}/relationships/profile-object-typesList the profile relationships of an object type
GET /api/object-types/{id}/relationships/schema-versionsList the ids of an object type's schema versions
GET /api/events/{id}/relationships/metricGet the metric id of an event
GET /api/events/{id}/relationships/profileGet the profile id of an event
GET /api/flow-actions/{id}/relationships/flowGet the id of the flow an action belongs to
GET /api/flow-actions/{id}/relationships/flow-messagesList the ids of an action's messages
GET /api/flow-messages/{id}/relationships/flow-actionGet the id of the action a flow message belongs to
GET /api/flow-messages/{id}/relationships/templateGet the id of a flow message's template
GET /api/flows/{id}/relationships/flow-actionsList the ids of a flow's actions
GET /api/flows/{id}/relationships/tagsList the ids of a flow's tags
GET /api/form-versions/{id}/relationships/formGet the id of the form a version belongs to
GET /api/forms/{id}/relationships/form-versionsList the ids of a form's versions
GET /api/lists/{id}/relationships/flow-triggersList the ids of the flows a list starts
GET /api/lists/{id}/relationships/profilesList the ids of a list's members
POST /api/lists/{id}/relationships/profilesAdd profiles to a list
DELETE /api/lists/{id}/relationships/profilesRemove profiles from a list
GET /api/lists/{id}/relationships/tagsList the ids of a list's tags
GET /api/custom-metrics/{id}/relationships/metricsList the ids of the metrics a custom metric combines
GET /api/mapped-metrics/{id}/relationships/custom-metricGet the custom metric id of a mapped metric
GET /api/mapped-metrics/{id}/relationships/metricGet the metric id of a mapped metric
GET /api/metric-properties/{id}/relationships/metricGet the metric id of a metric property
GET /api/metrics/{id}/relationships/flow-triggersList the ids of the flows a metric starts
GET /api/metrics/{id}/relationships/metric-propertiesList the ids of a metric's properties
GET /api/profile-bulk-import-jobs/{id}/relationships/listsGet the list ids of a profile import job
GET /api/profile-bulk-import-jobs/{id}/relationships/profilesGet the profile ids of a profile import job
GET /api/profiles/{id}/relationships/conversationGet the conversation id of a profile
GET /api/profiles/{id}/relationships/conversationsGet the conversation ids of a profile
GET /api/profiles/{id}/relationships/listsGet the list ids of a profile
GET /api/profiles/{id}/relationships/push-tokensGet the push token ids of a profile
GET /api/profiles/{id}/relationships/segmentsGet the segment ids of a profile
GET /api/push-tokens/{id}/relationships/profileGet the profile id of a push token
GET /api/segments/{id}/relationships/flow-triggersList the ids of the flows a segment starts
GET /api/segments/{id}/relationships/profilesList the ids of a segment's members
GET /api/segments/{id}/relationships/tagsList the ids of a segment's tags
GET /api/tag-groups/{id}/relationships/tagsList the ids of the tags in a tag group
GET /api/tags/{id}/relationships/campaignsList the ids of campaigns with a tag
POST /api/tags/{id}/relationships/campaignsPut a tag on campaigns
DELETE /api/tags/{id}/relationships/campaignsTake a tag off campaigns
GET /api/tags/{id}/relationships/flowsList the ids of flows with a tag
POST /api/tags/{id}/relationships/flowsPut a tag on flows
DELETE /api/tags/{id}/relationships/flowsTake a tag off flows
GET /api/tags/{id}/relationships/listsList the ids of lists with a tag
POST /api/tags/{id}/relationships/listsPut a tag on lists
DELETE /api/tags/{id}/relationships/listsTake a tag off lists
GET /api/tags/{id}/relationships/segmentsList the ids of segments with a tag
POST /api/tags/{id}/relationships/segmentsPut a tag on segments
DELETE /api/tags/{id}/relationships/segmentsTake a tag off segments
GET /api/tags/{id}/relationships/tag-groupGet the id of a tag's tag group
GET /api/text-messaging-senders/{id}/relationships/text-messaging-sender-registrationGet the registration id of a text messaging sender