> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.withpersona.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.withpersona.com/_mcp/server.

# Set tags on an Account

POST https://api.withpersona.com/api/v1/accounts/{account-id}/set-tags
Content-Type: application/json

Sets all tags on an Account. Any tags that are not provided in the request will be removed.

Reference: https://docs.withpersona.com/api-reference/accounts/set-all-tags

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `account-id` (string, required)

### Query parameters

- `include` (string, optional) — A comma-separated list of relationship paths. This can be used to customize which related resources will be fully serialized in the `included` key in the response. See [Serialization](https://docs.withpersona.com/serialization#inclusion-of-related-resources) for more details.
- `fields` (map from string to string, optional) — Comma-separated list(s) of attributes to include in the response. This can be used to customize which attributes will be serialized in the response. See [Serialization](https://docs.withpersona.com/serialization#sparse-fieldsets) for more details.

### Headers

- `Key-Inflection` (enum, optional) — Determines casing for the API response.
  - Allowed values: `camel`, `kebab`, `snake`
- `Idempotency-Key` (string, optional) — Ensures the request is idempotent.
- `Persona-Version` (enum, optional) — Server API version. More info on versioning can be found [here](https://docs.withpersona.com/versioning).
  - Allowed values: `2025-12-08`, `2025-10-27`, `2023-01-05`, `2022-09-01`, `2021-08-18`, `2021-07-05`, `2021-02-21`, `2020-05-18`

### Body (application/json)

This endpoint expects an object.

- `meta` (AccountsAccountIdSetTagsPostRequestBodyContentApplicationJsonSchemaMeta, required)

## Response

### 200

This endpoint returns an Account object and (optionally) its related objects in `included`.

- `data` (account, required) — An Account object. Note that `fields` is **not** key inflected.
- `included` (list of AccountsIncludedObjectsItems, optional) — Objects that _may_ be returned if specified via the `include` query parameter in the request.

## Errors

### 400 Bad Request Error

The request was unacceptable, often due to invalid parameters.

- `errors` (list of AccountsAccountIdSetTagsPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 401 Unauthorized Error

An invalid API key was provided.

- `errors` (list of AccountsAccountIdSetTagsPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 403 Forbidden Error

The given API key doesn’t have permissions to perform the request or a quota has been exceeded.

- `errors` (list of AccountsAccountIdSetTagsPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 404 Not Found Error

The requested resource doesn’t exist.

- `errors` (list of AccountsAccountIdSetTagsPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 409 Conflict Error

The request conflicts with another request, often due to attempting to create a duplicate resource.

- `errors` (list of AccountsAccountIdSetTagsPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 422 Unprocessable Entity Error

The request modifies the resource in an unacceptable way, often due to an invalid action or parameter.

- `errors` (list of AccountsAccountIdSetTagsPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 429 Too Many Requests Error

Your organization’s rate limit has been exceeded. We recommend an exponential backoff on requests.

- `errors` (list of AccountsAccountIdSetTagsPostResponsesContentApplicationJsonSchemaErrorsItems, optional)

## Types

### AccountsAccountIdSetTagsPostRequestBodyContentApplicationJsonSchemaMeta

- `tag-name` (list of string, optional) — Name of the tags to set on the Account.
- `tag-id` (list of string, optional) — ID of the tags to set on the Account.

### account

An Account object. Note that `fields` is **not** key inflected.

- `id` (string, optional)
- `attributes` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributes, optional)
- `relationships` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountRelationships, optional)

### AccountsIncludedObjectsItems

- `type`: `account-type` (account-type)
  - `attributes` (AccountsIncludedObjectsItemsDiscriminatorMappingAccountTypeAttributes, optional)
  - `id` (string, optional)
  - `relationships` (AccountsIncludedObjectsItemsDiscriminatorMappingAccountTypeRelationships, optional)

### AccountsAccountIdSetTagsPostResponsesContentApplicationJsonSchemaErrorsItems

- `title` (string, optional)
- `details` (string, optional)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributes

- `reference-id` (string, optional, nullable)
- `account-type-name` (string, optional)
- `created-at` (datetime, optional)
- `updated-at` (datetime, optional)
- `redacted-at` (datetime, optional, nullable)
- `fields` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFields, optional) — JSON key-value pairs of field name to field value. Exact schema depends on the configuration of the Account Type for this Account. Keys in `fields` are **not** key inflected.
- `tags` (list of string, optional)
- `account-status` (string, optional)
- `birthdate` (date, optional, nullable) — Birthdate, must be in the format "YYYY-MM-DD".
- `name-first` (string, optional, nullable) — Given or first name.
- `name-middle` (string, optional, nullable) — Middle name.
- `name-last` (string, optional, nullable) — Family or last name.
- `phone-number` (string, optional, nullable) — Phone number.
- `email-address` (string, optional, nullable) — Email address.
- `address-street-1` (string, optional, nullable) — Street name of residence address.
- `address-street-2` (string, optional, nullable) — Extension of residence address, usually apartment or suite number.
- `address-city` (string, optional, nullable) — City of residence address. Not all international addresses use this attribute.
- `address-subdivision` (string, optional, nullable) — State or subdivision of residence address. In the US, this should be the unabbreviated name. Not all international addresses use this attribute.
- `address-postal-code` (string, optional, nullable) — ZIP or postal code of residence address. Not all international addresses use this attribute.
- `country-code` (string, optional, nullable) — ISO 3166-1 alpha 2 country code.
- `identification-numbers` (map from string to list of VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesIdentificationNumbersItems, optional) — Keys will be the identification class
- `social-security-number` (string, optional, nullable) — Social security number.

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountRelationships

- `account-type` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountRelationshipsAccountType, optional)

### AccountsIncludedObjectsItemsDiscriminatorMappingAccountTypeAttributes

- `name` (string, optional)
- `created-at` (datetime, optional)
- `updated-at` (datetime, optional, nullable)
- `field-schemas` (list of field-schema, optional)

### AccountsIncludedObjectsItemsDiscriminatorMappingAccountTypeRelationships

- `account-statuses` (AccountsIncludedObjectsItemsDiscriminatorMappingAccountTypeRelationshipsAccountStatuses, optional)
- `default-account-status` (AccountsIncludedObjectsItemsDiscriminatorMappingAccountTypeRelationshipsDefaultAccountStatus, optional)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFields

JSON key-value pairs of field name to field value. Exact schema depends on the configuration of the Account Type for this Account. Keys in `fields` are **not** key inflected.

- `name` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsName, optional)
- `address` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsAddress, optional)
- `identification_numbers` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsIdentificationNumbers, optional)
- `birthdate` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsBirthdate, optional)
- `phone_number` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsPhoneNumber, optional)
- `email_address` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsEmailAddress, optional)
- `selfie_photo` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsSelfiePhoto, optional)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesIdentificationNumbersItems

