---
title: "POST /v2/subjects/profile"
method: POST
path: "/v2/subjects/profile"
---

# POST /v2/subjects/profile

`POST /v2/subjects/profile`

## Request

- Base URL: `https://uc.api.osano.com`
- URL: `https://uc.api.osano.com/v2/subjects/profile`
- Auth: API key in header `x-osano-api-key`
- TypeScript: <https://skmtc.dev/osano/apis/unified-consent-core-api/docs/v2/subjects/profile/post.ts> (a function with typed inputs; its response is checked against the schema)

Create and insert a subject profile

## Query parameters

- `resultType` 'subject' | 'session'

## Headers

- `content-type` 'application/json', required

## Request body

- union: Requires email or phone.
  - object
    - `email` string, email, required
    - `phone` string
    - `profile` object
  - object
    - `email` string, email
    - `phone` string, required
    - `profile` object

## Response `200`

resultType=subject returns { verifiedId }. resultType=session returns { sessionId }.

- union: resultType=subject returns { verifiedId }. resultType=session returns { sessionId }.
  - object
    - `verifiedId` string, required: Verified subject id. Only for resultType=subject.
    - `sessionId` string: Session id for the Consumer UI. Only for resultType=session.
  - object
    - `sessionId` string, required: Session id for the Consumer UI. Only for resultType=session.
    - `verifiedId` string: Verified subject id. Only for resultType=subject.

## Changes

- **2026-11-06** `669b3b5b4d06`: 1 breaking, 2 info
  - for the `query` request parameter `resultType`, default value `subject` was added
  - added `subschema #1, subschema #2` to the request body `anyOf` list
  - added the media type `application/json` for the response with the status `200`
- **2026-06-14** `dedbbc618db6`: 4 info
  - added the new optional request property `phone`
  - request body became optional
  - the request property `email` became optional
  - the `email` request property's minLength was decreased from `1` to `0`
- **2024-12-26** `2fe8098661eb`: 1 info
  - the endpoint scheme security `osanoApiKey` was added to the API

[Operation history](https://skmtc.dev/osano/apis/unified-consent-core-api/changes/v2/subjects/profile/post.md)

---

[API](https://skmtc.dev/osano/apis/unified-consent-core-api.md) - [All operations](https://skmtc.dev/osano/apis/unified-consent-core-api/llms.txt) - [OpenAPI document](https://skmtc.dev/osano/apis/unified-consent-core-api/revisions/669b3b5b4d06?raw)
