# Save page fields

Updates the fields of a page.

Endpoint: POST /api/v1/pages/{pageId}/fields
Version: v1
Security: Bearer

## Path parameters:

  - `pageId` (string, required)
    The page identifier.
    Example: "8f0b81bc-7388-46be-b109-6e73d1114470"

## Query parameters:

  - `environmentId` (string)
    The identifier of the environment.

## Request fields (application/json):

  - `fields` (array, required)
    The field values for the page.

  - `fields.id` (string,null)
    The identifier of the field.
Example value: field-id-123
    Example: "field-id-123"

  - `fields.value` (string,null)
    The current value of the field.
Example value: Hello World
    Example: "Hello World"

  - `fields.originalValue` (string,null)
    The original value of the field before any changes, useful for comparison or rollback scenarios.
Example value: Original Text
    Example: "Original Text"

  - `fields.reset` (boolean)
    Whether the field value should be reset to its default state.
Example value: False

  - `language` (string, required)
    The language of the page to save.
Example value: en-US
    Example: "en-US"

  - `site` (string, required)
    The site name.
Example value: my-site
    Example: "my-site"

  - `pageVersion` (integer)
    The version number of the page to save.
Example value: 2
    Example: 2

  - `revision` (string,null)
    The revision identifier of the page to save.
Example value: f7d29433-001e-4a35-a744-876759dba468
    Example: "f7d29433-001e-4a35-a744-876759dba468"

## Response 200 fields (application/json):

  - `errors` (array,null)
    The list of errors that occurred during the save operation.

  - `errors.errorCode` (string,null)
    The error code.
Example value: ItemIsProtected
    Example: "ItemIsProtected"

  - `errors.message` (string,null)
    The error message.
Example value: The page item is protected.
    Example: "The page item is protected."

  - `errors.pageId` (string,null)
    The identifier of the page that caused the error.
Example value: 8f0b81bc-7388-46be-b109-6e73d1114470
    Example: "8f0b81bc-7388-46be-b109-6e73d1114470"

  - `savedPage` (object)

  - `savedPage.fields` (array,null)
    The list of updated field values.

  - `savedPage.fields.id` (string,null)
    The identifier of the field.
Example value: a73d057e-20e3-4ac3-9c06-5f34bfcb6847
    Example: "a73d057e-20e3-4ac3-9c06-5f34bfcb6847"

  - `savedPage.fields.value` (string,null)
    The new value of the field.
Example value: Welcome to our site
    Example: "Welcome to our site"

  - `savedPage.fields.originalValue` (string,null)
    The original value of the field.
Example value: Welcome
    Example: "Welcome"

  - `savedPage.fields.reset` (boolean)
    The field reset status.
Example value: False

  - `savedPage.id` (string,null)
    The identifier of the saved page.
Example value: 8f0b81bc-7388-46be-b109-6e73d1114470
    Example: "8f0b81bc-7388-46be-b109-6e73d1114470"

  - `savedPage.language` (string,null)
    The language of the saved page.
Example value: en-US
    Example: "en-US"

  - `savedPage.revision` (string,null)
    The revision identifier of the saved page.
Example value: f7d29433-001e-4a35-a744-876759dba468
    Example: "f7d29433-001e-4a35-a744-876759dba468"

  - `savedPage.version` (integer)
    The version number of the saved page.
Example value: 2
    Example: 2

  - `validationErrors` (array,null)
    The list of validation errors that occurred during the save operation.

  - `validationErrors.aborted` (string,null)
    Whether the operation was aborted.
Example value: true
    Example: "true"

  - `validationErrors.errorLevel` (string,null)
    The level of the error.
Example value: High
    Example: "High"

  - `validationErrors.errorMessage` (string,null)
    The error message.
Example value: Field value is required.
    Example: "Field value is required."

  - `validationErrors.fieldId` (string,null)
    The identifier of the field that caused the error.
Example value: a73d057e-20e3-4ac3-9c06-5f34bfcb6847
    Example: "a73d057e-20e3-4ac3-9c06-5f34bfcb6847"

  - `warnings` (array,null)
    The list of warnings that occurred during the save operation.

  - `newCreatedVersion` (object)

  - `newCreatedVersion.pageId` (string,null)
    The identifier of the page.
Example value: 8f0b81bc-7388-46be-b109-6e73d1114470
    Example: "8f0b81bc-7388-46be-b109-6e73d1114470"

  - `newCreatedVersion.displayName` (string,null)
    The display name of the page.
Example value: Site Home
    Example: "Site Home"

  - `newCreatedVersion.versionNumber` (integer)
    The version number of the page.
Example value: 2
    Example: 2

## Response 400 fields (application/json):

  - `type` (string,null)
    The type of the error response entity.

  - `title` (string,null)
    The title of the error response entity.

  - `status` (integer,null)
    The response status code.

  - `detail` (string,null)
    A detailed explanation, specific to this occurrence of the problem.

  - `instance` (string,null)
    If available, a URI reference that identifies the specific occurrence of the problem.

## Response 404 fields (application/json):

  - `type` (string,null)
    The type of the error response entity.

  - `title` (string,null)
    The title of the error response entity.

  - `status` (integer,null)
    The response status code.

  - `detail` (string,null)
    A detailed explanation, specific to this occurrence of the problem.

  - `instance` (string,null)
    If available, a URI reference that identifies the specific occurrence of the problem.