- `issuing-country` (string, optional)
- `identification-class` (string, optional)
- `identification-number` (string, optional)
- `created-at` (datetime, optional)
- `updated-at` (datetime, optional)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountRelationshipsAccountType

- `data` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountRelationshipsAccountTypeData, optional)

### field-schema

- `type`: `array` (array)
  - `config` (FieldSchemaArrayConfig, optional)
  - `key` (string, optional)
  - `label` (string, optional, nullable)
- `type`: `boolean` (boolean)
  - `config` (FieldSchemaBooleanConfig, optional)
  - `default-value` (boolean, optional, nullable)
  - `key` (string, optional)
  - `label` (string, optional, nullable)
- `type`: `choices` (choices)
  - `config` (FieldSchemaChoicesConfig, optional)
  - `default-value` (string, optional, nullable) — Must be one of the values in `config.options`, or null.
  - `key` (string, optional)
  - `label` (string, optional, nullable)
- `type`: `date` (date)
  - `config` (FieldSchemaDateConfig, optional)
  - `default-value` (date, optional, nullable)
  - `key` (string, optional)
  - `label` (string, optional, nullable)
- `type`: `datetime` (datetime)
  - `config` (FieldSchemaDatetimeConfig, optional)
  - `default-value` (datetime, optional, nullable)
  - `key` (string, optional)
  - `label` (string, optional, nullable)
