---
title: "Create a guest (legacy)"
slug: "create-a-guest--legacy-"
abstract: "Describes how to create a guest using the Sitecore CDP Guest REST API."
---
# Create a guest (legacy)

> [!important]
> [A newer version of this REST API (v2.1) is available](https://api-docs.sitecore.com/cdp/guest-rest-api). 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](https://doc.sitecore.com/cdp/en/developers/api/rest-apis/legacy-rest-apis/guest-rest-api-v2--legacy-/differences-between-v2-and-v2-1-of-the-guest-and-guest-data-extension-rest-apis.html "Differences between v2 and v2.1 of the Guest and Guest data extension REST APIs") 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](https://doc.sitecore.com/cdp/en/developers/api/rest-apis/legacy-rest-apis/guest-rest-api-v2--legacy-/retrieve-guests--legacy-.html "Retrieve guests (legacy)") 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:<br><br><ul><li>`"visitor"`</li><li>`"customer"`</li><li>`"traveller"`</li></ul> |

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

Create a guest using Personally Identifiable Information (PII):

```curl
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": [
        "jane.doe@myretailsite.com"
    ],
    "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):

```json
{
   "href":"<baseURL>/v2/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03",
   "ref":"f7aabbca-1c1b-4fc2-be72-3e16294a4f03",
   "createdAt":"2026-03-07T16:`15:11`.000Z",
   "modifiedAt":"2026-08-23T16:`17:16`.000Z",
   "firstSeen":"2026-03-07T16:`15:11`.000Z",
   "lastSeen":"2026-08-23T16:`17:16`.000Z",
   "guestType":"customer",
   "title": "Ms",
    "firstName": "Jane",
    "lastName": "Doe",
    "gender": "female",
    "dateOfBirth": "1976-10-28T00:`00:00`.000Z",
    "emails": [
        "jane.doe@myretailsite.com"
    ],
    "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
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`:

```json
{
   "href":"<baseURL>/v2/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03",
   "ref":"f7aabbca-1c1b-4fc2-be72-3e16294a4f03",
   "createdAt":"2026-03-07T16:`15:11`.000Z",
   "modifiedAt":"2026-08-23T16:`17:16`.000Z",
   "firstSeen":"2026-03-07T16:`15:11`.000Z",
   "lastSeen":"2026-08-23T16:`17:16`.000Z",
   "guestType":"customer",
   "identifiers":[
      {
         "provider":"BXLP",
         "id":"123456",
         "expiryDate":"2028-08-23T16:`17:16`.000Z"
      }
   ]
}

```

```curl
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": [
        "jane.doe@myretailsite.com"
    ],
    "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"
      }
    ]
}'

```

```json
{
   "href":"<baseURL>/v2/guests/f7aabbca-1c1b-4fc2-be72-3e16294a4f03",
   "ref":"f7aabbca-1c1b-4fc2-be72-3e16294a4f03",
   "createdAt":"2026-03-07T16:`15:11`.000Z",
   "modifiedAt":"2026-08-23T16:`17:16`.000Z",
   "firstSeen":"2026-03-07T16:`15:11`.000Z",
   "lastSeen":"2026-08-23T16:`17:16`.000Z",
    "guestType": "customer",
    "title": "Ms",
    "firstName": "Jane",
    "lastName": "Doe",
    "gender": "female",
    "dateOfBirth": "1976-10-28T00:`00:00`.000Z",
    "emails": [
        "jane.doe@myretailsite.com"
    ],
    "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"
      }
    ]
}

```