---
title: "create setting"
method: POST
path: "/vhosts/{vhost_id}/settings"
tags: ["Settings"]
---

# create setting

`POST /vhosts/{vhost_id}/settings`

## Request

- Base URL: `https://api.aptible.com`
- URL: `https://api.aptible.com/vhosts/{vhost_id}/settings`
- Auth: API key in header `Authorization`

Creates a new setting for the specified vhost.

## Path parameters

- `vhost_id` integer, required

## Query parameters

- `no_embed` boolean

## Headers

- `Prefer` 'no_sensitive_extras=true'

## Request body

- CreateSettingForAppRequest
  - `settings` object: Mapping of non-sensitive key-value pairs
  - `sensitive_settings` object: Mapping of sensitive key-value pairs

## Response `201`

successful

- Setting
  - `id` integer, required
  - `_type` string, required
  - `settings` object, required
  - `sensitive_settings` object
  - `_links` ConfigurationLinks
    - `resource` ListAccountsForStack200ResponseLinksStack
      - `href` string, uri
    - `self` ListAccountsForStack200ResponseLinksStack
      - `href` string, uri

## Other responses

- `default`: Error response. Often a 4xx or 5xx status code

## Changes

- **2026-07-24** `1dc1e5b8c6eb`: 1 breaking, 2 info
  - the response property `sensitive_settings` became optional for the status `201`
  - added the new optional `header` request parameter `Prefer`
  - added the new optional `query` request parameter `no_embed`
- **2026-01-22** `9f13a846724c`: 2 breaking, 2 warning, 4 info
  - removed the required property `keys` from the response with the `201` status
  - removed the required property `sensitive_keys` from the response with the `201` status
  - removed the request property `keys`
  - removed the request property `sensitive_keys`
  - …4 more
- **2025-11-14** `a0af32b45330`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/aptible/apis/aptible-api-v1/changes/vhosts/:vhost_id/settings/post.md)

---

[API](https://skmtc.dev/aptible/apis/aptible-api-v1.md) - [All operations](https://skmtc.dev/aptible/apis/aptible-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/aptible/apis/aptible-api-v1/revisions/a21f6b1bc6fe?raw)