- `type`: `email-address` (email-address)
  - `config` (FieldSchemaEmailAddressConfig, optional)
  - `default-value` (string, optional, nullable)
  - `key` (string, optional)
  - `label` (string, optional, nullable)
- `type`: `file` (file)
  - `config` (FieldSchemaFileConfig, optional)
  - `key` (string, optional)
  - `label` (string, optional, nullable)
- `type`: `hash` (hash)
  - `config` (FieldSchemaHashConfig, optional)
  - `key` (string, optional)
  - `label` (string, optional, nullable)
- `type`: `integer` (integer)
  - `config` (FieldSchemaIntegerConfig, optional)
  - `default-value` (integer, optional, nullable)
  - `key` (string, optional)
  - `label` (string, optional, nullable)
- `type`: `json` (json)
  - `config` (FieldSchemaJsonConfig, optional)
  - `default-value` (any, optional) — JSON-typed fields don't expose a default-value through this API (the stored value is a free-form JSON document; the default is `null`).
  - `key` (string, optional)
  - `label` (string, optional, nullable)
- `type`: `multi-choices` (multi-choices)
  - `config` (FieldSchemaMultiChoicesConfig, optional)
  - `default-value` (list of string, optional, nullable) — Each entry must be one of the values in `config.options`.
  - `key` (string, optional)
  - `label` (string, optional, nullable)
- `type`: `number` (number)
  - `config` (FieldSchemaNumberConfig, optional)
  - `default-value` (double, optional, nullable)
  - `key` (string, optional)
  - `label` (string, optional, nullable)
- `type`: `string` (string)
  - `config` (FieldSchemaStringConfig, optional)
  - `default-value` (string, optional, nullable)
  - `key` (string, optional)
  - `label` (string, optional, nullable)
- `type`: `relation-schema` (relation-schema)
  - `config` (FieldSchemaRelationConfig, optional)
  - `key` (string, optional)
  - `label` (string, optional, nullable)

### AccountsIncludedObjectsItemsDiscriminatorMappingAccountTypeRelationshipsAccountStatuses

- `data` (list of AccountsIncludedObjectsItemsDiscriminatorMappingAccountTypeRelationshipsAccountStatusesDataItems, optional)

### AccountsIncludedObjectsItemsDiscriminatorMappingAccountTypeRelationshipsDefaultAccountStatus

- `data` (AccountsIncludedObjectsItemsDiscriminatorMappingAccountTypeRelationshipsDefaultAccountStatusData, optional, nullable)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsName

- `type` (string, optional)
- `value` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsNameValue, optional)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsAddress

- `type` (string, optional)
- `value` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsAddressValue, optional)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsIdentificationNumbers

- `type` (string, optional)
- `value` (list of VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsIdentificationNumbersValueItems, optional)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsBirthdate

- `type` (string, optional)
- `value` (string, optional, nullable)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsPhoneNumber

- `type` (string, optional)
- `value` (string, optional, nullable)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsEmailAddress

- `type` (string, optional)
- `value` (string, optional, nullable)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsSelfiePhoto

- `type` ("file", optional)
- `value` (File, optional, nullable)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountRelationshipsAccountTypeData

- `id` (string, optional)
- `type` ("account-type", optional)

### FieldSchemaArrayConfig

- `archived-at` (datetime, optional, nullable)
- `deactivated-at` (datetime, optional, nullable)
- `item-schema` (field-schema, optional)
- `redaction-policy` (string, optional, default: none) — Whether the field's value may be redacted on request. Possible values: - `none` — value is redactable - `never` — value is never redacted Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.
- `required` (boolean, optional)
- `source-key-path` (string, optional, nullable) — When the field schema is an alias, the dotted key path of the source field; absent for non-alias schemas.
- `write-policy` (string, optional, default: none) — Whether the field's value may be overwritten after it is first set. Possible values: - `none` — value may be overwritten on subsequent writes - `write_once` — subsequent writes are rejected once a value is set Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.

