Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Developing with Sitecore CDP
Data privacy
Before you start sending data
Integrating with Sitecore CDP
Stream API
Batch API
REST APIs
Data lake export service
  • Sitecore CDP for developers
  • REST APIs
  • Legacy REST APIs
  • Guest data extension REST API v2 (legacy)
  • Create a guest data extension (legacy)

Create a guest data extension (legacy)

Important

A newer version of this REST API (v2.1) is available. If you're new to the Guest REST API, use the new version. Alternatively, if you're already using the old version, read about the differences between v2 and v2.1 so you can upgrade.

POST /v2/guests/<guestRef>/extext

Creates a guest data extension for a guest.

Attribute

Type

Description

Example

guestRef

string

The reference of the guest record.

If you do not know the guest reference, first retrieve guests.

f7aabbca-1c1b-4fc2-be72-3e16294a4f03

In the request body, you must include one object for the data extension. Note the following about the object:

  • The object can contain primitive values only. You cannot nest objects. If grouping is required, use common prefixes for the attribute names.

  • A guest data extension object has a maximum of 100 attributes.

  • You must include the following required attribute in the object: "key": "default".

  • The other attributes that you include in the object become the guest data extensions. For example, if you include "loyaltyTier": "level2" in the request body, Loyalty Tier becomes a guest data extension.

The following is a list of guidelines for using attributes in the data extension:

  • The attribute name must be alphanumeric [A-Z,a-z,0-9] as per the JSON RFC 7159 specification.

  • You must write the attribute name of the data extension in camel case.

  • We recommend making the attribute name meaningful.

  • An update replaces all existing attributes. Therefore, when you update a guest data extension, you must provide all existing attributes as well as any new ones.

In the response, the ref key contains the data extension reference. You use the data extension reference to retrieve, update, or delete a guest data extension.

In this example, loyaltyTier, rewardBalance, vipMember, and loyaltyNumber become guest data extensions.

RequestResponse
curl -X POST '<baseURL>/v2/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03/extext' \
-u '<username>:<password>' \
-H 'Accept: application/json' \
--data-raw '
{
    "key": "default",
    "loyaltyTier": "level2",
    "rewardBalance": 5012.25,
    "vipMember": true,
    "loyaltyNumber": 3452
}'
RequestResponse
{
    "href": "<baseURL>/v2/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03/extext/09bfc8cc-3815-5b77-b75a-d3cc6a867c1a",
    "ref": "09bfc8cc-3815-5b77-b75a-d3cc6a867c1a",
    "key": "default",
    "createdAt": "2025-12-16T07:39:53.924Z",
    "modifiedAt": "2025-12-16T07:39:53.924Z",
    "vipMember": true,
    "loyaltyTier": "level2",
    "rewardBalance": 5012.25,
    "loyaltyNumber": 3452,
    "guest": {
        "href": "<baseURL>/v2/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03"
    }
}

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2025 Sitecore