---
title: "Create a customer profile subprofile"
method: POST
path: "/{customer_profile_id}/subprofiles"
---

# Create a customer profile subprofile

`POST /{customer_profile_id}/subprofiles`

## Request

- Base URL: `https://api-sandbox.straitsx.com/v1/customer_profile`
- URL: `https://api-sandbox.straitsx.com/v1/customer_profile/{customer_profile_id}/subprofiles`
- Auth: none required

[Available in Sandbox/Production environment] Create a subprofile for a customer profile. Subprofiles represent individual branches/outlets under a single UEN.

## Path parameters

- `customer_profile_id` string, required

## Headers

- `X-XFERS-APP-API-KEY` string, required
- `X-PUBLIC-KEY-ID` string
- `X-TIMESTAMP` string
- `X-NONCE` string
- `X-SIGNATURE` string

## Request body

- object
  - `data` object, required
    - `type` 'subprofile', required: Resource type. Must be `subprofile`.
    - `attributes` object, required
      - `referenceId` string, required: Unique identifier for this subprofile within the customer profile. Used for idempotency - if a subprofile with the same referenceId already exists, the existing record is returned.<br>Regex: `/^\s*.{1,191}\s*$/`
      - `tradingName` string, required: Display name for the subprofile (e.g., branch or outlet name).<br>Regex: `/^\s*.{1,255}\s*$/`
      - `address` object, required: Physical address of the branch/outlet.
        - `street` string, required: Street address.<br>Regex: `/^(?=.{1,180}$)[a-zA-Z0-9/\-?:().,' +]+$/`
        - `city` string, required: City.<br>Regex: `/^(?=.{1,20}$)[a-zA-Z0-9/\-?:().,' +]+$/`
        - `state` string: State or province.<br>Regex: `/^(?=.{1,15}$)[a-zA-Z0-9/\-?:().,' +]+$/`
        - `postalCode` string: Postal code.<br>Regex: `/^[A-Za-z0-9\- ]{2,20}$/`
        - `country` string, required: ISO 3166-1 alpha-2 country code.<br>Regex: `/^[A-Z]{2}$/`

## Response `200`

200 - Existing subprofile returned (idempotent match on referenceId)

- object
  - `data` object
    - `type` string
    - `id` string: Unique subprofile ID.
    - `attributes` object
      - `referenceId` string: Merchant-provided unique reference for this subprofile.
      - `tradingName` string: Display name of the subprofile.
      - `address` object
        - `street` string: Street address.
        - `city` string: City.
        - `state` string: State or province.
        - `postalCode` string: Postal code.
        - `country` string: ISO 3166-1 alpha-2 country code.
      - `status` 'pending' | 'active' | 'disabled': Subprofile status.
      - `createdAt` string: Timestamp when the subprofile was created.
      - `updatedAt` string: Timestamp when the subprofile was last updated.

## Other responses

- `201`: 201 - New subprofile created
- `400`: 400 - Validation error
- `404`: 404 - Customer profile not found

---

[API](https://skmtc.dev/straitsx/apis/sandbox-customer-profile-api-sandbox-prod.md) - [All operations](https://skmtc.dev/straitsx/apis/sandbox-customer-profile-api-sandbox-prod/llms.txt) - [OpenAPI document](https://skmtc.dev/straitsx/apis/sandbox-customer-profile-api-sandbox-prod/revisions/fba039809316?raw)