### FieldSchemaBooleanConfig

- `archived-at` (datetime, optional, nullable)
- `deactivated-at` (datetime, optional, nullable)
- `redaction-policy` (string, optional, default: none) — Whether the field's value may be redacted on request. Possible values: - `none` — value is redactable - `never` — value is never redacted Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.
- `required` (boolean, optional)
- `source-key-path` (string, optional, nullable) — When the field schema is an alias, the dotted key path of the source field; absent for non-alias schemas.
- `write-policy` (string, optional, default: none) — Whether the field's value may be overwritten after it is first set. Possible values: - `none` — value may be overwritten on subsequent writes - `write_once` — subsequent writes are rejected once a value is set Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.

### FieldSchemaChoicesConfig

- `allow-empty` (boolean, optional, default: false)
- `archived-at` (datetime, optional, nullable)
- `deactivated-at` (datetime, optional, nullable)
- `option-labels` (list of string, optional) — Display labels for each value in `options`, in the same order.
- `options` (list of string, optional)
- `redaction-policy` (string, optional, default: none) — Whether the field's value may be redacted on request. Possible values: - `none` — value is redactable - `never` — value is never redacted Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.
- `required` (boolean, optional)
- `source-key-path` (string, optional, nullable) — When the field schema is an alias, the dotted key path of the source field; absent for non-alias schemas.
- `write-policy` (string, optional, default: none) — Whether the field's value may be overwritten after it is first set. Possible values: - `none` — value may be overwritten on subsequent writes - `write_once` — subsequent writes are rejected once a value is set Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.

### FieldSchemaDateConfig

- `archived-at` (datetime, optional, nullable)
- `deactivated-at` (datetime, optional, nullable)
- `max-date` (date, optional, nullable)
- `min-date` (date, optional, nullable)
- `redaction-policy` (string, optional, default: none) — Whether the field's value may be redacted on request. Possible values: - `none` — value is redactable - `never` — value is never redacted Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.
- `required` (boolean, optional)
- `source-key-path` (string, optional, nullable) — When the field schema is an alias, the dotted key path of the source field; absent for non-alias schemas.
- `write-policy` (string, optional, default: none) — Whether the field's value may be overwritten after it is first set. Possible values: - `none` — value may be overwritten on subsequent writes - `write_once` — subsequent writes are rejected once a value is set Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.

### FieldSchemaDatetimeConfig

- `archived-at` (datetime, optional, nullable)
- `deactivated-at` (datetime, optional, nullable)
- `redaction-policy` (string, optional, default: none) — Whether the field's value may be redacted on request. Possible values: - `none` — value is redactable - `never` — value is never redacted Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.
- `required` (boolean, optional)
- `source-key-path` (string, optional, nullable) — When the field schema is an alias, the dotted key path of the source field; absent for non-alias schemas.
- `write-policy` (string, optional, default: none) — Whether the field's value may be overwritten after it is first set. Possible values: - `none` — value may be overwritten on subsequent writes - `write_once` — subsequent writes are rejected once a value is set Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.

### FieldSchemaEmailAddressConfig

- `archived-at` (datetime, optional, nullable)
- `deactivated-at` (datetime, optional, nullable)
- `redaction-policy` (string, optional, default: none) — Whether the field's value may be redacted on request. Possible values: - `none` — value is redactable - `never` — value is never redacted Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.
- `required` (boolean, optional)
- `source-key-path` (string, optional, nullable) — When the field schema is an alias, the dotted key path of the source field; absent for non-alias schemas.
- `write-policy` (string, optional, default: none) — Whether the field's value may be overwritten after it is first set. Possible values: - `none` — value may be overwritten on subsequent writes - `write_once` — subsequent writes are rejected once a value is set Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.

### FieldSchemaFileConfig

