Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
CDPCloud Portal
Sitecore CDP Developer Documentation
  • Developing with Sitecore CDP
    • Base URL
    • Response codes
    • REST API Guest v2.1
    • REST API Guest data extension v2.1
    • REST API Order v2.1
    • REST API Order contact v2.1
    • REST API Order consumer v2.1
    • REST API Order data extension v2.1
    • REST API Order item data extension v2.1
    • REST API Audience export
            • Differences between v2 and v2.1
            • Create a guest (legacy)
            • Retrieve guests (legacy)
            • Retrieve a guest (legacy)
            • Update a guest (legacy)
  1. Guest REST API v2 (legacy)
  1. REST APIs
  2. Legacy REST APIs
  3. Guest REST API v2 (legacy)
  4. Create a guest (legacy)

Create a guest (legacy)

Important

A newer version of this REST API (v2.1) is available. If you're new to this 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

Creates a guest.

Warning

The REST API does not validate whether a guest already exists when you create a guest. To avoid creating duplicate guests, first retrieve guests using their email address or other identifying information.

At a minimum, you must provide the following required attributes in the request body:

Attribute

Type

Description

Example

guestType

string enum

The level of identity obtained.

Must be one of the following:

  • "visitor"

  • "customer"

  • "traveller"

In the response, the ref key contains the guest reference.

Create a guest using Personally Identifiable Information (PII):

curl -X POST '<baseURL>/v2/guests' \
-u '<username>:<password>' \
-H 'Accept: application/json' \
--data-raw '
 {
    "guestType": "customer",
    "title": "Ms",
    "firstName": "Jane",
    "lastName": "Doe",
    "gender": "female",
    "dateOfBirth": "1976-10-28T00:00:00.000Z",
    "emails": [
        "[email protected]"
    ],
    "phoneNumbers": [
        "0851234567"
    ],
    "nationality": "Irish",
    "passportNumber": "PZ4A9565",
    "passportExpiry": "2033-01-01T00:00Z",
    "street": [
        "Apartment 15",
        "West Drive Avenue"
    ],
    "city": "Dublin",
    "country": "IE",
    "postCode": "D2",
    "state": "Dublin",
}'

201 Created response with Personally Identifiable Information (PII):

{
   "href":"<baseURL>/v2/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03",
   "ref":"f7aabbca-1c1b-4fc2-be72-3e16294a4f03",
   "createdAt":"2025-03-07T16:15:11.000Z",
   "modifiedAt":"2025-08-23T16:17:16.000Z",
   "firstSeen":"2025-03-07T16:15:11.000Z",
   "lastSeen":"2025-08-23T16:17:16.000Z",
   "guestType":"customer",
   "title": "Ms",
    "firstName": "Jane",
    "lastName": "Doe",
    "gender": "female",
    "dateOfBirth": "1976-10-28T00:00:00.000Z",
    "emails": [
        "[email protected]"
    ],
    "phoneNumbers": [
        "0851234567"
    ],
    "nationality": "Irish",
    "passportNumber": "PZ4A9565",
    "passportExpiry": "2033-01-01T00:00:00.000Z",
    "street": [
        "Apartment 15",
        "West Drive Avenue"
    ],
    "city": "Dublin",
    "country": "IE",
    "postCode": "D2",
    "state": "Dublin",
}

Create a guest using identifiers:

curl -X POST '<baseURL>/v2/guests' \
-u '<username>:<password>' \
-H 'Accept: application/json' \
--data-raw '
 {
   "guestType":"customer",
   "identifiers":[
      {
         "provider":"BXLP",
         "id":"123456",
         "expiryDate":"2028-08-23T16:17:16.000Z"
      }
   ]
}'

201 Created response with identifiers:

{   
   "href":"<baseURL>/v2/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03",
   "ref":"f7aabbca-1c1b-4fc2-be72-3e16294a4f03",
   "createdAt":"2025-03-07T16:15:11.000Z",
   "modifiedAt":"2025-08-23T16:17:16.000Z",
   "firstSeen":"2025-03-07T16:15:11.000Z",
   "lastSeen":"2025-08-23T16:17:16.000Z",
   "guestType":"customer",
   "identifiers":[
      {
         "provider":"BXLP",
         "id":"123456",
         "expiryDate":"2028-08-23T16:17:16.000Z"
      }
   ]
}
curl -X POST '<baseURL>/v2/guests' \
-u '<username>:<password>' \
-H 'Accept: application/json' \
--data-raw '
 {
    "guestType": "customer",
    "title": "Ms",
    "firstName": "Jane",
    "lastName": "Doe",
    "gender": "female",
    "dateOfBirth": "1976-10-28T00:00:00.000Z",
    "emails": [
        "[email protected]"
    ],
    "phoneNumbers": [
        "0851234567"
    ],
    "nationality": "Irish",
    "passportNumber": "PZ4A9565",
    "passportExpiry": "2033-01-01T00:00:00.000Z",
    "street": [
        "Apartment 15",
        "West Drive Avenue"
    ],
    "city": "Dublin",
    "country": "IE",
    "postCode": "D2",
    "state": "Dublin",
    "identifiers": [
      {
         "provider":"BXLP",
         "id":"123456",
         "expiryDate":"2028-08-23T16:17:16.000Z"
      }
    ]
}'
{
   "href":"<baseURL>/v2/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03",
   "ref":"f7aabbca-1c1b-4fc2-be72-3e16294a4f03",
   "createdAt":"2025-03-07T16:15:11.000Z",
   "modifiedAt":"2025-08-23T16:17:16.000Z",
   "firstSeen":"2025-03-07T16:15:11.000Z",
   "lastSeen":"2025-08-23T16:17:16.000Z",
    "guestType": "customer",
    "title": "Ms",
    "firstName": "Jane",
    "lastName": "Doe",
    "gender": "female",
    "dateOfBirth": "1976-10-28T00:00:00.000Z",
    "emails": [
        "[email protected]"
    ],
    "phoneNumbers": [
        "0851234567"
    ],
    "nationality": "Irish",
    "passportNumber": "PZ4A9565",
    "street": [
        "Apartment 15",
        "West Drive Avenue"
    ],
    "city": "Dublin",
    "country": "Ireland",
    "postCode": "D2",
    "state": "Dublin",
    "identifiers": [
      {
         "provider":"BXLP",
         "id":"123456",
         "expiryDate":"2028-08-23T16:17:16.000Z"
      }
    ]
}
If you have suggestions for improving this article, let us know!

Documentation Assistant

This assistant uses AI to generate responses based on Sitecore documentation. While it has access to official sources, answers may be incomplete or inaccurate and should not be considered official advice or support.
Powered by
k
kapa.ai
Protected by reCAPTCHA

© Copyright 2026, Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use