---
title: "Create or update profile schema"
method: PUT
path: "/api/storage/profile-system/profiles/schema"
tags: ["Schemas"]
---

# Create or update profile schema

`PUT /api/storage/profile-system/profiles/schema`

Creates or updates profile schema.

> Each account has one profile schema. Updating it with this request will substitute the previous version.

> Learn more about the [Profile System](https://developers.vtex.com/vtex-rest-api/docs/profile-system) and its other API endpoints.

## Headers

- `Content-Type` string, required
- `Accept` string, required

## Request body

- Schema
  - `title` string, required — Schema title.
  - `type` string, required — Schema type.
  - `description` string, required — Schema's human readable description.
  - `required` string[], required — Schema required fields.
  - `properties` object, required — Object describing each field in your desired schema. In this object, each property is a new object, describing the field according to: `type` (string); `sensitive` (boolean); `pii` (boolean) and `items.type` (if field is array).
    - `{fieldName}` object — Schema of any given field described in the `properties` field.
      - `type` string, required — Schema property type.
      - `sensitive` boolean, required — Indicates whether property is sensitive data.
      - `pii` boolean, required — Indicates whether property is Personal Identifiable Information.
      - `items` object — Object containing the type of the items if the field is an array. Typically, arrays will contain strings and will be used for fields such as `email`.
        - `type` string — Field type.
  - `documentTTL` integer — Document time to live, in days. After this many days from its creation or update, any document cerated from this schema will be deleted.
  - `version` integer — Schema version.
  - `v-indexed` string[] — List of fields to be indexed.
  - `v-unique` string[] — List of fields that must be unique.

## Response `201`

Created

- object

## Changes

- **2023-10-31** `c68a1fb04e5a` — 1 info
  - endpoint added
- **2023-10-26** `eb33b478ad52` — 1 breaking
  - api path removed without deprecation
- **2023-10-26** `fb9c5ab4fd8d` — 1 info
  - endpoint added
- **2023-10-24** `882bd80cdbee` — 1 breaking
  - api path removed without deprecation
- **2023-10-24** `a431490e7859` — 1 info
  - endpoint added

[Full history](https://skmtc.dev/vtex/apis/profile-system-pii-data-architecture/changes/api/storage/profile-system/profiles/schema/put.md)

---

[API](https://skmtc.dev/vtex/apis/profile-system-pii-data-architecture.md) · [All operations](https://skmtc.dev/vtex/apis/profile-system-pii-data-architecture/llms.txt) · [OpenAPI document](https://skmtc.dev/vtex/apis/profile-system-pii-data-architecture/revisions/2ebc766ec816?raw)