- `archived-at` (datetime, optional, nullable)
- `deactivated-at` (datetime, optional, nullable)
- `max-file-size-bytes` (integer, optional, default: 10000000)
- `min-file-size-bytes` (integer, optional, default: 1)
- `page-count-limit-enabled` (boolean, optional, default: false) — Whether the document page-count limits are enforced.
- `page-count-max` (integer, optional, nullable) — Maximum allowed page count when `page-count-limit-enabled` is true.
- `page-count-min` (integer, optional, nullable) — Minimum allowed page count when `page-count-limit-enabled` is true.
- `redaction-policy` (string, optional, default: none) — Whether the field's value may be redacted on request. Possible values: - `none` — value is redactable - `never` — value is never redacted Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.
- `required` (boolean, optional)
- `source-key-path` (string, optional, nullable) — When the field schema is an alias, the dotted key path of the source field; absent for non-alias schemas.
- `supported-mime-types` (list of string, optional, default: ["image/jpg image/jpeg image/png image/heic image/heif image/tif image/tiff image/gif image/svg+xml application/pdf text/plain text/csv video/mp4 video/webm video/quicktime"])
- `write-policy` (string, optional, default: none) — Whether the field's value may be overwritten after it is first set. Possible values: - `none` — value may be overwritten on subsequent writes - `write_once` — subsequent writes are rejected once a value is set Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.

### FieldSchemaHashConfig

- `archived-at` (datetime, optional, nullable)
- `deactivated-at` (datetime, optional, nullable)
- `ignore-unknown-keys` (boolean, optional, default: false)
- `item-schemas` (list of field-schema, optional)
- `redaction-policy` (string, optional, default: none) — Whether the field's value may be redacted on request. Possible values: - `none` — value is redactable - `never` — value is never redacted Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.
- `required` (boolean, optional)
- `source-key-path` (string, optional, nullable) — When the field schema is an alias, the dotted key path of the source field; absent for non-alias schemas.
- `write-policy` (string, optional, default: none) — Whether the field's value may be overwritten after it is first set. Possible values: - `none` — value may be overwritten on subsequent writes - `write_once` — subsequent writes are rejected once a value is set Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.

### FieldSchemaIntegerConfig

- `archived-at` (datetime, optional, nullable)
- `deactivated-at` (datetime, optional, nullable)
- `max` (double, optional)
- `min` (double, optional)
- `redaction-policy` (string, optional, default: none) — Whether the field's value may be redacted on request. Possible values: - `none` — value is redactable - `never` — value is never redacted Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.
- `required` (boolean, optional)
- `source-key-path` (string, optional, nullable) — When the field schema is an alias, the dotted key path of the source field; absent for non-alias schemas.
- `write-policy` (string, optional, default: none) — Whether the field's value may be overwritten after it is first set. Possible values: - `none` — value may be overwritten on subsequent writes - `write_once` — subsequent writes are rejected once a value is set Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.

### FieldSchemaJsonConfig

- `archived-at` (datetime, optional, nullable)
- `deactivated-at` (datetime, optional, nullable)
- `json-schema` (map from string to any, optional) — A JSON Schema document (Draft 7 syntax) describing the shape of values stored in this field. Synthesized server-side by some verification types (e.g. `government-id` writes a map of national identification numbers); the schema is informational and may evolve without a versioned update.
- `redaction-policy` (string, optional, default: none) — Whether the field's value may be redacted on request. Possible values: - `none` — value is redactable - `never` — value is never redacted Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.
- `required` (boolean, optional)
- `source-key-path` (string, optional, nullable) — When the field schema is an alias, the dotted key path of the source field; absent for non-alias schemas.
- `write-policy` (string, optional, default: none) — Whether the field's value may be overwritten after it is first set. Possible values: - `none` — value may be overwritten on subsequent writes - `write_once` — subsequent writes are rejected once a value is set Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.

### FieldSchemaMultiChoicesConfig

