---
title: "Create a private location"
method: POST
path: "/api/v1/synthetics/private-locations"
tags: ["Synthetics"]
---

# Create a private location

`POST /api/v1/synthetics/private-locations`

Create a new Synthetic private location.

## Request body

- SyntheticsPrivateLocation — Object containing information about the private location to create.
  - `description` string, required — Description of the private location.
  - `id` string — Unique identifier of the private location.
  - `metadata` SyntheticsPrivateLocationMetadata — Object containing metadata about the private location.
    - `restricted_roles` string[] — A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. This field is deprecated. Use the restriction policies API to manage permissions.
  - `name` string, required — Name of the private location.
  - `secrets` SyntheticsPrivateLocationSecrets — Secrets for the private location. Only present in the response when creating the private location.
    - `authentication` SyntheticsPrivateLocationSecretsAuthentication — Authentication part of the secrets.
      - `id` string — Access key for the private location.
      - `key` string — Secret access key for the private location.
    - `config_decryption` SyntheticsPrivateLocationSecretsConfigDecryption — Private key for the private location.
      - `key` string — Private key for the private location.
  - `tags` string[], required — Array of tags attached to the private location.

## Response `200`

OK

- SyntheticsPrivateLocationCreationResponse — Object that contains the new private location, the public key for result encryption, and the configuration skeleton.
  - `config` object — Configuration skeleton for the private location. See installation instructions of the private location on how to use this configuration.
  - `private_location` SyntheticsPrivateLocation — Object containing information about the private location to create.
    - `description` string, required — Description of the private location.
    - `id` string — Unique identifier of the private location.
    - `metadata` SyntheticsPrivateLocationMetadata — Object containing metadata about the private location.
      - `restricted_roles` string[] — A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. This field is deprecated. Use the restriction policies API to manage permissions.
    - `name` string, required — Name of the private location.
    - `secrets` SyntheticsPrivateLocationSecrets — Secrets for the private location. Only present in the response when creating the private location.
      - `authentication` SyntheticsPrivateLocationSecretsAuthentication — Authentication part of the secrets.
        - `id` string — Access key for the private location.
        - `key` string — Secret access key for the private location.
      - `config_decryption` SyntheticsPrivateLocationSecretsConfigDecryption — Private key for the private location.
        - `key` string — Private key for the private location.
    - `tags` string[], required — Array of tags attached to the private location.
  - `result_encryption` SyntheticsPrivateLocationCreationResponseResultEncryption — Public key for the result encryption.
    - `id` string — Fingerprint for the encryption key.
    - `key` string — Public key for result encryption.

## Other responses

- `402` — Quota reached for private locations
- `404` — Private locations are not activated for the user
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v1.md) · [All operations](https://skmtc.net/datadog/apis/api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v1/revisions/ca5871004d26/schema)