- `allow-empty` (boolean, optional, default: false)
- `archived-at` (datetime, optional, nullable)
- `deactivated-at` (datetime, optional, nullable)
- `option-labels` (list of string, optional) — Display labels for each value in `options`, in the same order.
- `options` (list of string, optional)
- `redaction-policy` (string, optional, default: none) — Whether the field's value may be redacted on request. Possible values: - `none` — value is redactable - `never` — value is never redacted Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.
- `required` (boolean, optional)
- `source-key-path` (string, optional, nullable) — When the field schema is an alias, the dotted key path of the source field; absent for non-alias schemas.
- `write-policy` (string, optional, default: none) — Whether the field's value may be overwritten after it is first set. Possible values: - `none` — value may be overwritten on subsequent writes - `write_once` — subsequent writes are rejected once a value is set Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.

### FieldSchemaNumberConfig

- `archived-at` (datetime, optional, nullable)
- `deactivated-at` (datetime, optional, nullable)
- `max` (double, optional)
- `min` (double, optional)
- `redaction-policy` (string, optional, default: none) — Whether the field's value may be redacted on request. Possible values: - `none` — value is redactable - `never` — value is never redacted Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.
- `required` (boolean, optional)
- `source-key-path` (string, optional, nullable) — When the field schema is an alias, the dotted key path of the source field; absent for non-alias schemas.
- `write-policy` (string, optional, default: none) — Whether the field's value may be overwritten after it is first set. Possible values: - `none` — value may be overwritten on subsequent writes - `write_once` — subsequent writes are rejected once a value is set Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.

### FieldSchemaStringConfig

- `archived-at` (datetime, optional, nullable)
- `deactivated-at` (datetime, optional, nullable)
- `max-char-length` (integer, optional, default: 255)
- `redaction-policy` (string, optional, default: none) — Whether the field's value may be redacted on request. Possible values: - `none` — value is redactable - `never` — value is never redacted Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.
- `required` (boolean, optional)
- `sanitize` (list of string, optional)
- `source-key-path` (string, optional, nullable) — When the field schema is an alias, the dotted key path of the source field; absent for non-alias schemas.
- `write-policy` (string, optional, default: none) — Whether the field's value may be overwritten after it is first set. Possible values: - `none` — value may be overwritten on subsequent writes - `write_once` — subsequent writes are rejected once a value is set Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.

### FieldSchemaRelationConfig

- `archived-at` (datetime, optional, nullable)
- `deactivated-at` (datetime, optional, nullable)
- `redaction-policy` (string, optional, default: none) — Whether the field's value may be redacted on request. Possible values: - `none` — value is redactable - `never` — value is never redacted Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.
- `required` (boolean, optional)
- `source-key-path` (string, optional, nullable) — When the field schema is an alias, the dotted key path of the source field; absent for non-alias schemas.
- `target` (string, optional) — Customer-facing identifier for the specific Relation subtype this field points to — `document-generic`, `document-government-id`, `document-government-id-nfc`, `document-mdoc`, `document-qr-code`, or `selfie`. Use this on a future write API to specify which relation kind to create.
- `write-policy` (string, optional, default: none) — Whether the field's value may be overwritten after it is first set. Possible values: - `none` — value may be overwritten on subsequent writes - `write_once` — subsequent writes are rejected once a value is set Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update.

### AccountsIncludedObjectsItemsDiscriminatorMappingAccountTypeRelationshipsAccountStatusesDataItems

- `type` ("account-status", optional)
- `id` (string, optional)

### AccountsIncludedObjectsItemsDiscriminatorMappingAccountTypeRelationshipsDefaultAccountStatusData

- `type` ("account-status", optional)
- `id` (string, optional)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsNameValue

- `first` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsNameValueFirst, optional)
- `middle` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsNameValueMiddle, optional)
- `last` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsNameValueLast, optional)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsAddressValue

- `street_1` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsAddressValueStreet1, optional)
- `street_2` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsAddressValueStreet2, optional)
- `subdivision` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsAddressValueSubdivision, optional)
- `city` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsAddressValueCity, optional)
- `postal_code` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsAddressValuePostalCode, optional)
- `country_code` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsAddressValueCountryCode, optional)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsIdentificationNumbersValueItems

- `type` (string, optional)
- `value` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsIdentificationNumbersValueItemsValue, optional)

### File

- `filename` (string, optional)
- `url` (string, optional)
- `byte-size` (integer, optional)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsNameValueFirst

- `type` (string, optional)
- `value` (string, optional, nullable)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsNameValueMiddle

- `type` (string, optional)
- `value` (string, optional, nullable)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsNameValueLast

- `type` (string, optional)
- `value` (string, optional, nullable)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsAddressValueStreet1

- `type` (string, optional)
- `value` (string, optional, nullable)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsAddressValueStreet2

- `type` (string, optional)
- `value` (string, optional, nullable)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsAddressValueSubdivision

- `type` (string, optional)
- `value` (string, optional, nullable)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsAddressValueCity

- `type` (string, optional)
- `value` (string, optional, nullable)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsAddressValuePostalCode

- `type` (string, optional)
- `value` (string, optional, nullable)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsAddressValueCountryCode

- `type` (string, optional)
- `value` (string, optional, nullable)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsIdentificationNumbersValueItemsValue

- `identification_class` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsIdentificationNumbersValueItemsValueIdentificationClass, optional)
- `identification_number` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsIdentificationNumbersValueItemsValueIdentificationNumber, optional)
- `issuing_country` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsIdentificationNumbersValueItemsValueIssuingCountry, optional)
- `hashed_identification_number` (VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsIdentificationNumbersValueItemsValueHashedIdentificationNumber, optional) — A SHA-256 hash of the identification number, keyed on organization, country code, identification class, and issuing subdivision. Stable across re-verifications of the same document for the same organization. Null when the identification number has not been hashed.

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsIdentificationNumbersValueItemsValueIdentificationClass

- `type` (string, optional)
- `value` (string, optional)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsIdentificationNumbersValueItemsValueIdentificationNumber

- `type` (string, optional)
- `value` (string, optional)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsIdentificationNumbersValueItemsValueIssuingCountry

- `type` (string, optional)
- `value` (string, optional)

### VerificationIncludedObjectsItemsDiscriminatorMappingAccountAttributesFieldsIdentificationNumbersValueItemsValueHashedIdentificationNumber

A SHA-256 hash of the identification number, keyed on organization, country code, identification class, and issuing subdivision. Stable across re-verifications of the same document for the same organization. Null when the identification number has not been hashed.

- `type` (string, optional)
- `value` (string, optional, nullable)

## Examples

**Request**

```json
{
  "meta": {
    "tag-name": [
      "Apple",
      "Orange"
    ]
  }
}
```

**Response**

```json
{
  "data": {
    "id": "act_hpNqyAbEG4HeVjZoBRNCMKkA",
    "attributes": {
      "reference-id": "abc-123",
      "account-type-name": "User",
      "created-at": "2023-09-22T17:13:49.000Z",
      "updated-at": "2023-09-23T00:22:19.000Z",
      "redacted-at": null,
      "fields": {
        "name": {
          "type": "hash",
          "value": {
            "first": {
              "type": "string",
              "value": "Jane"
            },
            "middle": {
              "type": "string",
              "value": "Marie"
            },
            "last": {
              "type": "string",
              "value": "Doe"
            }
          }
        },
        "address": {
          "type": "hash",
          "value": {
            "street_1": {
              "type": "string",
              "value": "123 Main St"
            },
            "street_2": {
              "type": "string",
              "value": null
            },
            "subdivision": {
              "type": "string",
              "value": "California"
            },
            "city": {
              "type": "string",
              "value": "San Francisco"
            },
            "postal_code": {
              "type": "string",
              "value": "94111"
            },
            "country_code": {
              "type": "string",
              "value": "US"
            }
          }
        },
        "identification_numbers": {
          "type": "array",
          "value": [
            {
              "type": "hash",
              "value": {
                "identification_class": {
                  "type": "string",
                  "value": "visa"
                },
                "identification_number": {
                  "type": "string",
                  "value": "12345678"
                },
                "issuing_country": {
                  "type": "string",
                  "value": "US"
                }
              }
            },
            {
              "type": "hash",
              "value": {
                "identification_class": {
                  "type": "string",
                  "value": "visa"
                },
                "identification_number": {
                  "type": "string",
                  "value": "87654321"
                },
                "issuing_country": {
                  "type": "string",
                  "value": "UK"
                }
              }
            },
            {
              "type": "hash",
              "value": {
                "identification_class": {
                  "type": "string",
                  "value": "cct"
                },
                "identification_number": {
                  "type": "string",
                  "value": "A12345678"
                },
                "issuing_country": {
                  "type": "string",
                  "value": "AF"
                }
              }
            }
          ]
        },
        "birthdate": {
          "type": "date",
          "value": "1994-12-30"
        },
        "phone_number": {
          "type": "string",
          "value": "111-222-3333"
        },
        "email_address": {
          "type": "string",
          "value": "jane@doe.com"
        },
        "selfie_photo": {
          "type": "file"
        }
      },
      "tags": [
        "tag1",
        "tag2"
      ],
      "birthdate": "1994-12-30",
      "name-first": "Jane",
      "name-middle": "Marie",
      "name-last": "Doe",
      "phone-number": "111-222-3333",
      "email-address": "jane@doe.com",
      "address-street-1": "123 Main St",
      "address-street-2": null,
      "address-city": "San Francisco",
      "address-subdivision": "California",
      "address-postal-code": "94111",
      "country-code": "US",
      "identification-numbers": {
        "cct": [
          {
            "issuing-country": "AF",
            "identification-class": "cct",
            "identification-number": "A12345678",
            "created-at": "2023-09-23T00:22:19.963Z",
            "updated-at": "2023-09-23T00:22:19.963Z"
          }
        ],
        "visa": [
          {
            "issuing-country": "US",
            "identification-class": "visa",
            "identification-number": "12345678",
            "created-at": "2023-09-23T00:22:09.934Z",
            "updated-at": "2023-09-23T00:22:19.900Z"
          },
          {
            "issuing-country": "UK",
            "identification-class": "visa",
            "identification-number": "87654321",
            "created-at": "2023-09-23T00:22:09.934Z",
            "updated-at": "2023-09-23T00:22:19.900Z"
          }
        ]
      },
      "social-security-number": "123-45-6789"
    },
    "relationships": {
      "account-type": {
        "data": {
          "id": "acttp_7X5W5w9GMtQntE6oPtKnj44c",
          "type": "account-type"
        }
      }
    },
    "type": "account"
  }
}
```

**SDK Code**

```python Success
import requests

url = "https://api.withpersona.com/api/v1/accounts/account-id/set-tags"

payload = { "meta": { "tag-name": ["Apple", "Orange"] } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Success
const url = 'https://api.withpersona.com/api/v1/accounts/account-id/set-tags';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"meta":{"tag-name":["Apple","Orange"]}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Success
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.withpersona.com/api/v1/accounts/account-id/set-tags"

	payload := strings.NewReader("{\n  \"meta\": {\n    \"tag-name\": [\n      \"Apple\",\n      \"Orange\"\n    ]\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Success
require 'uri'
require 'net/http'

url = URI("https://api.withpersona.com/api/v1/accounts/account-id/set-tags")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"meta\": {\n    \"tag-name\": [\n      \"Apple\",\n      \"Orange\"\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Success
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.withpersona.com/api/v1/accounts/account-id/set-tags")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"meta\": {\n    \"tag-name\": [\n      \"Apple\",\n      \"Orange\"\n    ]\n  }\n}")
  .asString();
```

```php Success
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.withpersona.com/api/v1/accounts/account-id/set-tags', [
  'body' => '{
  "meta": {
    "tag-name": [
      "Apple",
      "Orange"
    ]
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Success
using RestSharp;

var client = new RestClient("https://api.withpersona.com/api/v1/accounts/account-id/set-tags");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"meta\": {\n    \"tag-name\": [\n      \"Apple\",\n      \"Orange\"\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Success
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["meta": ["tag-name": ["Apple", "Orange"]]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.withpersona.com/api/v1/accounts/account-id/set-tags")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```